# I'm confused about the consistency of partial derivatives

1. Mar 3, 2012

### BucketOfFish

If you have a function

$$f(x,y)=xy$$

where y is a function of x, say

$$y=x^2$$

then the partial derivative of f with respect to x is

$$\frac{\partial f}{\partial x}=y$$

However, if you substitute in y and express f as

$$f(x)=x^3$$

then the partial derivative is

$$\frac{\partial f}{\partial x}=3x^2=3y$$

despite the fact that these expressions for f are equivalent! What does it mean to change one variable (x) while holding another variable constant (y) even though it is a function of the first variable? Does this mean that if you choose different ways of expressing a system, you will end up with different partial derivatives? What influence does this have on solving such systems?

2. Mar 3, 2012

### Office_Shredder

Staff Emeritus
To have a function of x and y like this means that x and y are INDEPENDENT variables. One cannot be a function of the other and have partial derivatives like you did make sense.

For example, when you calculate $\frac{\partial f}{\partial x}$, what you're doing is assuming every other variable is a constant, and using the limit definition of the derivative on the variable x. Essentially you're asking what happens to f(x,y) if x changes a little bit but y stays the same. But if y=x2, how can x vary but y remain constant? Obviously it's impossible

Let's look at an example from physics, we have for an ideal gas a relationship between pressure, temperature and volume PV=nRT. We can write P=P(V,T) = nRT/V.

Then $\frac{ \partial P}{\partial T} = nR/V$. What this means is that if the temperature increases by a little bit, without the volume changing at all, I expect P to increase by about $(nR/V)\Delta T$. On the other hand if I increase the temperature but the container is elastic so the volume increases as well and the pressure stays constant, the result I just stated is a lie! Well of course it is, because I didn't keep the volume constant as the temperature changed, which is what taking partial derivatives assumes

3. Mar 3, 2012

### BucketOfFish

Thanks for the quick reply, Shredder. However, now I'm confused as to the utility of partial derivatives. If all variables are completely independent, then how is a partial derivative any different from a total derivative with respect to one variable?

4. Mar 3, 2012

### Office_Shredder

Staff Emeritus
What is your definition of total derivative?

One application is the chain rule. If we know that y=x2, then f(x,y) = f(x,y(x)) is a function of x and we can calculate its derivative:
$$\frac{df}{dx} = \frac{\partial f}{\partial x} \frac{dx}{dx} + \frac{\partial f}{\partial y} \frac{dy}{dx}$$

In the example above it's simply enough to just plug the formula for y in and calculate the derivative but there are times when you don't have a formula for f but want to prove a general result and need to use the chain rule to prove it.

The gradient of a function, which is a vector of every partial derivative of a function, tells you which direction to move in in order to increase/decrease the vector the fastest. This is critical for basic optimization algorithms. The gradient being 0 corresponds to being at a local extremum, and the Hessian, a matrix of second order partial derivatives, takes the place of the second derivative in deciding if you are at a local min or max.

Functions of time and space - for example h(x,t) is the height of a waving piece of string x inches away from the end of the string at time t - satisfy differential equations using partial derivatives with respect to x and t.

The curl and divergence are other operators which take functions and give you new functions, and use partial derivatives to do so. These along with the gradient are essentially the tools required to describe classical electromagnetism using vector calculus.

Asking why we want partial derivatives is like asking why we want to differentiate in the first place

5. Mar 3, 2012

### BucketOfFish

Thanks for the response, but I feel like maybe I didn't express my question well. Let me try again, using the chain rule definition you provided.

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

Here, when y is not a function of x (the two are independent), the partial and total derivatives are equivalent.

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

However, when y $is$ a function of x, then the inconsistency I mentioned above comes into play. $\frac{\partial f}{\partial x}$ does not have a well-defined value, but depends upon how f is expressed. (It does not make sense to me how you can vary x while holding y constant, if y is a function of x.) Thus, if the value of a partial derivative is either non-consistent, or else equivalent to a total derivative, then I don't see what the point of taking a partial derivative is, outside of defining a total derivative (and even then the matter seems fishy to me).

EDIT: Never mind, I thought about taking a gradient in non-Cartesian coordinates and realized that partial derivatives are in fact helpful. I still hold that they have no use outside of re-expressing a total derivative.

Last edited: Mar 3, 2012
B Confusion between $\theta$ and $d\theta$ Jan 14, 2017