# Second order partial derivative chain rule?

So let's say I have a second order partial derivative of a function with respect to $t$. Now I define $$T=t + f(r)$$ and require $\partial_t^2$ as a function of $\partial_r^2$ and $\partial_T^2$.

Is the second order chain rule for ordinary derivatives applicable here? Or is there any other formula that needs to be applied?

Edit: For some $\phi(t)$, I have attempted the following calculations based on Ted Shifrin's comment $$\frac{\partial \phi}{\partial t}= \frac{\partial \phi}{\partial T} + f'(r)\frac{\partial \phi}{\partial r}$$ $$\frac{\partial}{\partial t}\frac{\partial \phi}{\partial t}=\frac{\partial}{\partial t} \left(\frac{\partial \phi}{\partial T}\right) + \frac{\partial}{\partial t} \left[f'(r)\frac{\partial \phi}{\partial r}\right]$$ $$\frac{\partial^2 \phi}{\partial t^2} = \frac{\partial^2 \phi}{\partial T^2} \frac{\partial T}{\partial t} + f''(r)\left(\frac{\partial r}{\partial t}\right) \frac{\partial \phi}{\partial t} + f'(r) \frac{\partial^2 \phi}{\partial r^2} \left(\frac{\partial r}{\partial t }\right)$$

• The answer will also involve $\partial_r$. Note that $\partial_t = \partial_T + f'(r)\partial_r$ by the usual (two-variable) chain rule. – Ted Shifrin Feb 28 '18 at 17:26
• @TedShifrin Could you take a look at my edit and tell me if I got it right? – pkg Mar 1 '18 at 6:26
• Nope. There were special things in that question due to having just a linear change of coordinates. Use what I gave you and differentiate again. – Ted Shifrin Mar 1 '18 at 6:45
• @TedShifrin I've redone the calculation starting with what you gave. Did I get it right this time? – pkg Mar 1 '18 at 7:09
• @TedShifrin Also, I'm assuming the relation you've given me is for $t= T + f(r)$. If so, I will just change my original question to that. – pkg Mar 1 '18 at 7:15