Multivariable chain rule for $f:\mathbb{R}^2\to\mathbb{R},\ f\ \ \mathcal{C}^2$ function

chain rulederivativesmultivariable-calculus

I am trying to solve the following problem.

Suppose $f:\mathbb{R}^2\to\mathbb{R}$ is $\mathcal{C}^2.$ Let $F\begin{pmatrix}r\\\theta\end{pmatrix}=f\begin{pmatrix}r\cos\theta\\r\sin\theta\end{pmatrix}$. Show that $\frac{\partial^2F}{\partial r^2}+\frac{1}{r}\frac{\partial F}{\partial r}+\frac{1}{r^2}\frac{\partial^2 F}{\partial \theta^2}=\frac{\partial^2 f}{\partial x^2}+\frac{\partial^2 f}{\partial y^2},$ here the lefthand side is evaluated at $\begin{bmatrix}r\\\theta\end{bmatrix}$ and the righthand is evaluated at $\begin{bmatrix}r\cos\theta\\r\sin\theta\end{bmatrix}.$

What I have done:
$DF\begin{pmatrix}r\\\theta\end{pmatrix}=Df\left(\vec{g}\begin{pmatrix}r\\\theta\end{pmatrix}\right)D\vec{g}\begin{pmatrix}r\\\theta\end{pmatrix}=\left[\frac{\partial f}{\partial x}\left(\vec{g}\begin{pmatrix}r\\\theta\end{pmatrix}\right)\ \ \frac{\partial f}{\partial y}\left(\vec{g}\begin{pmatrix}r\\\theta\end{pmatrix}\right)\right] \begin{bmatrix}\cos\theta & -r\sin\theta\\ \sin\theta & r\cos\theta\end{bmatrix}=\begin{bmatrix}\frac{\partial f}{\partial x}\left(\vec{g}\begin{pmatrix}r\\\theta\end{pmatrix}\right)\cos\theta+\frac{\partial f}{\partial y}\left(\vec{g}\begin{pmatrix}r\\\theta\end{pmatrix}\right)\sin\theta & -\frac{\partial f}{\partial x}\left(\vec{g}\begin{pmatrix}r\\\theta\end{pmatrix}\right)r\sin\theta+\frac{\partial f}{\partial y}\left(\vec{g}\begin{pmatrix}r\\\theta\end{pmatrix}\right)r\cos\theta\end{bmatrix}=\begin{bmatrix}\frac{\partial F}{\partial r} & \frac{\partial F}{\partial\theta}\end{bmatrix}.$

It is not clear to me now how I should apply the chain rule to compute the left hand side terms like $\frac{\partial^2F}{\partial r^2}$ so I would appreciate an hint about how to do this.

Best Answer

Let $F(r,\theta)=f(r\cos(\theta),r\sin(\theta))$. Applying the chain rule, we get $$\frac{\partial F}{\partial r}=\frac{\partial f}{\partial x}\cos(\theta)+\frac{\partial f}{\partial y}\sin(\theta),\quad \frac{\partial F}{\partial \theta}=-\frac{\partial f}{\partial x}r\sin(\theta)+\frac{\partial f}{\partial y}r\cos(\theta).$$ The above equations follow also from your work.

Now we differentiate again (recall that $f\in C^2$ and therefore mixed partial derivative are equal): $$\frac{\partial^2 F}{\partial r^2}=\frac{\partial^2 f}{\partial x^2}\cos^2(\theta)+2\frac{\partial^2 f}{\partial x\partial y}\sin(\theta)\cos(\theta)+\frac{\partial^2 f}{\partial y^2}\sin^2(\theta),\\\frac{\partial^2 F}{\partial \theta^2}=\frac{\partial^2 f}{\partial x^2}r^2\sin^2(\theta)-2\frac{\partial^2 f}{\partial x\partial y}r^2\sin(\theta)\cos(\theta)+\frac{\partial^2 f}{\partial y^2}r^2\cos^2(\theta)-\frac{\partial f}{\partial x}r\cos(\theta)-\frac{\partial f}{\partial y}r\sin(\theta).$$ Finally, it easy to verify that the required identity holds: \begin{align}\frac{\partial^2F}{\partial r^2}+\frac{1}{r}\frac{\partial F}{\partial r}+\frac{1}{r^2}\frac{\partial^2 F}{\partial \theta^2}&=\frac{\partial^2 f}{\partial x^2}\cos^2(\theta)+2\frac{\partial^2 f}{\partial x\partial y}\sin(\theta)\cos(\theta)+\frac{\partial^2 f}{\partial y^2}\sin^2(\theta)\\ &\; +\frac{1}{r}\frac{\partial f}{\partial x}\cos(\theta)+\frac{1}{r}\frac{\partial f}{\partial y}\sin(\theta)\\ &\; +\frac{\partial^2 f}{\partial x^2}\sin^2(\theta)-2\frac{\partial^2 f}{\partial x\partial y}\sin(\theta)\cos(\theta)+\frac{\partial^2 f}{\partial y^2}\cos^2(\theta)\\ &\;-\frac{1}{r}\frac{\partial f}{\partial x}\cos(\theta)-\frac{1}{r}\frac{\partial f}{\partial y}\sin(\theta)\\ &=\frac{\partial^2 f}{\partial x^2}+\frac{\partial^2 f}{\partial y^2}. \end{align}