• Support PF! Buy your school textbooks, materials and every day products Here!

Help explaining the chain rule please

  • #1

Homework Statement:

Given these two statements:
y =v(x,t)
v(x(s,t),t) = y(s,t)
find:


second partial derivative of y in respects to t

Relevant Equations:

chain rule
I had already calculated the first partial derivative to equal the following:
$$\frac{\partial y}{\partial t} = \frac{\partial v}{\partial x} \frac{\partial x}{\partial t} + \frac{\partial v}{\partial t}$$
Now the second partial derivative I can use the chain rule to do and get to:
$$\frac{\partial^2 y}{\partial t^2} = \frac{\partial}{\partial t} \frac{\partial v}{\partial x} \frac{\partial x}{\partial t} + \frac{\partial v}{\partial x} \frac{\partial}{\partial t} \frac{\partial x}{\partial t} + \frac{\partial^2 v}{\partial t^2}$$
How would I continue? I can easily perform the last too terms:
$$\frac{\partial v}{\partial x} \frac{\partial}{\partial t} \frac{\partial x}{\partial t} = \frac{\partial v}{\partial x} \frac{\partial^2 x}{\partial t^2} $$
and
$$\frac{\partial}{\partial t } \frac{\partial v}{\partial t} = \frac{\partial^2 v}{\partial t^2} $$
How would I perform the first term? Again:

$$y =v(x,t)$$
$$v(x(s,t),t) = y(s,t)$$
 

Answers and Replies

  • #2
Cryo
Gold Member
173
73
You could begin by adopting a more rigorous notation. In physics, one often sloppyly uses the same name for functions that give the same quantity, but are parameterized by different variables. Here you need to be more rigorous

Lets start with ##y=v\left(x,t\right)##. Are you interested in ##\frac{\partial^2 y}{\partial t^2}##? Be more rigorous and specify not only what is varied, but also what is fixed. So you want:

##\left(\frac{\partial^2 y}{\partial t^2}\right)_{x}##

Next, you introduce an additional relationship: ##x=x\left(s, t\right)##. This relationship would not change

##\left(\frac{\partial^2 y}{\partial t^2}\right)_{x}##

because ##x=const## there by definition. But then you also introduce ##\tilde{y}\left(s,t\right)=v\left(x\left(s, t\right), t\right)##. Note that I introduced a different name for ##\tilde{y}## since it is a *different* function, though physically it may give you the same quantity. You could now define:

##\left(\frac{\partial^2 \tilde{y}}{\partial t^2}\right)_{s}##

So which partial derivative do you want ##\left(\frac{\partial^2 \tilde{y}}{\partial t^2}\right)_{s}## or ##\left(\frac{\partial^2 y}{\partial t^2}\right)_{x}##?
 
  • Like
Likes PeroK
  • #3
I am not too sure as the book does not specify but I will guess that s must stay constant.
 
  • #4
Cryo
Gold Member
173
73
So then it becomes easy:

##\left(\frac{\partial^2 \tilde{y}}{\partial t^2}\right)_s=\left(\frac{\partial^2 v\left(x\left(s, t\right), t\right)}{\partial t^2}\right)_s##

Now simply apply the chain rule twice. I am happy to check your work, but you will have to do it. If this is a question you have to hand in for marking, I would provide answers for both options (keeping ##s## or ##x## fixed). It is not your fault the question is ambiguous.
 
  • #5
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
13,506
5,991
I am not too sure as the book does not specify but I will guess that s must stay constant.
What @Cryo is saying is included in my insight on the chain rule, which you may be interested in:

https://www.physicsforums.com/insights/demystifying-chain-rule-calculus/
In terms of this problem I would note that (and this is also in the above link) partial derivatives are functions too. In this case you have that ##v(x, t)## is a function of two variable. The partial derivative ##\frac{\partial v}{\partial x}## is also a function of two variables. So, you could let:

##f(x, t) = \frac{\partial v}{\partial x}(x, t)##

Which emphasises that you have just another function here. And, in fact, using @Cryo's notation you have here:

##\tilde{f}(s, t) = \frac{\partial v}{\partial x}(x(s, t), t)##

Now you can perform the same chain rule on ##\tilde{f}## as you did on the the original function.
 
  • Like
Likes Cryo
  • #6
So then it becomes easy:

##\left(\frac{\partial^2 \tilde{y}}{\partial t^2}\right)_s=\left(\frac{\partial^2 v\left(x\left(s, t\right), t\right)}{\partial t^2}\right)_s##

Now simply apply the chain rule twice. I am happy to check your work, but you will have to do it. If this is a question you have to hand in for marking, I would provide answers for both options (keeping ##s## or ##x## fixed). It is not your fault the question is ambiguous.
It isnt homework, I am trying to learn partial derivatives via a book by a Weinberger. I already know the answer though, it is in the book. I will attempt what you told me to do.
 
  • #7
Cryo
Gold Member
173
73
I am trying to learn partial derivatives via a book by a Weinberger.
Funnily enough, it is this type of excersize, i.e. two sets of coordinates ##\{s,\,t\}## and ##\{x,\,t\}## with one shared variable, that made me sort out partial differentiation in my head.

The mantra I remembered is that partial differentiation is more about what you keep fixed, than what you change (to differentiate), so if you encounter such problems, always be clear what is being kept fixed.

Another trick I found useful is to define shared variable to be different, i.e. you have two coordinate systems ##\{s,\,t\}## and ##\{x,\,t\}##, but nothing is stopping you from defining ##\{s,\,t\}\to \{s,\,\tilde{t}\}##, and then enforcing the constraint ##t=\tilde{t}## later on, so then:

##\left(\frac{\partial f}{\partial t}\right)_x=\left(\frac{\partial \tilde{t}}{\partial t}\right)_x\left(\frac{\partial f}{\partial \tilde{t}}\right)_s + \left(\frac{\partial s}{\partial t}\right)_x\left(\frac{\partial f}{\partial s}\right)_\tilde{t}##

but now ##\tilde{t}=t## and ##\left(\frac{\partial \tilde{t}}{\partial t}\right)_x=1##, so:


##\left(\frac{\partial f}{\partial t}\right)_x=\left(\frac{\partial f}{\partial t}\right)_s + \left(\frac{\partial s}{\partial t}\right)_x\left(\frac{\partial f}{\partial s}\right)_t##

Which is basically what you had in the original post
 
Last edited:
  • #8
So then it becomes easy:

##\left(\frac{\partial^2 \tilde{y}}{\partial t^2}\right)_s=\left(\frac{\partial^2 v\left(x\left(s, t\right), t\right)}{\partial t^2}\right)_s##

Now simply apply the chain rule twice. I am happy to check your work, but you will have to do it. If this is a question you have to hand in for marking, I would provide answers for both options (keeping ##s## or ##x## fixed). It is not your fault the question is ambiguous.

I am having trouble performing this. Hopefully you can help me further.

I have the following:
$$\frac{\partial v}{\partial x} \frac{\partial x}{\partial t} + \frac{\partial v}{\partial t} $$
I will now attempt to take the partial derivative of this term in respect to t. Lets start with the second part since it is easier, namely:
$$\frac{\partial v}{\partial t} _s $$
The chain rule, by the way I understand it, is the following:
1. The derivative of the outside, times the inside.
Plus
2. The outside times the derivative of the inside.
So I will perform these two steps, the first one:
$$\frac{\partial}{\partial t}\frac{\partial}{\partial t}v(x(s,t),t) = (\frac{\partial^2 v}{\partial t^2})_s$$
Now I need to sum this by step 2 which is equal to:
$$ (\frac{\partial}{\partial t})(\frac{\partial v}{\partial t}) = (\frac{\partial}{\partial t})(\frac{\partial v}{\partial x})(\frac{\partial x}{\partial t}) = \frac{\partial^2 v}{\partial x\partial t}\frac{\partial x}{\partial t} $$
Summing what i got for step one and two i get:
$$\frac{\partial^2 v}{\partial t^2} +\frac{\partial^2 v}{\partial x\partial t}\frac{\partial x}{\partial t}$$
What did i do wrong?
 
  • #9
Cryo
Gold Member
173
73
You started well and then you dropped all the rigour which created confusion. Partial derivatives are specific to a coordinate system and you need to keep track of what is fixed. So let us make it explicit. We have two coordinate systems ##\{x,\tilde{t}\}## and ##\{s,t\}## and we also have ##\tilde{t}=t##, so ##\left(\frac{\partial \tilde{t}}{\partial t}\right)_s=1## and ##\left(\frac{\partial \tilde{t}}{\partial s}\right)_t=0##. [I did it for ##f## not ##v##, too late to correct now]

Now lets take a derivative of a generic function ##f=f\left(x,\tilde{t}\right)##:

##\left(\frac{\partial f}{\partial t}\right)_s=\left(\frac{\partial x}{\partial t}\right)_s \left(\frac{\partial f}{\partial x}\right)_\tilde{t} + \left(\frac{\partial \tilde{t}}{\partial t}\right)_s \left(\frac{\partial f}{\partial \tilde{t}}\right)_x=\left(\frac{\partial x}{\partial t}\right)_s \left(\frac{\partial f}{\partial x}\right)_\tilde{t} + \left(\frac{\partial f}{\partial \tilde{t}}\right)_x##

So far similar to yours, but I kept the subscripts of what is fixed, which allows me to keep track of the coordinate system in use.

The second derivative is applied the same way (use the product rule):

##\left(\frac{\partial \left(\frac{\partial f}{\partial t}\right)_s}{\partial t}\right)_s=\left(\frac{\partial \left(\frac{\partial x}{\partial t}\right)_s}{\partial t}\right)_s \left(\frac{\partial f}{\partial x}\right)_\tilde{t} + \left(\frac{\partial x}{\partial t}\right)_s \left(\frac{\partial \left(\frac{\partial f}{\partial x}\right)_\tilde{t}}{\partial t}\right)_s + \left(\frac{\partial \left(\frac{\partial f}{\partial \tilde{t}}\right)_x}{\partial t}\right)_s##

So here it is already different from:

Now I need to sum this by step 2 which is equal to
Since I have three terms

Let's consider just the last term. I will now use the following notation ##\left(\frac{\partial f}{\partial x}\right)_\tilde{t}=\frac{\partial f}{\partial x_{\tilde{t}}}##

## \left(\frac{\partial \left(\frac{\partial f}{\partial \tilde{t}}\right)_x}{\partial t}\right)_s=\frac{\partial x}{\partial t_s}\frac{\partial^2 f}{\partial x_\tilde{t} \partial \tilde{t}_x} + \frac{\partial \tilde{t}}{\partial t_s}\frac{\partial^2 f}{\partial \tilde{t}_x \partial \tilde{t}_x}##

Now we can drop the extra notation (because we are at the end):

## \left(\frac{\partial \left(\frac{\partial f}{\partial \tilde{t}}\right)_x}{\partial t}\right)_s=\frac{\partial x\left(s,t\right)}{\partial t}\frac{\partial^2 f\left(x,t\right)}{\partial t \partial x } + \frac{\partial^2 f\left(x,t\right)}{\partial t^2}##

Which is similar to yours, but there are two more terms to consider
 
  • #10
You started well and then you dropped all the rigour which created confusion. Partial derivatives are specific to a coordinate system and you need to keep track of what is fixed. So let us make it explicit. We have two coordinate systems ##\{x,\tilde{t}\}## and ##\{s,t\}## and we also have ##\tilde{t}=t##, so ##\left(\frac{\partial \tilde{t}}{\partial t}\right)_s=1## and ##\left(\frac{\partial \tilde{t}}{\partial s}\right)_t=0##. [I did it for ##f## not ##v##, too late to correct now]

Now lets take a derivative of a generic function ##f=f\left(x,\tilde{t}\right)##:

##\left(\frac{\partial f}{\partial t}\right)_s=\left(\frac{\partial x}{\partial t}\right)_s \left(\frac{\partial f}{\partial x}\right)_\tilde{t} + \left(\frac{\partial \tilde{t}}{\partial t}\right)_s \left(\frac{\partial f}{\partial \tilde{t}}\right)_x=\left(\frac{\partial x}{\partial t}\right)_s \left(\frac{\partial f}{\partial x}\right)_\tilde{t} + \left(\frac{\partial f}{\partial \tilde{t}}\right)_x##

So far similar to yours, but I kept the subscripts of what is fixed, which allows me to keep track of the coordinate system in use.

The second derivative is applied the same way (use the product rule):

##\left(\frac{\partial \left(\frac{\partial f}{\partial t}\right)_s}{\partial t}\right)_s=\left(\frac{\partial \left(\frac{\partial x}{\partial t}\right)_s}{\partial t}\right)_s \left(\frac{\partial f}{\partial x}\right)_\tilde{t} + \left(\frac{\partial x}{\partial t}\right)_s \left(\frac{\partial \left(\frac{\partial f}{\partial x}\right)_\tilde{t}}{\partial t}\right)_s + \left(\frac{\partial \left(\frac{\partial f}{\partial \tilde{t}}\right)_x}{\partial t}\right)_s##

So here it is already different from:



Since I have three terms

Let's consider just the last term. I will now use the following notation ##\left(\frac{\partial f}{\partial x}\right)_\tilde{t}=\frac{\partial f}{\partial x_{\tilde{t}}}##

## \left(\frac{\partial \left(\frac{\partial f}{\partial \tilde{t}}\right)_x}{\partial t}\right)_s=\frac{\partial x}{\partial t_s}\frac{\partial^2 f}{\partial x_\tilde{t} \partial \tilde{t}_x} + \frac{\partial \tilde{t}}{\partial t_s}\frac{\partial^2 f}{\partial \tilde{t}_x \partial \tilde{t}_x}##

Now we can drop the extra notation (because we are at the end):

## \left(\frac{\partial \left(\frac{\partial f}{\partial \tilde{t}}\right)_x}{\partial t}\right)_s=\frac{\partial x\left(s,t\right)}{\partial t}\frac{\partial^2 f\left(x,t\right)}{\partial t \partial x } + \frac{\partial^2 f\left(x,t\right)}{\partial t^2}##

Which is similar to yours, but there are two more terms to consider



I arrive to your conclusion but I do not think I arrive correctly, can you help me once more?

I am given:
## \left(\frac{\partial \left(\frac{\partial f}{\partial \tilde{t}}\right)_x}{\partial t}\right)_s##
I will begin by using the chain rule on the "inside" portion, namely:
$$\frac{\partial f}{\partial \tilde{t}}_x = (\frac{\partial f}{\partial x})_x(\frac{\partial x}{\partial \tilde{t}})_x + (\frac{\partial f}{\partial \tilde{t}})_x$$
Now all of the terms on the right should have x as non-changing because the term on the left has x as stationary right?
If this is true then I can move on to the next portion which is plugging in what we just obtained into the first equation mentioned here, thus:

## \left(\frac{\partial \left(\frac{\partial f}{\partial \tilde{t}}\right)_x}{\partial t}\right)_s = \Bigg[\frac{\partial}{\partial t} \Big[(\frac{\partial f}{\partial x})_x(\frac{\partial x}{\partial \tilde{t}})_x+(\frac{\partial f}{\partial \tilde{t}})_x \Big]\Bigg]_s##

which then equals to
## = \frac{\partial x}{\partial t} \frac{\partial^2 f}{\partial t \partial x} + \frac{\partial^2 f}{\partial t^2}##

did i follow on correctly?
 
  • #11
Cryo
Gold Member
173
73
I am given:
(∂(∂f∂~t)x∂t)s \left(\frac{\partial \left(\frac{\partial f}{\partial \tilde{t}}\right)_x}{\partial t}\right)_s
I will begin by using the chain rule on the "inside" portion, namely:

∂f∂~tx=(∂f∂x)x(∂x∂~t)x+(∂f∂~t)x​
I think problems start here. What is the point of this line? ##f=f\left(x,\tilde{t}\right)## so ##\frac{\partial f}{\partial \tilde{t}_x}## is already the simplest derivative you can have. Also, ##\frac{\partial x}{\partial \tilde{t}_x}=0## identically, by definition. So all you do here is state ##\frac{\partial f}{\partial \tilde{t}_x}=\frac{\partial f}{\partial \tilde{t}_x}##

Then we move onto:

##\frac{\partial }{\partial t_s} \, \frac{\partial f}{\partial \tilde{t}_x} ##

To evaluate it simply re-write ##\frac{\partial }{\partial t_s} ##. Currently it is for ##\{s,t\}## coordinates. Re-write it for ##\{x,\tilde{t}\}## coordinates:

##\frac{\partial }{\partial t_s} = \frac{\partial x}{\partial t_s} \frac{\partial }{\partial x_\tilde{t}} + \frac{\partial \tilde {t}}{\partial t_s} \frac{\partial }{\partial \tilde{t}_x} = \frac{\partial x}{\partial t_s} \frac{\partial }{\partial x_\tilde{t}} + \frac{\partial }{\partial \tilde{t}_x} ##

So

##\frac{\partial }{\partial t_s} \, \frac{\partial f}{\partial \tilde{t}_x} = \frac{\partial x}{\partial t_s} \frac{\partial^2 f }{\partial x_\tilde{t}\partial \tilde{t}_x} + \frac{\partial^2 f }{\partial \tilde{t}_x^2} ##

It would seem our final results match, but I think this is only because you have conviently dropped the subscripts and tildes too early.
 
  • #12
I think problems start here. What is the point of this line? ##f=f\left(x,\tilde{t}\right)## so ##\frac{\partial f}{\partial \tilde{t}_x}## is already the simplest derivative you can have. Also, ##\frac{\partial x}{\partial \tilde{t}_x}=0## identically, by definition. So all you do here is state ##\frac{\partial f}{\partial \tilde{t}_x}=\frac{\partial f}{\partial \tilde{t}_x}##

Then we move onto:

##\frac{\partial }{\partial t_s} \, \frac{\partial f}{\partial \tilde{t}_x} ##

To evaluate it simply re-write ##\frac{\partial }{\partial t_s} ##. Currently it is for ##\{s,t\}## coordinates. Re-write it for ##\{x,\tilde{t}\}## coordinates:

##\frac{\partial }{\partial t_s} = \frac{\partial x}{\partial t_s} \frac{\partial }{\partial x_\tilde{t}} + \frac{\partial \tilde {t}}{\partial t_s} \frac{\partial }{\partial \tilde{t}_x} = \frac{\partial x}{\partial t_s} \frac{\partial }{\partial x_\tilde{t}} + \frac{\partial }{\partial \tilde{t}_x} ##

So

##\frac{\partial }{\partial t_s} \, \frac{\partial f}{\partial \tilde{t}_x} = \frac{\partial x}{\partial t_s} \frac{\partial^2 f }{\partial x_\tilde{t}\partial \tilde{t}_x} + \frac{\partial^2 f }{\partial \tilde{t}_x^2} ##

It would seem our final results match, but I think this is only because you have conviently dropped the subscripts and tildes too early.
I understand more clearly now. I still need a lot more practicing to do. Thank you for everything Cryo!
 
  • #13
Cryo
Gold Member
173
73

Related Threads on Help explaining the chain rule please

Replies
1
Views
2K
  • Last Post
Replies
1
Views
808
Replies
6
Views
3K
  • Last Post
Replies
4
Views
11K
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
2
Views
757
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
7
Views
2K
  • Last Post
Replies
17
Views
2K
Top