# Double Chain Rule for Partial Derivatives

I am suppose to apply chain rule again to the following to get $U_{rr}$:

$$U_r = f_x(\cos\theta) + f_y(\sin\theta)$$

I am not sure how to carry on, and is there a 'formula' for 2nd chain rule for partial derivative?

• please consider using LaTeX for formatting math equations. Sep 7, 2018 at 2:27
• It's very unclear what exactly you mean here. For example, what does $f_x(\cos\theta)$ mean: $f_x$ times $\cos\theta$ or $f_x$ of $\cos\theta$? Or what is $U$? Et cetera... Sep 7, 2018 at 3:38
• It could help to show how you obtained $U_r$ in the first place. Sep 7, 2018 at 3:54
• I have provided a general answer below, but as other people are saying, to help you in your specific case, you would want to provide more information. Sep 7, 2018 at 4:10

## 1 Answer

If we have a function $z(x,y)$, the general formula is:

$${\partial z\over\partial w}={\partial z\over\partial x}\cdot{\partial x\over\partial w}+{\partial z\over\partial y}\cdot{\partial y\over\partial w}$$

Next, there are couple possible cases:

If $x$ and $y$ are single-variable functions of $s$ and $t$ respectively, and $s$ and $t$ are single-variable functions of $w$, then:

Notice that:

$${\partial x\over\partial w}={\partial x\over\partial s}\cdot{\partial s\over\partial w}\;\;\text{and}\;\;{\partial y\over\partial w}={\partial y\over\partial t}\cdot{\partial t\over\partial w}$$

Note that this time we are not adding two terms together like in the general formula because $x$ and $y$ are just single variable functions of $s$ and $t$, which are single-variable functions too.

We now simply plug in ${\partial x\over\partial w}$ and ${\partial y\over\partial w}$ into the original chain rule equation, and we get:

$${\partial z\over\partial w}={\partial z\over\partial x}\cdot\Bigg({\partial x\over\partial s}\cdot{\partial s\over\partial w}\Bigg)+{\partial z\over\partial y}\cdot\Bigg({\partial y\over\partial t}\cdot{\partial t\over\partial w}\Bigg)$$

This is it, if $x$ and $y$ are themselves single variable functions, as well as $s$ and $t$.

If $x$ and $y$ are multivariate functions of single variate functions $(s_1,s_2)$ and $(t_1,t_2)$ respectively, then:

In this case, we get that:

$${\partial x\over\partial w}={\partial x\over\partial s_1}\cdot{\partial s_1\over\partial w}+{\partial x\over\partial s_2}\cdot{\partial s_2\over\partial w}$$ $${\partial y\over\partial w}={\partial y\over\partial t_1}\cdot{\partial t_1\over\partial w}+{\partial y\over\partial t_2}\cdot{\partial t_2\over\partial w}$$

Plugging it into the original equation we have:

$${\partial z\over\partial w}={\partial z\over\partial x}\cdot\Bigg({\partial x\over\partial s_1}\cdot{\partial s_1\over\partial w}+{\partial x\over\partial s_2}\cdot{\partial s_2\over\partial w}\Bigg)+{\partial z\over\partial y}\cdot\Bigg({\partial y\over\partial t_1}\cdot{\partial t_1\over\partial w}+{\partial y\over\partial t_2}\cdot{\partial t_2\over\partial w}\Bigg)$$

I could keep going on and on with cases, in fact the number of cases can be infinite, depending on the number of arguments of inside functions, etc..

But in any case you encounter, if need be, you can break down the general chain rule formula into separate inside functions, and turn those inside functions into chain rule formulas of their own, just like I did above.

Then you proceed with plugging in those formulas into the general formula, and you will arrive at a chain rule formula that is specific for your case.

To summarize, chain rules of multivariate functions, in which the inside functions are functions themselves, with their own number of arguments, can get very complex. For any specific case, the chain rule formula will look different, but can be derived step by step by process that I described above with two examples that I gave.