# The chain rule (General version)

#### Petrus

##### Well-known member
Exempel 6: If $$\displaystyle g(s, t) = f(s^2-t^2, t^2-s^2)$$ and f is differentiable, show that g satisfies the equation
$$\displaystyle t\frac{dg}{ds}+s\frac{dg}{dt}=0$$
I always try solve it before I look 'soloution' so this is how we both did it. (remember this is a exempel in my book so they show how to solve it but they did not make any tree driagram etc.)
$$\displaystyle \frac{dg}{ds}=\frac{df}{dx}\frac{dx}{ds}+\frac{df}{dy}\frac{dy}{ds}=\frac{df}{dx}(2s)+\frac{df}{dy}(-2s)$$
$$\displaystyle \frac{dg}{dt}=\frac{df}{dx}\frac{dx}{dt}+\frac{df}{dy}\frac{dy}{dt}=\frac{df}{dx}(-2t)+\frac{df}{dy}(2t)$$
$$\displaystyle t\frac{dg}{ds}+s\frac{dg}{dt}=\frac{df}{dx}(2st)+ \frac{df}{dy}(-2st) - \frac{df}{dx}(2st)+\frac{df}{dy}(2st)=0$$
This is what I made extra cause I wanna be specefic. I wanna citat from my book:
"We got n variables ($$\displaystyle x_1,x_2,....x_n$$ (in this problem we got 2) and each of these $$\displaystyle x_j$$ is a differentiable function of the m vavariables $$\displaystyle t_1, t_2,.....,t_m$$ then u is a function of $$\displaystyle t_1,t_2,....,t_m$$ (in our it will be 2 if I understand correct but I strugle on that one)"
So now I did write about these note and got same answer as the soloution. Then I wanted to draw a 'tree driagram' and I did draw it like this, correct me if I do it wrong

Regards,

#### Sudharaka

##### Well-known member
MHB Math Helper
Exempel 6: If $$\displaystyle g(s, t) = f(s^2-t^2, t^2-s^2)$$ and f is differentiable, show that g satisfies the equation
$$\displaystyle t\frac{dg}{ds}+s\frac{dg}{dt}=0$$
I always try solve it before I look 'soloution' so this is how we both did it. (remember this is a exempel in my book so they show how to solve it but they did not make any tree driagram etc.)
$$\displaystyle \frac{dg}{ds}=\frac{df}{dx}\frac{dx}{ds}+\frac{df}{dy}\frac{dy}{ds}=\frac{df}{dx}(2s)+\frac{df}{dy}(-2s)$$
$$\displaystyle \frac{dg}{dt}=\frac{df}{dx}\frac{dx}{dt}+\frac{df}{dy}\frac{dy}{dt}=\frac{df}{dx}(-2t)+\frac{df}{dy}(2t)$$
$$\displaystyle t\frac{dg}{ds}+s\frac{dg}{dt}=\frac{df}{dx}(2st)+ \frac{df}{dy}(-2st) - \frac{df}{dx}(2st)+\frac{df}{dy}(2st)=0$$
This is what I made extra cause I wanna be specefic. I wanna citat from my book:
"We got n variables ($$\displaystyle x_1,x_2,....x_n$$ (in this problem we got 2) and each of these $$\displaystyle x_j$$ is a differentiable function of the m vavariables $$\displaystyle t_1, t_2,.....,t_m$$ then u is a function of $$\displaystyle t_1,t_2,....,t_m$$ (in our it will be 2 if I understand correct but I strugle on that one)"
So now I did write about these note and got same answer as the soloution. Then I wanted to draw a 'tree driagram' and I did draw it like this, correct me if I do it wrong View attachment 735

Regards,
Hi Petrus,

Not sure whether you still need to clarify this question but here goes. Everything is correct, except the chain rule for multivariable functions involve partial derivatives; so I would have written,

$\frac{\partial g}{\partial s}=\frac{\partial f}{\partial x}\frac{\partial x}{\partial s}+\frac{\partial f}{\partial y}\frac{\partial y}{\partial s}=2s\frac{\partial f}{dx}-2s\frac{\partial f}{\partial y}$

and so on. The tree diagram is also correct. A nice reference about the chain rule with similar kind of examples is,

Pauls Online Notes : Calculus III - Chain Rule

#### Petrus

##### Well-known member
Hi Petrus,

Not sure whether you still need to clarify this question but here goes. Everything is correct, except the chain rule for multivariable functions involve partial derivatives; so I would have written,

$\frac{\partial g}{\partial s}=\frac{\partial f}{\partial x}\frac{\partial x}{\partial s}+\frac{\partial f}{\partial y}\frac{\partial y}{\partial s}=2s\frac{\partial f}{dx}-2s\frac{\partial f}{\partial y}$

and so on. The tree diagram is also correct. A nice reference about the chain rule with similar kind of examples is,

Pauls Online Notes : Calculus III - Chain Rule
Hello Sudharaka,
Thanks once again for the help and taking your time! That link seems really good I will read about it when I got time and I will be back if I got any question!

Regards,
$$\displaystyle |\pi\rangle$$

#### Sudharaka

##### Well-known member
MHB Math Helper
Hello Sudharaka,
Thanks once again for the help and taking your time! That link seems really good I will read about it when I got time and I will be back if I got any question!

Regards,
$$\displaystyle |\pi\rangle$$