# Doubt about temporal derivative of a partial derivative

I have $\theta (t)$ and $\phi (t)$ and I have to find:

$$\frac {d}{dt}\left(\frac{\partial \cos(\theta - \phi)\dot \theta \dot\phi}{\partial \dot\theta}\right)$$

Why the correct result is

$$\cos(\theta-\phi)\ddot \phi+\sin(\theta-\phi)\dot \phi^2$$

$$-\sin(\theta-\phi)(\dot \theta-\dot\phi)\dot\phi+\cos(\theta-\phi)\ddot\phi$$

Thanks for any help!

-
What should $\frac{\partial \cos(\theta - \phi)}{\partial \dot\theta}$ mean? –  Fabian Jan 7 '13 at 9:43
@Fabian partial derivative of $\cos(\theta-\phi)$ with respect to $\dot \theta$ –  sunrise Jan 7 '13 at 9:55
@Fabian I'm sorry, I made a mistake in typing and now I have just updated the question! –  sunrise Jan 7 '13 at 10:02

First calculate the derivative with respect to $\dot\theta$ (treating $\theta$, $\phi$ and $\dot\phi$ as independent variables) $$\frac{\partial \cos(\theta - \phi)\dot \theta \dot\phi}{\partial \dot\theta} =\cos(\theta - \phi) \dot\phi.$$
Next, we take the derivative with respect to time. Here, you should use the chain rule which states that $$\frac{d}{dt} f(\theta,\phi,\dot \theta, \dot \phi) =(\partial_\theta f)\dot \theta+ (\partial_\phi f)\dot \phi + =(\partial_{\dot\theta} f)\ddot \theta+ (\partial_{\dot\phi} f)\ddot \phi.$$ Thus, we obtain $$\frac{d}{dt} \cos(\theta - \phi) \dot\phi = \sin(\phi-\theta) \dot\phi (\dot\theta -\dot \phi) + \cos(\theta -\phi) \ddot\phi$$ so your result is correct... Only when $\dot \theta=0$, the other result is obtained.