# 2nd total derivative

## Homework Statement:

If u = f(x,y) and x=x(t) and y=y(t) then find the 2nd total derivative of u with respect to t

## Relevant Equations:

chain rule
du/dt = (∂f/∂x)(dx/dt) + (∂f/∂y)(dy/dt)
So i write the operator as
d/dt = (dx/dt)(∂/∂x) + (dy/dt)(∂/∂y) and apply it to du/dt ; in the operator it is the partial derivative that acts on du/dt which involves using the product rule.
I am having a problem with the term involving (∂/∂x) (dx/dt) ; dx/dt is a function of t only so i can't figure out what the partial derivative is

Related Calculus and Beyond Homework Help News on Phys.org
anuttarasammyak
Gold Member
$$\frac{\partial}{\partial x}\frac{dx}{dt}=0$$
since dx/dt is not a function of x but t.
$$\frac{\partial}{\partial x}\frac{\partial u}{\partial x}=\frac{\partial^2 u}{\partial x^2}$$
$$\frac{\partial}{\partial x}\frac{\partial u}{\partial y}=\frac{\partial}{\partial y}\frac{\partial u}{\partial x}=\frac{\partial^2 u}{\partial x \partial y}$$

Thank you. You have confirmed what i thought but the answer i have written down in front of me includes 2 terms that i cannot see where they came from
(∂u/∂x) (d2x/dt2) + (∂u/∂y) (d2y/dt2)

Office_Shredder
Staff Emeritus
Gold Member
It would probably help if you just wrote step by step what you did to get your answer

((dx/dt)(∂/∂x) + (dy/dt)(∂/∂y)) ((∂u/∂x)(dx/dt) + (∂u/∂y)(dy/dt))

= (dx/dt)2(∂2u/∂x2) + 2 (∂u/∂x∂y )(dx/dt)(dy/dt) + (dy/dt)2(∂2u/∂y2)

That is the answer i get. But the anwer i have found includes the 2 terms mentioned in #3. I cannot see where they come from

PeroK
Homework Helper
Gold Member
((dx/dt)(∂/∂x) + (dy/dt)(∂/∂y)) ((∂u/∂x)(dx/dt) + (∂u/∂y)(dy/dt))

= (dx/dt)2(∂2u/∂x2) + 2 (∂u/∂x∂y )(dx/dt)(dy/dt) + (dy/dt)2(∂2u/∂y2)

That is the answer i get. But the anwer i have found includes the 2 terms mentioned in #3. I cannot see where they come from
You need to write this out properly:
$$u = f(x(t), y(t))$$
$$\frac{du}{dt}= \frac{\partial f}{\partial x}x'(t) + \dots$$
Now, to avoid any missed steps, replace the partial derivatives with funtions of ##x(t), y(t)##. Because that's what they are. So you have:
$$\frac{du}{dt} = g(x(t), y(t))x'(t) + h(x(t), y(t))y'(t)$$
Now, differentiate that wrt ##t## and you'll get everything.

Delta2
But the partial derivatives in the operator acting on du/dt in #5 are ∂/∂x and ∂/∂y so when they act on dx/dt and dy/dt they give zero because dx/dt and dy/dt are both only functions of t

PeroK
Homework Helper
Gold Member
But the partial derivatives in the operator acting on du/dt in #5 are ∂/∂x and ∂/∂y so when they act on dx/dt and dy/dt they give zero because dx/dt and dy/dt are both only functions of t
##u## is a function of ##t## only. ##u## is a single variable function and the "total" derivative under the covers is the plain old ordinary derivative of ##u(t)##.

Whatever applies to ##u## applies to ##du/dt##.

vela
Staff Emeritus
Homework Helper
You need to include a ##\partial/\partial t## in because you have an explicit dependence on ##t## now from ##x'(t)## and ##y'(t)##.
$$\frac d{dt} = \frac {dx}{dt}\frac \partial{\partial x} + \frac {dy}{dt}\frac \partial{\partial y} + \frac \partial{\partial t}$$

((dx/dt)(∂/∂x) + (dy/dt)(∂/∂y)) ((∂u/∂x)(dx/dt) + (∂u/∂y)(dy/dt))

= (dx/dt)2(∂2u/∂x2) + 2 (∂u/∂x∂y )(dx/dt)(dy/dt) + (dy/dt)2(∂2u/∂y2)

That is the answer i get. But the anwer i have found includes the 2 terms mentioned in #3. I cannot see where they come from
I'm getting confused now. I will apply the 1st term in the left hand operator bracket to the right hand bracket and show what i get using the product rule of differentiation

((dx/dt)(∂/∂x)) ((∂u/∂x)(dx/dt) + (∂u/∂y)(dy/dt))

= (dx/dt)2(∂2u/∂x2) + (dx/dt)(∂u/∂x) (∂/∂x)(dx/dt) + (dx/dt)(dy/dt) (∂2u/∂x∂y) + (dx/dt)(∂u/∂y) (∂/∂x) (dy/dt)

I get the 2nd and 4th terms to be zero as (∂/∂x) ( dx/dt) and (∂/∂x) (dy/dt) are zero as in the post above #2

PeroK
Homework Helper
Gold Member
I get the 2nd and 4th terms to be zero as (∂/∂x) ( dx/dt) and (∂/∂x) (dy/dt) are zero as in the post above #2
It doesn't matter how many times you assert this. It's as wrong now as it was in post #2.

vela
Staff Emeritus
Homework Helper
I'm getting confused now. I will apply the 1st term in the left hand operator bracket to the right hand bracket and show what i get using the product rule of differentiation

((dx/dt)(∂/∂x)) ((∂u/∂x)(dx/dt) + (∂u/∂y)(dy/dt))
It doesn't make sense to do this to differentiate wrt ##t## because ##x'(t)## is a function of ##t##. Instead, you can look at the problem this way:
\begin{align*}
\frac{d}{dt} \left(\frac{\partial u}{\partial x} \frac{dx}{dt}\right)
&= \left(\frac{d}{dt} \frac{\partial u}{\partial x}\right)\frac{dx}{dt} + \frac{\partial u}{\partial x} \left(\frac{d}{dt}\frac{dx}{dt}\right) \\
&= \left[\left(\frac{dx}{dt}\frac{\partial}{\partial x} + \frac{dy}{dt}\frac{\partial}{\partial y}\right) \frac{\partial u}{\partial x}\right]\frac{dx}{dt} + \frac{\partial u}{\partial x}\frac{d^2 x}{dt^2}
\end{align*}
Another way is to recognize that while ##u=f(x,y)## is a function of ##x## and ##y##, its derivative ##du/dt = g(t,x,y)## is a function of ##x##, ##y##, and ##t##. For example, if ##u=x^2+y##, ##x = \cos t##, and ##y=\sin t##, then
$$\frac{du}{dt} = 2x(-\sin t) + \cos t.$$ Since ##t## appears explicitly in ##u'##, you can't omit the ##\partial/\partial t## term in the total derivative that you could when differentiating ##u##.

dyn
PeroK
Homework Helper
Gold Member
Another way is to recognize that while ##u=f(x,y)## is a function of ##x## and ##y##, its derivative ##du/dt = g(t,x,y)## is a function of ##x##, ##y##, and ##t##. For example, if ##u=x^2+y##, ##x = \cos t##, and ##y=\sin t##, then
$$\frac{du}{dt} = 2x(-\sin t) + \cos t.$$ Since ##t## appears explicitly in ##u'##, you can't omit the ##\partial/\partial t## term in the total derivative that you could when differentiating ##u##.
In that example, both ##u## and ##\frac{du}{dt}## are simply functions of a single variable ##t##. The "total" derivative is just the ordinary derivative when it comes to it:
$$\frac{du}{dt}(t) = \lim_{h \rightarrow 0} \frac {u(t + h) - u(t)}{h}$$
$$u(t) = \cos^2 t + \sin t, \ \ \ \frac{du}{dt}(t) = -2\cos t \sin t + \cos t$$
Neither are multivariable functions.

A lot of the mystique of the total derivative is lost when you realise it's just an ordinary derivative!

dyn
It doesn't matter how many times you assert this. It's as wrong now as it was in post #2.
Post #2 told me that for u=u( x , y ) with x=x(t) and y=y(t) ; then ∂/∂x (dx/dt) = 0 because dx/dt is not a function of x which does make sense but i am told this is wrong. Why is it wrong ?
I like the method used in #12 but i would like to know how to handle ∂/∂x (dx/dt) in this situation

PeroK
Homework Helper
Gold Member
Post #2 told me that for u=u( x , y ) with x=x(t) and y=y(t) ; then ∂/∂x (dx/dt) = 0 because dx/dt is not a function of x which does make sense but i am told this is wrong. Why is it wrong ?
I like the method used in #12 but i would like to know how to handle ∂/∂x (dx/dt) in this situation
If you are differentiating with respect to ##t##, then something like ∂/∂x (dx/dt) or ∂/∂y (dx/dt) don't make sense. You are trying to apply the chain rule to simple functions of ##t##. Let's say you had a function ##g(t)##, what you are trying to do is:
$$\frac{dg}{dt} = \frac{\partial g}{\partial x}x'(t) + \frac{\partial g}{\partial y}y'(t)$$
But, ##g## is a single-variable function of ##t##. Its partial derivatives with respect to ##x## and ##y## are not defined. There are no such functions. In the same way ∂/∂x (dx/dt) is simply not defined. ##dx/dt## is not a multi-variable function of ##x## and ##y## in the first place. ##dx/dt## is a single-variable function of ##t##.

This is how it should go. You have your first derivative:
$$\frac{du}{dt} = \frac{\partial f}{\partial x}(x(t), y(t))x'(t) + \frac{\partial f}{\partial y}(x(t), y(t))y'(t)$$
Note that I've emphasised that the partial derivatives are multi-variable functions. Then you just take the second derivative noting that the two partial derivatives must be treated like multi-variable functions when you differentiate them:
$$\frac{d^2u}{dt^2} = \frac{d}{dt}\big (\frac{\partial f}{\partial x}(x(t), y(t))x'(t)\big ) + \frac{d}{dt}\big ( \frac{\partial f}{\partial y}(x(t), y(t))y'(t)\big )$$
Now, I'll just do the first term (using the product rule):
$$\frac{d^2u}{dt^2} = \frac{d}{dt}\big (\frac{\partial f}{\partial x}(x(t), y(t))\big ) x'(t) + \big (\frac{\partial f}{\partial x}(x(t), y(t))\big )x''(t) + \dots$$
Then, you apply the chain rule to:
$$\frac{d}{dt}\big (\frac{\partial f}{\partial x}(x(t), y(t))\big )$$
Because ##\frac{\partial f}{\partial x}## is a multi-variable function of ##x## and ##y##.

Last edited:
Delta2 and dyn
Thank you

anuttarasammyak
Gold Member
Re: my post #2

I admit this investigation is not necessary for this problem. Leaving the problem just for curiosity,

$$\frac{\partial}{\partial x}\frac{d}{dt}x=\frac{d}{dt}\frac{\partial}{\partial x}x=\frac{d}{dt} 1 = 0$$

Does this formula hold mathematically ?

PeroK
Homework Helper
Gold Member
Re: my post #2

I admit this investigation is not necessary for this problem. Leaving the problem just for curiosity,

$$\frac{\partial}{\partial x}\frac{d}{dt}x=\frac{d}{dt}\frac{\partial}{\partial x}x=\frac{d}{dt} 1 = 0$$

Does this formula hold mathematically ?
If you take the example above: ##x = \cos t, y = \sin t##, then ##\frac{dx}{dt} = -\sin t = -y##. And, in that case if we express ##\frac{dx}{dt}## as a function of ##x, y##, then ##\frac{\partial}{\partial y}\frac{dx}{dt} = 1##. And it's equally easy to construct an example where ##\frac{\partial}{\partial x}\frac{dx}{dt} \ne 0##.

In one sense it is valid to treat ##x'(t)## as a multi-variable function of ##x, y## - in order to differentiate it wrt ##t##. But, it is far simpler to write ##\frac{d}{dt}\frac{dx}{dt} = \frac{d^2x}{dt^2} = x''(t)##.

Even if we allow the roundabout method of differentiating ##x'(t)## the OP's conclusion is wrong.

anuttarasammyak
Gold Member
Thanks PeroK.
And it's equally easy to construct an example where ∂∂xdxdt≠0.
Say
$$x=e^t$$,
$$\frac{d}{dx}\frac{d}{dt}e^t=\frac{d}{dx}e^t=\frac{d}{dx}x=1$$
$$\frac{d}{dt}\frac{d}{dx}x=\frac{d}{dt}1=0$$
##\frac{d}{dx}## and ##\frac{d}{dt}## are not commutable.

Last edited:
If you are differentiating with respect to ##t##, then something like ∂/∂x (dx/dt) or ∂/∂y (dx/dt) don't make sense. You are trying to apply the chain rule to simple functions of ##t##. Let's say you had a function ##g(t)##, what you are trying to do is:
$$\frac{dg}{dt} = \frac{\partial g}{\partial x}x'(t) + \frac{\partial g}{\partial y}y'(t)$$
But, ##g## is a single-variable function of ##t##. Its partial derivatives with respect to ##x## and ##y## are not defined. There are no such functions. In the same way ∂/∂x (dx/dt) is simply not defined. ##dx/dt## is not a multi-variable function of ##x## and ##y## in the first place. ##dx/dt## is a single-variable function of ##t##.

This is how it should go. You have your first derivative:
$$\frac{du}{dt} = \frac{\partial f}{\partial x}(x(t), y(t))x'(t) + \frac{\partial f}{\partial y}(x(t), y(t))y'(t)$$
I'm getting even more confused now. You are saying that the 1st equation here is not valid but the 2nd equation is valid. They look the same to me. In my original method i used the 2nd equation and then applied the differential operator to it in order to get the 2nd derivative. But then it failed.
I am using the general method that works fine for examples such as transforming Laplace's equation in 2-D from (x,y) to (r , θ). The example in my OP should be much easier but it's causing me many more problems

PeroK
Homework Helper
Gold Member
Please differentiate the function ##g(t) = \sin t##:

a) Using the ordinary derivative;

b) Using the multivariable chain rule.

Even if you can make method b) work by introducing additional functions ##x(t)## and ##y(t)##, why on Earth would you want to do it that way?

Similarly, if you have a function ##x(t)##, then ##\frac{dx}{dt} = x'(t)## and ##\frac{d^2x}{dt^2} = x''(t)##. There is absolutely no reason to introduce a multivariable chain rule.

Moreover, when you have unnecessarily involved a multi-variable chain rule instead of a simple ordinary derivative, you've done it wrong.

Why do you refuse to use the ordinary derivative when it's appropriate?

vela
Staff Emeritus
Homework Helper
If you have a function ##f(x,y,t)##, then its derivative wrt ##t## is given by
$$\frac{df}{dt} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial t} + \frac{\partial f}{\partial y}\frac{\partial y}{\partial t} + \frac{\partial f}{\partial t}.$$ If ##f## has no explicit dependence on ##t##, the last term vanishes, and the derivative reduces to
$$\frac{df}{dt} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial t} + \frac{\partial f}{\partial y}\frac{\partial y}{\partial t}.$$ In your problem, ##u## depends on ##t## only indirectly though ##x## and ##y##, so you can use the latter expression to calculate the first derivative. Its derivative ##du/dt## does, however, depend on ##t## directly because of the factors ##x'(t)## and ##y'(t)##, so you have to use the more general expression.

I'll note this is perhaps the third time I've made this point, but for some reason, you keep ignoring it and insist on using the wrong operator to calculate the second derivative and wonder why you get the wrong answer.

Last edited:
PeroK
Homework Helper
Gold Member
So i write the operator as
d/dt = (dx/dt)(∂/∂x) + (dy/dt)(∂/∂y)
This is the root of the problem. That is only valid when applied to multivariable functions of ##x## and ##y##. That doesn't apply to the ordinary derivative of single-variable function of ##t##. For example:
$$\frac{d}{dt}\sin t = [(dx/dt)(∂/∂x) + (dy/dt)(∂/∂y)]\sin t$$
is nonsensical.

vela
Staff Emeritus
Homework Helper
Moreover, when you have unnecessarily involved a multi-variable chain rule instead of a simple ordinary derivative, you've done it wrong.

Why do you refuse to use the ordinary derivative when it's appropriate?
Because it's not appropriate here. The problem the OP was given is to find the derivative by applying the multivariable chain rule, and the OP does need to understand how to solve problems using this method.

PeroK