# Proving double derivatives with the chain rule (I think?)

Hey StackExchange I'm having trouble understating where to start with this problem, I'm supposed to prove something about double derivatives and the chain rule but I'm having trouble understanding exactly what I'm being asked and how to go about doing it.

If $y = f(u)$ and $u = g(x)$, where f and g are twice differentiable functions show that:

$$\frac{d^2y}{dx^2} = \frac{d^2y}{du^2}\left(\frac{du}{dx}\right)^2 + \frac{dy}{du}\left(\frac{d^2u}{dx^2}\right)$$

• Start by taking the first derivative of $y$. – Code-Guru Jul 12 '14 at 21:23

Consider $\dfrac{\mathrm{d}y}{\mathrm{d}x}=\dfrac{\mathrm{d}f(u)}{\mathrm{d}u}\dfrac{\mathrm{d}u}{\mathrm{d}x}$. Take the second derivative (use the chain rule, product rule, and chain rule, respectively, in that order): $$\dfrac{\mathrm{d}^2y}{\mathrm{d}^2x}=\dfrac{\mathrm{d}}{\mathrm{d}x}\left(\dfrac{\mathrm{d}f(u)}{\mathrm{d}u}\dfrac{\mathrm{d}u}{\mathrm{d}x}\right)=\dfrac{\mathrm{d}f(u)}{\mathrm{d}u}\dfrac{\mathrm{d}^2u}{\mathrm{d}x^2}+\dfrac{\mathrm{d}^2f(u)}{\mathrm{d}u^2}\left(\dfrac{\mathrm{d}u}{\mathrm{d}x}\right)^2$$
The first derivative $\frac{dy}{dx}$ can be calculated with the chain rule:
$$\frac{dy}{dx}= f'(u)\cdot u' = \frac {dy}{du} \cdot \frac{du}{dx}$$