Express $\frac{d^2z}{d\theta^2}$ Polar coordinates Let $(x, y)$ be Cartesian coordinates in the plane and let $(r, \theta)$ be Polar coordinates. Express $\frac{d^2z}{d\theta^2}$.

my attempt
$z = f(x, y)$
Note
$\frac{du}{d\theta} = \frac{dr}{d\theta}cos(\theta) = -rsin(\theta)$
$\frac{dy}{d\theta} = rcos(\theta)$
$\frac{dz}{d\theta} = \frac{df}{du}\frac{du}{d\theta} + \frac{df}{dy}\frac{dy}{d\theta}$
$\frac{dz}{d\theta} = -r \frac{df}{du}sin(\theta) + r\frac{df}{dy}cos(\theta)$
$\frac{1}{r}\frac{d}{d\theta}(\frac{dz}{d\theta}) = \frac{d}{d\theta}(\frac{df}{du})sin(\theta) - cos(\theta)\frac{df}{du} + \frac{d}{d\theta} (\frac{df}{dy})cos(\theta) - \frac{df}{dy}sin(\theta)$
$\frac{1}{r}\frac{d^2z}{d\theta^2} = -\frac{d^2f}{dx^2}\frac{dx}{d\theta}sin(\theta) - \frac{df}{du}cos(\theta) + \frac{d^2f}{dy^2}(\frac{dy}{d\theta})cos(\theta) - \frac{df}{dy}sin(\theta)$
thus,
$$\frac{d^2z}{d\theta^2} = r^2sin^2(\theta)\frac{d^2f}{x^2} - \frac{rdf}{dx}cos(\theta) - r \frac{df}{dy}sin(\theta) + r^2 \frac{d^2f}{dy^2}cos^2(\theta)$$
Is this correct?
 A: I think I have something. Was careful to apply the chain rule to terms like $\frac{d}{d\theta}(\frac{\partial f}{\partial x})$. This results in the second partial derivatives appearing in the below. 
$$z=f(x,y)$$
$$dz/d\theta=\frac{\partial f}{\partial x}\frac{dx}{d\theta}+\frac{\partial f}{\partial y}\frac{dy}{d\theta}$$
$$\frac{d^2z}{d\theta^2}=\frac{d}{d\theta}(\frac{\partial f}{\partial x})\frac{dx}{d\theta}+\frac{\partial f}{\partial x}\frac{d^2x}{d\theta ^2}+\frac{d}{d\theta}(\frac{\partial f}{\partial y})\frac{dy}{d\theta}+\frac{\partial f}{\partial y}\frac{d^2y}{d\theta^2}$$
$$\frac{d^2z}{d\theta^2}=(\frac{\partial^2f}{\partial x^2}\frac{dx}{d\theta}+\frac{\partial ^2f}{\partial x\partial y}\frac{dy}{d\theta})(\frac{dx}{d\theta})+\frac{\partial f}{\partial x}\frac{d^2x}{d\theta ^2}+\frac{\partial f}{\partial y}\frac{d^2y}{d\theta^2}+(\frac{\partial^2 f}{\partial y\partial x}\frac{dx}{d\theta}+\frac{\partial ^2f}{\partial y^2}\frac{dy}{d\theta})\frac{dy}{d\theta}$$
$$\frac{d^2z}{d\theta^2}=(\frac{\partial ^2f}{\partial x^2})(\frac{dx}{d\theta})^2+2\frac{\partial ^2 f}{\partial x \partial y}\frac{dy}{d\theta}\frac{dx}{d\theta}+\frac{\partial f}{\partial x}\frac{d^2x}{d\theta^2}+\frac{\partial f}{\partial y}\frac{d^2y}{d\theta ^2}+\frac{\partial ^2 f}{\partial y^2}(\frac{dy}{d\theta})^2$$
$x=r\cos{\theta}$
$y=r\sin{\theta}$
$dx/d\theta=-r\sin{\theta}$
$dy/d\theta= r \cos{\theta}$
$$\frac{d^2z}{d\theta^2}=(\frac{\partial ^2f}{\partial x^2})(r^2\sin^2{\theta})+2\frac{\partial ^2f}{\partial x \partial y}(-r^2\sin{\theta}\cos{\theta})+\frac{\partial f}{\partial x}(-r\cos{\theta})+\frac{\partial f}{\partial y}(-r\sin{\theta})+\frac{\partial ^2f}{\partial y^2}(r^2\cos^2{\theta})$$
A: In my mind, the bulletproof way to calculate differential operators of transformations is the following:


*

*Write down the equality of the transformation:


$$z(r,\varphi)=f(r\cos(\varphi),r\sin(\varphi))$$


*Now you can simply differentiate twice and need not to worry about forgetting anything because nothing is 'hidden'


$$\frac{\partial z}{\partial\varphi}=f_x(r\cos(\varphi),r\sin(\varphi))(-r\sin(\varphi))+f_y(r\cos(\varphi),r\sin(\varphi))(r\cos(\varphi))$$
$$\frac{\partial^2 z}{\partial\varphi^2}=f_{xx}(r\cos(\varphi),r\sin(\varphi))(-r\sin(\varphi))^2-2f_{xy}(r\cos(\varphi),r\sin(\varphi))r^2\sin(\varphi)\cos(\varphi)-f_x(r\cos(\varphi),r\sin(\varphi))(r\cos(\varphi))+f_{yy}(r\cos(\varphi),r\sin(\varphi))(r\cos(\varphi))^2-f_y(r\cos(\varphi),r\sin(\varphi))(r\sin(\varphi))$$
A: I thought of a vector approach.
$z=f(x,y)$, find $d^2z/d\theta^2$.
$\frac{df}{d\theta}=\nabla f\cdot \frac{d\vec{s}}{d\theta}$
$\frac{d^2f}{d\theta^2}=\nabla(\nabla f\cdot \frac{d\vec{s}}{d\theta})\cdot \frac{d\vec{s}}{d\theta}$
We have the identity: $\nabla(\vec{A}\cdot \vec{B})=(\vec{A}\cdot \nabla)\vec{B}+(\vec{B}\cdot \nabla)\vec{A}+\vec{A}\times(\nabla \times \vec{B})+\vec{B}\times(\nabla \times \vec{A})$
So: $\frac{d^2f}{d\theta^2}=\frac{d\vec{s}}{d\theta}\cdot [ (\nabla f\cdot \nabla)\frac{d\vec{s}}{d\theta}+(\frac{d\vec{s}}{d\theta}\cdot \nabla)\nabla f+\nabla f\times(\nabla \times \frac{d\vec{s}}{d\theta})+\frac{d\vec{s}}{d\theta}\times(\nabla \times \nabla f)  ]$
This can be simplified some. By vector identity, $\nabla \times \nabla f =0.$
So:
$\frac{d^2f}{d\theta^2}=\frac{d\vec{s}}{d\theta}\cdot [ (\nabla f\cdot \nabla)\frac{d\vec{s}}{d\theta}+(\frac{d\vec{s}}{d\theta}\cdot \nabla)\nabla f+\nabla f\times(\nabla \times \frac{d\vec{s}}{d\theta})]$
$\frac{d\vec{s}}{d\theta}=<-r\sin{(\theta)}, r\cos{(\theta),0}>=<-y,x,0>$
$\nabla \times\frac{d\vec{s}}{d \theta}=<0,0,2>$
