how to use the chain rule in a multivariable function?

148 Views Asked by At

Problem: Let the function $f(x,y)=(x^2+y^2)\sin(x)$ where $x=r^2e^s$ and $y=rs$

Using the chain rule compute $\frac{\partial f}{\partial r}$ and $\frac{\partial f}{\partial s}$ and then compute $\frac{\partial^2 f}{\partial r^2}$, $\frac{\partial^2 f}{\partial s^2}$, $\frac{\partial^2 f}{\partial r \partial s}$ and $\frac{\partial^2 f}{\partial s \partial r}$

I do this:

Using 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 f}{\partial r}$$

$$\frac{\partial f}{\partial r}=[(x^2+y^2)\cos(x)+2x\sin(x)]2re^s+2y\sin(x)s$$

$$\frac{\partial f}{\partial s}=\frac{\partial f}{\partial x}\frac{\partial x}{\partial s}+\frac{\partial f}{\partial y}\frac{\partial f}{\partial s}$$

$$\frac{\partial f}{\partial s}= [(x^2+y^2)\cos(x)+2x\sin(x)]e^sr^2+2y\sin(x)r$$

is this right?

and I don't know how to compute the second-order partial derivatives, I need to use the chain rule?

1

There are 1 best solutions below

0
On

$\frac{\partial f}{\partial r}=\frac{\partial f}{\partial x}\frac{\partial x}{\partial r}+\frac{\partial f}{\partial y}\frac{\partial f}{\partial r}$ is wrong as 2nd terms is incorrect. It should be $\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}$. Calculation for first order partial derivatives are correct.

For the second order partial derivatives:(say, for $\frac{\partial ^2f} {\partial r^2}) $
Let $g(x, y) =\frac{\partial f} {\partial r} $ and you already have $x=r^2e^s,y=rs$. Now you only have to find $\frac{\partial g} {\partial r} $ just like you found $\frac{\partial f} {\partial r} $. Repeat the same process to find other derivatives also.