# I Partial and Full derivatives

1. Feb 25, 2017

### joshmccraney

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}$$

2. Feb 25, 2017

### alan2

Yes, and $$\frac{{\partial f}}{{\partial y}}\frac{{dy}}{{dt}} = x\frac{{dy}}{{dt}}$$

3. Feb 25, 2017

### PeroK

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.

4. Feb 25, 2017

### alan2

y is a function of t.

5. Feb 25, 2017

### PeroK

But not $f$.

6. Feb 25, 2017

### alan2

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

7. Feb 25, 2017

### PeroK

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.

8. Feb 25, 2017

### joshmccraney

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}$?

9. Feb 25, 2017

### PeroK

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}$

10. Feb 25, 2017

### joshmccraney

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. Feb 25, 2017

### PeroK

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. Feb 25, 2017

### PeroK

In this case, it's simply:

$\frac{\partial f}{\partial t} = \frac{dy}{dt} x$

13. Feb 25, 2017

### joshmccraney

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. Feb 25, 2017

### PeroK

$df$ is a differential, which is something different again.

15. Feb 25, 2017

### joshmccraney

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. Feb 25, 2017

### PeroK

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. Feb 25, 2017

### joshmccraney

It seems this is only true when $f$ is a function of only $x$?

18. Feb 25, 2017

### PeroK

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.

19. Feb 25, 2017

### joshmccraney

Thanks a lot! I really appreciate your clarification here!

20. Mar 6, 2017

### joshmccraney

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. Mar 7, 2017

### PeroK

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: Mar 7, 2017
22. Mar 7, 2017

### joshmccraney

$\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. Mar 7, 2017

### PeroK

$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. Mar 7, 2017

### PeroK

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. Mar 7, 2017

### joshmccraney

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)?