Find the partial derivatives ∂f/∂x and ∂f/∂y for f(r,θ)

95 Views Asked by At

Given $f(r, θ) = r^2\sinθ$, $x = r \cos θ$ and $y = r \sin θ$, how to compute $\frac{∂f}{∂x}$ and $\frac{∂f}{∂y}?$ This should be possible using the chain rule, but I'm not sure how to best calculate the separate partial derivatives, nor can I find a good resource on it.

3

There are 3 best solutions below

0
On

By the chain rule, $$\frac{\partial f}{\partial r}=\frac{\partial f}{\partial x}\frac{\partial x}{\partial r}+\frac{\partial f}{\partial y}\frac{\partial y}{\partial r}$$ and $$\frac{\partial f}{\partial \theta}=\frac{\partial f}{\partial x}\frac{\partial x}{\partial \theta}+\frac{\partial f}{\partial y}\frac{\partial y}{\partial \theta}.$$ In matrix form, $$\begin{pmatrix} \frac{\partial x}{\partial r} &\frac{\partial y}{\partial r}\\ \frac{\partial x}{\partial \theta} &\frac{\partial y}{\partial \theta}\end{pmatrix} \! \!\begin{pmatrix} \frac{\partial f}{\partial x} \\ \frac{\partial f}{\partial y} \end{pmatrix} = \begin{pmatrix} \frac{\partial f}{\partial r} \\ \frac{\partial f}{\partial \theta} \end{pmatrix}.$$ Thus $$ \begin{pmatrix} \frac{\partial f}{\partial x} \\ \frac{\partial f}{\partial y} \end{pmatrix} = \begin{pmatrix} \frac{\partial x}{\partial r} &\frac{\partial y}{\partial r}\\ \frac{\partial x}{\partial \theta} &\frac{\partial y}{\partial \theta}\end{pmatrix}^{-1} \begin{pmatrix} \frac{\partial f}{\partial r} \\ \frac{\partial f}{\partial \theta} \end{pmatrix}.$$ For the final result, replace $r \cos \theta$ by $x$ and $r \sin \theta$ by $y.$

0
On

The 'trick' stated by @HappyDay seems to be the best choice: $$ f = r^2 \sin \theta = ry $$ Thus $$\frac{\partial f}{\partial x} =\frac{\partial r}{\partial x}y =\frac{x}{r}y $$ and $$\frac{\partial f}{\partial y} =\frac{\partial r}{\partial y}y + r =\frac{y}{r}y + r $$

0
On

First, calculate the coordinate differentials $$\eqalign{ \def\m#1{\left[\begin{array}{r}#1\end{array}\right]} \def\v#1{\begin{Bmatrix}#1\end{Bmatrix}} \def\t{\theta} \def\c{\cos\t\,} \def\s{\sin\t\,} \def\cc{\cos^2\!\t\,} \def\ss{\sin^2\!\t\,} \def\qiq{\quad\implies\quad} x &= r\c &\qiq dx = \c\,dr -\s\,(r\,d\t) \\ y &= r\s &\qiq dy = \s\,dr +\c\,(r\,d\t) \\ }$$

$$\eqalign{ \v{dx\\dy} &= \m{\c&-\s \\ +\s&\c}\cdot\v{dr\\r\,d\t} \\ \\ \v{dr\\r\,d\t} &= \m{\c&+\s \\ -\s&\c}\cdot\v{dx\\dy} \\ }$$ $$\eqalign{ dr &= \c\,dx + \s\,dy \\ r\,d\t &= \c\,dy -\s\,dx\quad \\ }$$

Then differentiate the function $$\eqalign{ \def\LR#1{\left(#1\right)} \def\a#1{\color{red}{#1}} \def\b#1{\color{blue}{#1}} \def\CLR#1{\a{\LR{#1}}} \def\BLR#1{\b{\LR{#1}}} \def\p{\partial} \def\grad#1#2{\frac{\p #1}{\p #2}} f &= r^2\s \\ df &= \s\LR{2r\,dr} + r^2\LR{\c d\t} \\ &= 2r\s\,\a{dr} + r\c\,\b{r\,d\t} \\ &= 2r\s\,\CLR{\c\,dx + \s\,dy} + r\c\,\BLR{\c\,dy -\s\,dx} \\ &= \LR{r\c\s}\,dx \;+\; \LR{r+r\ss}\,dy \\ \grad{f}{x} &= r\c\s, \quad \grad{f}{y} = r+r\ss \\ }$$