# Why aren't $\hat{x}$ and $\hat{p}$ considered functions of time in the expectation value?

In Griffiths Intro to QM (2nd edition), he gives the equation

$$\frac{d}{dt} \langle Q \rangle = \frac{i}{\hbar}\langle [\hat{H},\hat{Q}] \rangle + \left\langle \frac{\partial{\hat{Q}}}{\partial{t}} \right \rangle \tag{3.71}$$

and he goes on to state that $$\left \langle \frac{\partial\hat{Q}}{\partial{t}} \right \rangle =0$$

for many operators $\hat{Q}$.

However, in problem 3.31 when deriving the virial theorem, we use $\hat{Q} = \hat{x}\hat{p}$. Why are they not considered functions of time, thus giving a non-zero value for $$\left \langle \frac{\partial (\hat{x}\hat{p})}{\partial{t}} \right \rangle \, ?$$

$\frac{\partial\hat{Q}}{\partial t}$ denotes the partial derivative of time, which is nonvanishing only when $\hat{Q}$ manifestly depends on time. Every operator $\hat{Q}$ can be time dependent in an implicit way such as $\hat{x}\hat{p}$ which can be time dependent when $\hat{x}$ or $\hat{p}$ depends on time.