(RESOLVED) Given $z = f (x, y)$ and $x = r \cos \theta $, $ y = r \sin \theta$ prove the following Question:
Let $z = f (x, y)$ and $x = r \cos \theta $, $ y = r \sin \theta$
Show that
$$\frac{\partial^2z}{\partial x^2} + \frac{\partial^2z}{\partial y^2} = \frac{\partial^2z}{\partial r^2} + \frac{1}{r^2} \frac{\partial^2z}{\partial \theta^2} + \frac{1}{r} \frac{\partial z}{\partial r} $$

My attempt is to show that LS=RS, but I am stuck on how to eliminate the $\frac{1}{r} \frac{\partial z}{\partial r} $ term . See below
$$LS: \frac{\partial^2z}{\partial x^2} + \frac{\partial^2z}{\partial y^2}$$

*

*For the RS, first find its given partial derivatives/expressions

First term: $$===>\frac{\partial^2z}{\partial r^2} = \frac{\partial^2z}{\partial x^2}cos^2\theta + \frac{\partial^2z}{\partial y^2}sin^2\theta + 2(\frac{\partial^2z}{\partial x\partial y}sin\theta cos\theta)$$

*

*This is the part where I get stuck
$$ \frac{1}{r^2} \frac{\partial^2z}{\partial \theta^2}=\frac{1}{r^2}[\frac{\partial}{\partial \theta}(-\frac{\partial z}{\partial x}rsin\theta+\frac{\partial z}{\partial y}rcos\theta)]$$

*

*Now treat $(-\frac{\partial z}{\partial x}rsin\theta+\frac{\partial z}{\partial y}rcos\theta)$ as a function of $z$ hence $(-\frac{\partial z}{\partial x}rsin\theta+\frac{\partial z}{\partial y}rcos\theta)$ can be seen as $\frac{\partial z}{\partial \theta}$
$$= \frac{1}{r^2}[\frac{\partial}{\partial x}(-\frac{\partial z}{\partial x}rsin\theta+\frac{\partial z}{\partial y}rcos\theta)\frac{\partial x}{\partial \theta} + \frac{\partial}{\partial y}(-\frac{\partial z}{\partial x}rsin\theta+\frac{\partial z}{\partial y}rcos\theta)\frac{\partial y}{\partial \theta}]$$
We know $\frac{\partial x}{\partial \theta} = -rsin\theta$ and $\frac{\partial y}{\partial \theta}=rcos\theta$, so substitute them in
$$= \frac{1}{r^2}[\frac{\partial}{\partial x}(-\frac{\partial z}{\partial x}rsin\theta+\frac{\partial z}{\partial y}rcos\theta)(-rsin\theta) + \frac{\partial}{\partial y}(-\frac{\partial z}{\partial x}rsin\theta+\frac{\partial z}{\partial y}rcos\theta)(rcos\theta)]$$
$$= \frac{1}{r^2}[(\frac{\partial ^2z}{\partial x^2}r^2sin^2\theta-\frac{\partial ^2z}{\partial x\partial y}r^2cos\theta sin\theta) + (-\frac{\partial ^2z}{\partial x\partial y}r^2cos\theta sin\theta+\frac{\partial ^2z}{\partial y^2}r^2cos^2\theta)]$$
Second term:$$===>\frac{1}{r^2} \frac{\partial^2z}{\partial \theta^2} = \frac{\partial ^2z}{\partial x^2}sin^2\theta-2(\frac{\partial ^2z}{\partial x\partial y}cos\theta sin\theta) +\frac{\partial ^2z}{\partial y^2}cos^2\theta$$

*

*Now for the last term on the right side,

Third term:
$$===>\frac{1}{r} \frac{\partial z}{\partial r}= \frac{1}{r}[\frac{\partial z}{\partial x}cos\theta + \frac{\partial z}{\partial y}sin\theta]$$

*

*Combining all terms of the right side, we have the following
$$\frac{\partial^2z}{\partial x^2}cos^2\theta + \frac{\partial^2z}{\partial y^2}sin^2\theta + \frac{\partial^2z}{\partial x^2}sin^2\theta + \frac{\partial^2z}{\partial y^2}cos^2\theta + \frac{1}{r}[\frac{\partial z}{\partial x}cos\theta + \frac{\partial z}{\partial y}sin\theta]$$
$$===>RS: \frac{\partial^2z}{\partial x^2} + \frac{\partial^2z}{\partial y^2} + \frac{1}{r}[\frac{\partial z}{\partial x}cos\theta + \frac{\partial z}{\partial y}sin\theta]$$
which, $$≠LS=\frac{\partial^2z}{\partial x^2} + \frac{\partial^2z}{\partial y^2}$$

My QUESTION:
There is supposed to be an extra term for the second term of the right side that cancels the third term, but I can't see it. Anyways, what did I do wrong? I believe my error is evaluating the second term of the right side, but it seems correct to me.
 A: By the Chain Rule, we have that $z_r = f_x x_r + f_y y_r$ and $z_\theta = f_x x_\theta + f_y y_\theta$ so that $$z_{rr} = f_x x_{rr} + f_{xx} x_r^2 + f_y y_{rr} + f_{yy} y_r^2 \text{ and } z_{\theta \theta} = f_x x_{\theta \theta} + f_{xx} x_\theta^2 + f_y y_{\theta \theta} + f_{yy} y_\theta^2$$ by the Product Rule. Observe that $x_r = \cos \theta,$ $y_r = \cos \theta,$ $x_\theta = -r \sin \theta,$ $y_\theta = r \cos \theta,$ $x_{rr} = y_{rr} = 0,$ $x_{\theta \theta} = -r \cos \theta,$ and $y_{\theta \theta} = -r \sin \theta,$ from which it follows that $$\begin{align*} z_{rr} &= \cos^2 \theta f_{xx} + \sin^2 \theta f_{yy} \text{ and} \\ \\ z_{\theta \theta} &= -r \cos \theta f_x + r^2 \sin^2 \theta f_{xx} - r \sin \theta f_y + r^2 \sin^2 \theta f_{yy} \\ \\
&= r^2 \sin^2 \theta(f_{xx} + f_{yy}) - r(\cos \theta f_x + \sin \theta f_y). \end{align*}$$ We have therefore that $$\begin{align*} z_{rr} + \frac{z_{\theta \theta}}{r^2} + \frac{z_r}{r} &= \underbrace{\cos^2 \theta f_{xx} + \sin^2 \theta f_{yy}}_{z_{rr}} + \underbrace{\sin^2 \theta (f_{xx} + f_{yy}) - \frac{\cos \theta f_x + \sin \theta f_y} r}_{\frac{z_{\theta \theta}}{r^2}} \\ \\ &\phantom{\cos^2 \theta f_{xx} + \sin^2 \theta f_{yy}+..} + \underbrace{\frac{\cos \theta f_x + \sin \theta f_y}{r}}_{\frac{z_r} r} \end{align*}.$$ Of course, the  last two terms cancel, and the first four terms simplify to $f_{xx} + f_{yy} = z_{xx} + z_{yy}.$
