MA101.21 Examples of the Chain Rule and Partial Differentiation

Example 1

$f=f(x,y), x=r\cos{\theta}, y=r\sin{\theta}$

Find $\displaystyle \frac{\partial{^2}{f}}{\partial{r^2}}$ and $\displaystyle \frac{\partial{^2}{f}}{\partial{\theta^2}}$

$\displaystyle \frac{\partial{f}}{\partial{r}} = \frac{\partial{f}}{\partial{x}}\cdot\frac{\partial{x}}{\partial{r}}+\frac{\partial{f}}{\partial{y}}\cdot\frac{\partial{y}}{\partial{r}}=\cos{\theta}\frac{\partial{f}}{\partial{x}}+\sin{\theta}\frac{\partial{f}}{\partial{y}}$

$\displaystyle \frac{\partial{f}}{\partial{\theta}} = \frac{\partial{f}}{\partial{x}}\cdot\frac{\partial{x}}{\partial{\theta}}+\frac{\partial{f}}{\partial{y}}\cdot\frac{\partial{y}}{\partial{\theta}}=-r\sin{\theta}\frac{\partial{f}}{\partial{x}}+r\cos{\theta}\frac{\partial{f}}{\partial{y}}$

So therefore:

$\displaystyle \frac{\partial}{\partial{r}}=\cos{\theta}\frac{\partial}{\partial{x}}+\sin{\theta}\frac{\partial}{\partial{y}}$

$\displaystyle \frac{\partial}{\partial{\theta}}=-r\sin{\theta}\frac{\partial}{\partial{x}}+r\cos{\theta}\frac{\partial}{\partial{y}}$

Now,

\displaystyle \begin{aligned} \frac{\partial{^2}{f}}{\partial{\theta^2}}&=\frac{\partial}{\partial{\theta}}\Big(\frac{\partial{f}}{\partial{\theta}}\Big)\\&=\frac{\partial}{\partial{\theta}}\Big(-r\sin{\theta}\frac{\partial{f}}{\partial{x}}+\cos{\theta}\frac{\partial{f}}{\partial{y}}\Big)\\&=-r\cos{\theta}\frac{\partial{f}}{\partial{x}}-r\sin{\theta}\frac{\partial}{\partial{\theta}}\Big(\frac{\partial{f}}{\partial{x}}\Big)-r\sin{\theta}\frac{\partial{f}}{\partial{y}}+\cos{\theta}\frac{\partial}{\partial{\theta}}\Big(\frac{\partial{f}}{\partial{y}}\Big)\\&=-r\cos{\theta}\frac{\partial{f}}{\partial{x}}-r\sin{\theta}\Big(-r\sin{\theta}\frac{\partial}{\partial{x}}+r\cos{\theta}\frac{\partial}{\partial{y}}\Big)\frac{\partial{f}}{\partial{x}}-r\sin{\theta}\frac{\partial{f}}{\partial{y}}+r\cos{\theta}\Big(-r\sin{\theta}\frac{\partial}{\partial{x}}+r\cos{\theta}\frac{\partial}{\partial{y}}\Big)\frac{\partial{f}}{\partial{y}}\\&=-r\cos{\theta}\frac{\partial{f}}{\partial{x}}+r^2\sin{^2}{\theta}\frac{\partial{^2}{f}}{\partial{x^2}}-r^2\sin{\theta}\cos{\theta}\frac{\partial{^2}{f}}{\partial{y}\partial{x}}-r\sin{\theta}\frac{\partial{f}}{\partial{y}}-r^2\sin{\theta}\cos{\theta}\frac{\partial{^2}{f}}{\partial{x}\partial{y}}+r^2\cos{^2}{\theta}\frac{\partial{^2}{f}}{\partial{y^2}}\\&=r^2\sin{^2}{\theta}\frac{\partial{^2}{f}}{\partial{x^2}}-2r^2\sin{\theta}\cos{\theta}\frac{\partial{^2}{f}}{\partial{x}\partial{y}}+r^2\cos{^2}{\theta}\frac{\partial{^2}{f}}{\partial{x^2}}-r\cos{\theta}\frac{\partial{f}}{\partial{x}}-r\sin{\theta}\frac{\partial{f}}{\partial{y}} \end{aligned}

\displaystyle \begin{aligned} \frac{\partial{^2}{f}}{\partial{r^2}} &= \frac{\partial}{\partial{r}}\Big(\frac{\partial{f}}{\partial{r}}\Big)=\frac{\partial}{\partial{r}}\Big(\cos{\theta}\frac{\partial{f}}{\partial{x}}+\sin{\theta}\frac{\partial{f}}{\partial{y}}\Big)\\&=\cos{\theta}\frac{\partial}{\partial{r}}\Big(\frac{\partial{f}}{\partial{x}}\Big)+\frac{\partial{f}}{\partial{x}}\cdot 0+\sin{\theta}\frac{\partial}{\partial{r}}\Big(\frac{\partial{f}}{\partial{y}}\Big)+\frac{\partial{f}}{\partial{y}}\cdot 0\\&=\cos{\theta}\Big(\cos{\theta}\frac{\partial}{\partial{x}}+\sin{theta}\frac{\partial}{\partial{y}}\Big)\Big(\frac{\partial{f}}{\partial{x}}\Big)+\sin{\theta}\Big(\cos{\theta}\frac{\partial}{\partial{x}}+\sin{\theta}\frac{\partial}{\partial{y}}\Big)\Big(\frac{\partial{f}}{\partial{y}}\Big)\\&=\cos{^2}{\theta}\frac{\partial{^2}{f}}{\partial{x^2}}+2\cos{\theta}\sin{\theta}\frac{\partial{^2}{f}}{\partial{x}\partial{y}}+\sin{^2}{\theta}\frac{\partial{^2}{f}}{\partial{y^2}} \end{aligned}

Note:

$\displaystyle \frac{\partial{^2}{f}}{\partial{r^2}}+\frac{1}{r}\frac{\partial{f}}{\partial{r}}+\frac{1}{r^2}\frac{\partial{^2}{f}}{\partial{r^2}}=\frac{\partial{^2}{f}}{\partial{x^2}}+\frac{\partial{^2}{f}}{\partial{y^2}}$

Example 2

$f(x,y)=\sin{x^2+y^2}, x=3t, y=\frac{1}{1+t^2}$

Find $\displaystyle \frac{df}{dt}$

We have,

\displaystyle \begin{aligned} \frac{df}{dt} &= \frac{\partial{f}}{\partial{x}}\cdot\frac{dx}{dt}+\frac{\partial{f}}{\partial{y}}\cdot\frac{dy}{dt}\\&=2x\cos{x^2+y^2}\cdot 3+2y\cos{x^2+y^2}((1-t^2)^{-2}\cdot 2t))\\&= 2\cdot3t\cdot\cos{\Big(9t^2+\frac{1}{(1+t^2)^2}\Big)}\cdot 3+2\cdot\frac{1}{1+t^2}\cos{\Big(9t^2+\frac{1}{(1+t^2)^2}\Big)}((1+t^2)^{-2}\cdot 2t \end{aligned}

This site uses Akismet to reduce spam. Learn how your comment data is processed.