# Rewriting differential equation

My textbook at one point does the following:

$$\ddot{x} = \frac{d \dot{x}}{dt} = \frac{d \dot{x}}{dx} \frac{dx}{dt} = \frac{d}{dx} \left(\frac{1}{2} \dot{x}^2 \right)$$

I don't quite understand the last step here. Surely $\dfrac{dx}{dt} = \dot{x}$, so why isn't the last expression $\dfrac{d}{dx}(\dot{x})$?

I would greatly appreciate it if someone could explain this to me.

-

I think your confusion is due to the fact that the equation involves derivatives taken with respect to two variables: one with respect to $x$ i.e. $\dfrac{d}{dx}$ and another with respect to $t$ i.e. $\dfrac{d}{dt}$.

For the sake of clarity, let us denote $y = \dfrac{dx}{dt}$. Then we have that \begin{align} \ddot{x} = \frac{d}{dt}\left( \frac{dx}{dt} \right) = \frac{dy}{dt} = \underbrace{\frac{dy}{dx} \frac{dx}{dt}}_{\text{chain rule}} = \frac{dy}{dx} y = \frac12 \left(2y \frac{dy}{dx} \right) = \underbrace{\frac12 \frac{d(y^2)}{dy} \frac{dy}{dx} =\frac12 \frac{d(y^2)}{dx}}_{\text{again by chain rule}} \end{align}

-
Wonderful! Thanks a lot for your quick answer! Now that I see it written out like that it makes sense :) –  Kristian May 21 '12 at 17:55
$$\ddot{x} = \frac{d \dot{x}}{dt} = \frac{d \dot{x}}{dx} \frac{dx}{dt}$$
$$\dot{x} = \frac{d {x}}{dt}$$
$$\ddot{x} = \frac{d \dot{x}}{dt} = \frac{d \dot{x}}{dx} \frac{dx}{dt}=\frac{d \dot{x}}{dx} \dot{x}$$
$$\frac{d}{dx} \left(\frac{1}{2} \dot{x}^2 \right)=\frac{1}{2} 2 \dot{x} \frac{d}{dx} \left(\dot{x} \right)=\frac{d \dot{x}}{dx} \dot{x}$$