Undergrad Understanding the Difference Between Partial and Full Derivatives

  • Thread starter Thread starter member 428835
  • Start date Start date
  • Tags Tags
    Derivatives Partial
member 428835
Hi PF!

Regarding derivatives, suppose we have some function ##f = y(t)x +x^2## where ##y## is an implicit function of ##t## and ##x## is independent of ##t##. Isn't the following true, regarding the difference between a partial and full derivative?
$$ \frac{df}{dt} = \frac{\partial f}{\partial t} + \frac{\partial f}{\partial y}\frac{dy}{d t} + \frac{\partial f}{\partial x}\frac{d x}{d t} = \frac{\partial f}{\partial y}\frac{dy}{d t}$$
 
Physics news on Phys.org
Yes, and \frac{{\partial f}}{{\partial y}}\frac{{dy}}{{dt}} = x\frac{{dy}}{{dt}}
 
joshmccraney said:
Hi PF!

Regarding derivatives, suppose we have some function ##f = y(t)x +x^2## where ##y## is an implicit function of ##t## and ##x## is independent of ##t##. Isn't the following true, regarding the difference between a partial and full derivative?
$$ \frac{df}{dt} = \frac{\partial f}{\partial t} + \frac{\partial f}{\partial y}\frac{dy}{d t} + \frac{\partial f}{\partial x}\frac{d x}{d t} = \frac{\partial f}{\partial y}\frac{dy}{d t}$$

This makes no sense to me. If ##x## is independent of ##t##, then ##f## is not a function of ##t## and ##\frac{df}{dt}## makes no sense.
 
PeroK said:
This makes no sense to me. If xx is independent of tt, then ff is not a function of tt and dfdt\frac{df}{dt} makes no sense.

y is a function of t.
 
alan2 said:
y is a function of t.

But not ##f##.
 
PeroK said:
But not ff.

Not sure where you're going. f is a function of y, y is a function of t.
 
alan2 said:
Not sure where you're going. f is a function of y, y is a function of t.

If ##f(t, x)## is a function of two independent variables, then ##\frac{df}{dt}## is not defined. It's ##\frac{\partial f}{\partial t}##.

If ##x## is implicitly a function of ##t##, then ##f(t, x(t))## is now a function of only one independent variable and ##\frac{df}{dt}## is defined.
 
PeroK said:
If ##f(t, x)## is a function of two independent variables, then ##\frac{df}{dt}## is not defined. It's ##\frac{\partial f}{\partial t}##.

If ##x## is implicitly a function of ##t##, then ##f(t, x(t))## is now a function of only one independent variable and ##\frac{df}{dt}## is defined.
I thought ##f = f(y(t),x,t)##; is this incorrect? As ##t## changes, wouldn't that imply ##y## would change, and also ##f##?
In this case are you saying ##\frac{\partial f}{\partial t} = \frac{\partial f}{\partial y}\frac{dy}{d t}##?
 
joshmccraney said:
I thought ##f = f(y(t),x,t)##; is this incorrect? As ##t## changes, wouldn't that imply ##y## would change, and also ##f##?
In this case are you saying ##\frac{\partial f}{\partial t} = \frac{\partial f}{\partial y}\frac{dy}{d t}##?

This is where you must be careful. You have two different functions there. First, suppose we have a function of 3 variables: ##f(x, y, t)##.

Here we take ##x, y, t## to be independent variables and ##f## is defined on a 3D space and we have partial derivatives of ##f## wrt each of the variables.

Now, suppose we take a trajectory of a particle, say, where ##x(t)## and ##y(t)## are now functions of ##t##. Most physics books will continue using ##f## but actually what we have now is a new function ##g## of one variable ##t##, defined by:

##g(t) = f(x(t), y(t), t)##

Now, you can have the "total derivative" of ##f##, which is really just the normal derivative of ##g## and can be calculated using the chain rule:

##\frac{dg}{dt} = \frac{\partial f}{\partial x} \frac{dx}{dt} + \frac{\partial f}{\partial y} \frac{dy}{dt} + \frac{\partial f}{\partial t}##

As I said, many physics book will omit introducing ##g## and write the mathematically rather imprecise:

##\frac{df}{dt} = \frac{\partial f}{\partial x} \frac{dx}{dt} + \frac{\partial f}{\partial y} \frac{dy}{dt} + \frac{\partial f}{\partial t}##
 
  • Like
Likes member 428835
  • #10
Cool, this matches what I've learned! But how do we deal with ##f = y(t) x+x^2##? Are you saying ##\frac{df}{dt}## is not defined because we have two independent variables, namely, ##t## and ##x##? If so, then what is ##\frac{\partial f}{\partial t}##?
 
  • #11
joshmccraney said:
Cool, this matches what I've learned! But how do we deal with ##f = y(t) x+x^2##? Are you saying ##\frac{df}{dt}## is not defined because we have two independent variables, namely, ##t## and ##x##? If so, then what is ##\frac{\partial f}{\partial t}##?

If we are dealing with a particle's trajectory then everything essentially depends on time along the trajectory. But, mathematically, you could have a function where not all the variables are functions of just one. To take an example, suppose we have ##f(x, y, z)## but we have a relationship between ##x## and ##y##, given by the function ##x(y)##. Now, we have a new function:

##g(y, z) = f(x(y), y, z)##

And we have a partial derivative of ##g## wrt ##y##:

##\frac{\partial g}{\partial y} = \frac{\partial f}{\partial x} \frac{dx}{dy} + \frac{\partial f}{\partial y}##
 
  • #12
joshmccraney said:
Cool, this matches what I've learned! But how do we deal with ##f = y(t) x+x^2##? Are you saying ##\frac{df}{dt}## is not defined because we have two independent variables, namely, ##t## and ##x##? If so, then what is ##\frac{\partial f}{\partial t}##?

In this case, it's simply:

##\frac{\partial f}{\partial t} = \frac{dy}{dt} x##
 
  • #13
PeroK said:
If we are dealing with a particle's trajectory then everything essentially depends on time along the trajectory. But, mathematically, you could have a function where not all the variables are functions of just one. To take an example, suppose we have ##f(x, y, z)## but we have a relationship between ##x## and ##y##, given by the function ##x(y)##. Now, we have a new function:

##g(y, z) = f(x(y), y, z)##

And we have a partial derivative of ##g## wrt ##y##:

##\frac{\partial g}{\partial y} = \frac{\partial f}{\partial x} \frac{dx}{dy} + \frac{\partial f}{\partial y}##
This is very helpful! So given ##g(y, z) = f(x(y), y, z)##, are you saying ##df## does not exist, so that ##df = \frac{\partial f}{\partial x}dx+\frac{\partial f}{\partial y}dy+\frac{\partial f}{\partial z}dz##, and equivalently, that ##dg=\frac{\partial f}{\partial y}dy+\frac{\partial f}{\partial z}dz## are both meaningless statements?
 
  • #14
joshmccraney said:
This is very helpful! So given ##g(y, z) = f(x(y), y, z)##, are you saying ##df## does not exist, so that ##df = \frac{\partial f}{\partial x}dx+\frac{\partial f}{\partial y}dy+\frac{\partial f}{\partial z}dz##, and equivalently, that ##dg=\frac{\partial f}{\partial y}dy+\frac{\partial f}{\partial z}dz## are both meaningless statements?

##df## is a differential, which is something different again.
 
  • #15
PeroK said:
##df## is a differential, which is something different again.
Shoot, I thought the full differential was intimately related to the full derivative. So to recap, ##\frac{d g}{dy}## is a meaningless statement but ##\frac{\partial g}{\partial y}## is meaningful?

Could you explain the differential ##dg## or ##df##, whichever you prefer?
 
  • #16
joshmccraney said:
Shoot, I thought the full differential was intimately related to the full derivative. So to recap, ##\frac{d g}{dy}## is a meaningless statement but ##\frac{\partial g}{\partial y}## is meaningful?

Could you explain the differential ##dg## or ##df##, whichever you prefer?

For a function of two variables, say, the differential relates the "amount" the function changes as its variables change. Note that, for small ##\Delta x, \Delta y##:

##\Delta f \approx \frac{\partial f}{\partial x} \Delta x + \frac{\partial f}{\partial y} \Delta y##

This leads to the equation for differentials:

##df = \frac{\partial f}{\partial x} dx + \frac{\partial f}{\partial y} dy##

You have to be careful with differentials. For example, if you blindly divided by ##dx## you would get:

##\frac{df}{dx} = \frac{\partial f}{\partial x} \frac{dx}{dx} + \frac{\partial f}{\partial y} \frac{dy}{dx} = \frac{\partial f}{\partial x} + \frac{\partial f}{\partial y} \frac{dy}{dx}##

Which is true, as long as ##y## is a function of ##x##. But, if ##x## and ##y## are independent, then it leads to the essentially nonsensical:

##\frac{df}{dx} = \frac{\partial f}{\partial x}##

Hopefully you can see in what sense that is true and in what sense that is meaningless.
 
  • #17
PeroK said:
Hopefully you can see in what sense that is true and in what sense that is meaningless.
It seems this is only true when ##f## is a function of only ##x##?
 
  • #18
joshmccraney said:
It seems this is only true when ##f## is a function of only ##x##?

It's really notational. If you defined the partial derivative as it is but made it apply also when ##f## is a function of one variable, then we'd use the partial derivative notation all the time. But, we draw an important (but not essentially fundamental) distinction between the notation of a derivative when ##f## is a single valued function: ##f', \frac{df}{dx}## and the derivative when ##f## is a function of more than one variable: ##f_x, \frac{\partial f}{\partial x}##.

This is a convention that must be respected, which is why ##\frac{df}{dx} = \frac{\partial f}{\partial x}## is notationally (by convention) nonsensical.
 
  • Like
Likes member 428835
  • #19
Thanks a lot! I really appreciate your clarification here!
 
  • #20
PeroK said:
##g(y, z) = f(x(y), y, z)##

And we have a partial derivative of ##g## wrt ##y##:

##\frac{\partial g}{\partial y} = \frac{\partial f}{\partial x} \frac{dx}{dy} + \frac{\partial f}{\partial y}##
Are you sure this is correct? Today my professor wrote ##F(x,y(x),y'(x)) = y\sqrt{1+y'^2}## and then that ##F_x = 0 \implies \frac{\partial F}{\partial x}=0##. This was working with the calculus of variations, the Euler-Lagrange equations.
 
  • #21
joshmccraney said:
Are you sure this is correct? Today my professor wrote ##F(x,y(x),y'(x)) = y\sqrt{1+y'^2}## and then that ##F_x = 0 \implies \frac{\partial F}{\partial x}=0##. This was working with the calculus of variations, the Euler-Lagrange equations.

How does that contradict anything about the chain rule? If ##F## is independent of the variable ##x##, then ##F_x = \frac{\partial F}{\partial x} = 0##.

If you are studying Euler-Lagrange, my advice is that you need to be really on top of functions, derivatives, what they mean and how they are defined.
 
Last edited:
  • #22
PeroK said:
How does that contradict anything about the chain rule?
It does not contradict the chain rule, it contradicts your statement, where you wrote
##\frac{\partial g}{\partial y} = \frac{\partial f}{\partial x} \frac{dx}{dy} + \frac{\partial f}{\partial y}## where ##g = f(x(y),y,z)##. Now let ##f = y \sqrt{1+y'^2}:y=y(x)##. According to what you wrote ##\frac{\partial g}{\partial x} = \frac{\partial f}{\partial y} \frac{dy}{dx} + \frac{\partial f}{\partial x} = y'\sqrt{1+y'^2}\neq 0##. We see that ##f_y = \sqrt{1+y'}## and ##dy/dx = y'##, where I am referencing the first part of what you wrote, namely, ##\frac{\partial f}{\partial y} \frac{dy}{dx}##.
 
  • #23
joshmccraney said:
It does not contradict the chain rule, it contradicts your statement, where you wrote
##\frac{\partial g}{\partial y} = \frac{\partial f}{\partial x} \frac{dx}{dy} + \frac{\partial f}{\partial y}## where ##g = f(x(y),y,z)##. Now let ##f = y \sqrt{1+y'^2}:y=y(x)##. According to what you wrote ##\frac{\partial g}{\partial x} = \frac{\partial f}{\partial y} \frac{dy}{dx} + \frac{\partial f}{\partial x} = y'\sqrt{1+y'^2}\neq 0##. We see that ##f_y = \sqrt{1+y'}## and ##dy/dx = y'##, where I am referencing the first part of what you wrote, namely, ##\frac{\partial f}{\partial y} \frac{dy}{dx}##.

##F_x## is the partial derivative of ##F## with respect to the first argument. It is not the total derivative of ##F## with respect to ##x##. This is where you have to be very careful with what derivatives you are talking about. If we have that ##y## is a function of ##x##, then we have:

##F_x = \frac{\partial F}{\partial x}## = the "normal" partial derivative of ##F## with respect to its first argument - denoted by ##x##. In this case ##F_x = 0##.

But, we also have:

##\frac{dF}{dx}## = the total derivative of ##F## with respect to the variable ##x##, which involves all partial derivatives of ##F##, with respect to all its arguments. In this case ##\frac{dF}{dx} \ne 0##.
 
  • #24
PS in E-L and related situations, the trick I use is this. When I see ##F_x##, say, I look at the function, see that ##x## is the first argument in the function and read this not as "d-f-by-d-x" or "the partial derivative of ##F## wrt ##x##", but as "the partial derivative of F wrt its first argument".
 
  • #25
I'm a little confused. You said:
1) ##f = y(t) x+x^2 \implies \frac{\partial f}{\partial t} = \frac{dy}{dt} x##
2)##f=y(x)\sqrt{1+y'(x)^2} \implies \frac{\partial f}{\partial x}=0##.
I'm confused because in both 1) and 2) the independent variable we are differentiating with respect to does not explicitly appear, yet in each case we have a non-zero and then zero partial derivative. Can you explain the difference in 1) and 2)?
 
  • #26
joshmccraney said:
I'm a little confused. You said:
1) ##f = y(t) x+x^2 \implies \frac{\partial f}{\partial t} = \frac{dy}{dt} x##
2)##f=y(x)\sqrt{1+y'(x)^2} \implies \frac{\partial f}{\partial x}=0##.

To clarify the question, write-out the complete definition of the functions you wish to ask about - use notation that specifies the names and order of the variables in the arguments. A function has a domain. The same function cannot have two different domains.

For example ##f_a(y,x) = yx + x^2## is a different function than ##f_b(x,y) = yx + x^2##.
That distinction is important when notation like "##f_x##" us used to represent the partial derivative of a function ##f## with respect to the first argument .

For example ## f_a(p,q) = p \sqrt{( 1 + q)}## is a different function than ##f_b(x) = x^2 \sqrt{( 1 + 2x)}##. We can define ##f_b## by saying "use the substitution ##p(x) = x^2## and ##q = p'(x)## in ##f_a##"". ##\ ## However, this relation does not make ##f_b## the same function as ##f_a##. The notation "##\frac{ df_a} {dx} ##" is meaningless since it can't be related to the notation used to define ##f_a##. By contrast, the notation "##\frac{df_b}{dx}##" refers to the derivative of ##f_b## and the notation "##\frac{\partial f_b} {\partial x}##" is incorrect since ##f_b## is not a function of several variables.

Notation like "##f = xy(t) + y(x) + t ##" is ambiguous. It doesn't even explain the number of arguments that the function "##f##" has. ##\ ## When such notation is used, the author may have a clear picture of how many functions involved, but the reader has to do some mind-reading to figure out how many different functions are being given the common name "##f##", what the arguments of these functions are, and what notations for derivatives mean.

It's also necessary to distinguish between a "function" and a "functional". In the most general setting, a "function" is a mapping from a set to another set. The members of the sets involved need not be numbers. However, in calculus texts, the term "function" is often used in a restrictive sense to denote a function that maps a set of n-tuples of real numbers to another set of m-tuples of real numbers.

A "functional" is a mapping from a set of functions to a set of 1-tuples of real numbers. Often "functionals" are defined using square brackets around their arguments - like ##L[f,g] = \int_0^1 f(x) \sqrt{(1 + g(x))} dx##. where ##f## and ##g## are real valued functions of 1 real variable.
 
  • #27
Right, sorry, I spaced the notation. Let me refine my question using the clarity you just spoke about. Specifically, you wrote earlier
1) ##g(x,y(t),t) = y(t) x+x^2 \implies \frac{\partial g}{\partial t} = \frac{dy}{dt} x##
2)##f(x,h(x))=h(x)\sqrt{1+h'(x)^2} \implies \frac{\partial f}{\partial x}=0##.
How can both of these statements be true? Notice ##g## and ##f## are being differentiated with respect to an independent variable that does not explicitly appear. In case 1) you say this value is non-zero. In case 2) you say it is zero. How is this possible?
 
  • #28
joshmccraney said:
Right, sorry, I spaced the notation. Let me refine my question using the clarity you just spoke about. Specifically, you wrote earlier
1) ##g(x,y(t),t) = y(t) x+x^2 \implies \frac{\partial g}{\partial t} = \frac{dy}{dt} x##
2)##f(x,h(x))=h(x)\sqrt{1+h'(x)^2} \implies \frac{\partial f}{\partial x}=0##.

That type of notation is still ambiguous. When we write notation like ##f(x, y(t)) = ...## are we defining a function of two variables, one of which has the long name "##y(t)##" - similar to the manner than a variable in a computer program might be given the long name "YVALUE"? If you take that point of view then function ##g(x,y(t),t) = y(t) x + x^2## is the same function as ##g(a,b,c) = ba + a^2##. And the function ##f(x,h(x)) = h(x) \sqrt{1 + (h'(x))^2} ## is actually a function of three variables ##f(a,b,c) = b \sqrt{1 + c^2} ## , unless you want to treat "##h'(x)##" as notation for a constant.

If we are trying express the idea that ##f(x,y(t))## denotes a function of two variables, one of which is a function "##y(t)##" instead of a real number, then we have stepped outside the realm of the calculus of real variable functions.

As illustrated by the concept of "functionals", it is mathematically possible to define situations where a function (in the general sense of that concept) takes arguments that are functions, or sets, or other things that are not real numbers. However if "##y(t)##" is a variable representing a function instead of a real number then the notations "##\frac{df}{dy}##" and "##\frac{\partial f}{\partial y}##" can no longer be taken to mean derivatives of the function ##f## with respect to a real variable.

When notation like ##f(x,y(t))## is used in applied mathematics, it is almost always a "cheap" way to talk about 3 different functions by using only 2 names. The intent of notation like "##f(x,y(t)) = x^2 + 3y(t)" ## is talk about 3 functions, which are:

1) ##f(a,b) = a^2 +3b##.
2)##y(w)##: some function of a single real variable ##w##
3)##s(p,q) = f(p,y(q))##, whose definition involves taking a composition of the functions ##f## and ##y##.

However the notation ##f(x,y(t)) = x^2 +3 y(t)## omits using the name "##s##".

To determine exactly what the notation for various derivatives and partial derivatives means, you should specify the all functions in your question, giving each distinct function a distinguishing name.
 
Last edited:
  • #29
joshmccraney said:
I'm a little confused. You said:
1) ##f = y(t) x+x^2 \implies \frac{\partial f}{\partial t} = \frac{dy}{dt} x##
2)##f=y(x)\sqrt{1+y'(x)^2} \implies \frac{\partial f}{\partial x}=0##.
I'm confused because in both 1) and 2) the independent variable we are differentiating with respect to does not explicitly appear, yet in each case we have a non-zero and then zero partial derivative. Can you explain the difference in 1) and 2)?

You're still using shorthand notation to hide what is going on. I'm not sure how else to explain this to you, as we're just going round in circles. I believe that @Stephen Tashi and I have a similar background (pure maths) and have a similar view of having to deconstruct ambiguous notation to see what is really going on. For example, as soon as I see something like:

##f=y(x)\sqrt{1+y'(x)^2}##

I smell a rat. Do you see why this notation is very ambiguous?
 
  • #30
PeroK said:
You're still using shorthand notation to hide what is going on. I'm not sure how else to explain this to you, as we're just going round in circles. I believe that @Stephen Tashi and I have a similar background (pure maths) and have a similar view of having to deconstruct ambiguous notation to see what is really going on. For example, as soon as I see something like:

##f=y(x)\sqrt{1+y'(x)^2}##

I smell a rat. Do you see why this notation is very ambiguous?

Let me try once more to explain the problem. As written, you have mixed up two different aspects of the maths behind Lagrange's method. As written, that function should be interpreted as:

##f(x) =y(x)\sqrt{1+y'(x)^2}##

Where ##y(x)## is some function of ##x## and ##f(x)## is a function of ##x## defined based on ##y(x)##. For example, if ##y(x) = \sin x##, then ##y'(x) = \cos x## and:

##f(x) = \sin(x) \sqrt{1+ \cos^2(x)}##

But, you are confusing that with the function ##f(x, y, y')## of three independent variables, defined by:

##f(x, y, y') =y\sqrt{1+y'^2}## (1)

Now, you might ask: how can ##y## and ##y'## be independent variables? Well, that is perhaps another question for another day! At this stage, ##x, y## and ##y'## are merely symbols representing independent variables with no relationship between them.

If we now consider a 1D curve/trajectory in ##x-y-y'## space defined by restricting ##y## to some function of ##x## (##y(x)##)and letting ##y'## be the derivative of this function, ##y'(x)##, then we can define another new function of ##x##, which I'll call ##g(x)## by:

##g(x) = f(x, y(x), y'(x)) =y(x)\sqrt{1+y'(x)^2}## (2)

And, this function ##g(x)## is the same as our original interpretation of ##f## above. You can see this by taking the same example where ##y(x) = \sin(x)##.

Finally, the difference between (1) and (2) must be understood and respected. Even if you omit the function ##g(x)## to clarify things, you must not confuse (1) and (2). You need to focus on this.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K