I Chain Rule in Multiple Variables

cwill53
Messages
220
Reaction score
40
TL;DR Summary
I need help understanding the chain rule.
The following link leads to a question I asked on the mathematics Stack Exchange site.

https://math.stackexchange.com/ques...s/3791017?noredirect=1#comment7809514_3791017

I want to understand how the chain rule works, and what exactly the person who answered my question was saying. I haven't taken analysis and I know very little linear algebra, so it went over my head.
 
Physics news on Phys.org
jedishrfu said:
Rather than discuss a Stack Exchange article, perhaps a more down-to-earth tutorial would be better:

https://tutorial.math.lamar.edu/classes/calciii/chainrule.aspx

or this video from Khan Academy:

https://www.khanacademy.org/math/mu...ariable-chain-rule/v/multivariable-chain-rule
It's not a stack exchange article, it's a specific question I have about how the chain rule changes if I have a function composed of different variables, where each variable is composed of its own set of variables.

My question is, how does the chain rule change when say

f = f(x,y) and x = x(u,v) and y = y(u,b)?

The variabes x and y are both functions of the variable u, but x is also a function of v while y is a function of b.

How about if say f = f(x,y) and x = x(u,v) while y = y(a,b)?

Now f depends on x and y but x and y depend on a completely different set of variables.
 
cwill53 said:
Summary:: I need help understanding the chain rule.

The following link leads to a question I asked on the mathematics Stack Exchange site.

https://math.stackexchange.com/ques...s/3791017?noredirect=1#comment7809514_3791017

I want to understand how the chain rule works, and what exactly the person who answered my question was saying. I haven't taken analysis and I know very little linear algebra, so it went over my head.
To answer your specific question. If you have ##f = f(x, y)## then you are defining ##f## as a function of two variables. There is some implicit rule for taking an ordered pair ##(x, y)## and outputing a number ##f(x, y)##.

If additionally you define ##x = x(u, v)## and ##y = y(a, b)##, you have two additional functions of two variables. We now have three different functions of two variables. This allows us to define a function of four variables (let's call it ##g##) where: ##g(u, v, a, b) = f(x(u, v), y(a, b))##.

The function ##g##, like any function of four variables, has four partial derivatives:
$$\frac{\partial g}{\partial u} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial u}, \ \ \frac{\partial g}{\partial v} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial v}, \ \ \frac{\partial g}{\partial a} = \frac{\partial f}{\partial y}\frac{\partial y}{\partial a}, \ \ \frac{\partial g}{\partial b} = \frac{\partial f}{\partial y}\frac{\partial y}{\partial b}$$
The next thing you should do is to test this out with an example. E.g.
$$f(x, y) = \cos(x)\sin(y), \ \ x(u, v) = 2u + 3v, \ \ y(a.b) = 2a^2 + b^3$$ which gives
$$g(u, v, a, b) = \cos(2u + 3v)\sin(2a^2 + b^3)$$
You can partially differentiate ##g## directly and then check the partial derivatives match the above formulas.

You may also be interested in these Insights on the multivariable chain rule:

https://www.physicsforums.com/insights/demystifying-chain-rule-calculus/

https://www.physicsforums.com/insights/how-to-solve-second-order-partial-derivatives/
 
  • Like
Likes hutchphd, etotheipi, cwill53 and 1 other person
PeroK said:
To answer your specific question. If you have ##f = f(x, y)## then you are defining ##f## as a function of two variables. There is some implicit rule for taking an ordered pair ##(x, y)## and outputing a number ##f(x, y)##.

If additionally you define ##x = x(u, v)## and ##y = y(a, b)##, you have two additional functions of two variables. We now have three different functions of two variables. This allows us to define a function of four variables (let's call it ##g##) where: ##g(u, v, a, b) = f(x(u, v), y(a, b))##.

The function ##g##, like any function of four variables, has four partial derivatives:
$$\frac{\partial g}{\partial u} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial u}, \ \ \frac{\partial g}{\partial v} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial v}, \ \ \frac{\partial g}{\partial a} = \frac{\partial f}{\partial y}\frac{\partial y}{\partial a}, \ \ \frac{\partial g}{\partial b} = \frac{\partial f}{\partial y}\frac{\partial y}{\partial b}$$
The next thing you should do is to test this out with an example. E.g.
$$f(x, y) = \cos(x)\sin(y), \ \ x(u, v) = 2u + 3v, \ \ y(a.b) = 2a^2 + b^3$$ which gives
$$g(u, v, a, b) = \cos(2u + 3v)\sin(2a^2 + b^3)$$
You can partially differentiate ##g## directly and then check the partial derivatives match the above formulas.

You may also be interested in these Insights on the multivariable chain rule:

https://www.physicsforums.com/insights/demystifying-chain-rule-calculus/

https://www.physicsforums.com/insights/how-to-solve-second-order-partial-derivatives/
This was perfect! I understood it all. Thank you so much.
 
  • Like
Likes PeroK
Back
Top