# chain rule of a second derivative

Suppose I have the following function where $$z=\omega(\zeta)=\frac{1}{\zeta}$$ and also, $$\phi(\zeta) = \zeta^{-1}+2\zeta$$ By using chain rule, I can get the first-derivative of $$\phi(z)$$. Notice that I want now $$\phi$$ as a function of $$z$$. Thus, $$\phi'(z)=\frac{d\phi}{d\zeta}\frac{d\zeta}{dz}=\frac{\phi'(\zeta)}{\omega'(\zeta)}$$ where, $$\omega'(\zeta) = \frac{d\omega(\zeta)}{d\zeta}=\frac{dz}{d\zeta}$$

My question is, how can we get the second-derivative of $$\phi(z)$$, i.e. $$\phi''(z)$$? By using chain rule?

You already have $$\phi'(z)$$, so just differentiate it using the product and chain rules:
$$\phi''(z) = \frac{d}{dz}\left(\frac{d\phi}{d\zeta}\right)\frac{d\zeta}{dz} + \frac{d\phi}{d\zeta}\frac{d}{dz}\left(\frac{d\zeta}{dz}\right) = \frac{d^2\phi}{d\zeta^2}\left(\frac{d\zeta}{dz}\right)^2+\frac{d\phi}{d\zeta}\frac{d^2\zeta}{dz^2}.$$
Notice that nothing we've done uses the form of your functions, so this holds in full generality. In your special case, you could also just substitute everything into get $$\phi$$ in terms of $$z$$ directly, then differentiate that twice.
• I still don't understand how to get the first part in the last expression, i.e. $\frac{d^2\phi}{d\zeta^2}\left(\frac{d\zeta}{dz}\right)^2$ – BeeTiau Nov 15 '18 at 18:08
• Sure: $\frac{d}{dz}\left(\frac{d\phi}{d\zeta}\right) = \frac{d^2\phi}{d\zeta^2}\frac{d\zeta}{dz}$ by the chain rule (applied to the function $\frac{d\phi}{d\zeta}$), then it's multiplied by $\frac{d\zeta}{dz}$, so I've grouped the two copies of $\frac{d\zeta}{dz}$ together. – user3482749 Nov 15 '18 at 18:09