Let $f(x,y) = \sin{(x-y)}$, $x = r\cos{\theta}$, $y = r\sin{\theta}$ find $\frac{\text{d}f}{\text{d}θ}$ and $\frac{\text{d}^2f}{\text{d}r^2}$
Using chain rule I got:
$$\frac{\text{d}f}{\text{d}\theta}=\cos(x-y)(-r\sin(\theta))-\cos(x-y)(r\cos(\theta))$$
Which I believe gives me the answer of:
$$\frac{\text{d}f}{\text{d}θ} = -r\cos{(x-y)}(\sin\theta+\cos\theta)$$
On part II I'm much less confident but to start I plugged in:
$$x = r\cos(\theta) {\text{ and }} y = r\sin(\theta)$$
Which produced:
$$\cos(r\cos(\theta)-r\sin(\theta))(\cos(\theta)-\sin(\theta)$$
Taking the partial derivative w/ respect to $r$ of that produced:
$$\frac{\text{d}^2f}{\text{d}r^2} = -\sin(r\cos(\theta)-r\sin(\theta))(\cos(\theta)-\sin(\theta))$$
Is this correct? If not could you give me a hint about where I messed up? Thanks!
Part I is correct.
For Part II, as @Did mentioned, the $\cos(r(\cos\theta-\sin\theta))$ term is actually a composed function in the form $$s(r)=u(v(r))$$ So $$\frac{df}{dr}=A\cdot s(r)$$
where $$u(t)=\cos(t)$$ $$v(r)=r(\cos\theta-\sin\theta)$$ $$A=\cos\theta-\sin\theta$$
The derivative is thus given by \begin{align} \frac{d^2f}{dr^2}&=A\frac{ds}{dr}\\&=A\frac{ds}{du}\cdot\frac{dv}{dr}\\&=Ar\sin(r(\cos\theta-\sin\theta))\cdot(\cos\theta-\sin\theta)\\&=r\sin(r(\cos\theta-\sin\theta))\cdot(\cos\theta-\sin\theta)^2 \end{align}