131
$\begingroup$

I am not too grounded in differentiation but today, I was posed with a supposedly easy question $w = f(x,y) = x^2 + y^2$ where $x = r\sin\theta $ and $y = r\cos\theta$ requiring the solution to $\partial w / \partial r$ and $\partial w / \partial \theta $. I simply solved the former using the trig identity $\sin^2 \theta + \cos^2 \theta = 1$, resulting to $\partial w / \partial r = 2r$.

However I was told that this solution could not be applied to this question because I should be solving for the total derivative. I could not find any good resource online to explain clearly to me the difference between a normal derivative and a total derivative and why my solution here was wrong. Is there anyone who could explain the difference to me using a practical example? Thanks!

$\endgroup$
9
  • $\begingroup$ What is $w$? Did you mean $\partial$ instead of $\delta$? $\endgroup$
    – Zhen Lin
    Jul 23, 2012 at 15:11
  • 4
    $\begingroup$ I agree: since $w(r,\theta)=r^2$, I would say $\partial w / \partial r=2r$. If I were you, I would ask that person for a precise definition of 'total derivative' and of $\partial w / \partial r$. $\endgroup$ Jul 23, 2012 at 16:50
  • 1
    $\begingroup$ @NeilTraft If I remember correctly, -- that the answer was wrong because the question was asking for the total derivative. $\endgroup$ Feb 24, 2015 at 15:13
  • 1
    $\begingroup$ Given that $r$ and $\theta$ are independent , I think your solution is totally right. $\endgroup$
    – Vim
    May 23, 2015 at 17:15
  • 4
    $\begingroup$ I'm really confused - when I write a total derivative, it looks like $d/dr$ and when I write a partial, it looks like $\partial / \partial r$. If I was asked what $\partial w/ \partial r$ and I didn't see an $r$, I'd say 0 and laugh. Clearly, $dw/dr = 2 r$. Are either of these wrong? If not, why is the OP asking about the partial, answering with the total and then being told to find the total instead? $\endgroup$
    – user121330
    May 28, 2015 at 16:45

8 Answers 8

114
$\begingroup$

The key difference is that when you take a partial derivative, you operate under a sort of assumption that you hold one variable fixed while the other changes. When computing a total derivative, you allow changes in one variable to affect the other.

So, for instance, if you have $f(x,y) = 2x+3y$, then when you compute the partial derivative $\frac{\partial f}{\partial x}$, you temporarily assume $y$ constant and treat it as such, yielding $\frac{\partial f}{\partial x} = 2 + \frac{\partial (3y)}{\partial x} = 2 + 0 = 2$.

However, if $x=x(r,\theta)$ and $y=y(r,\theta)$, then the assumption that $y$ stays constant when $x$ changes is no longer valid. Since $x = x(r,\theta)$, then if $x$ changes, this implies that at least one of $r$ or $\theta$ change. And if $r$ or $\theta$ change, then $y$ changes. And if $y$ changes, then obviously it has some sort of effect on the derivative and we can no longer assume it to be equal to zero.

In your example, you are given $f(x,y) = x^2+y^2$, but what you really have is the following:

$f(x,y) = f(x(r,\theta),y(r,\theta))$.

So if you compute $\frac{\partial f}{\partial x}$, you cannot assume that the change in $x$ computed in this derivative has no effect on a change in $y$.

What you need to compute instead is $\frac{\rm{d} f}{\rm{d}\theta}$ and $\frac{\rm{d} f}{\rm{d} r}$, the first of which can be computed as:

$\frac{\rm{d} f}{\rm{d}\theta} = \frac{\partial f}{\partial \theta} + \frac{\partial f}{\partial x}\frac{\rm{d} x}{\rm{d} \theta} + \frac{\partial f}{\partial y}\frac{\rm{d} y}{\rm{d} \theta}$

$\endgroup$
20
  • 37
    $\begingroup$ I am also confused by this post. Where does the formula $\frac{df}{d\theta} = \frac{\partial f}{\partial \theta} + \frac{\partial f}{\partial x}\frac{dx}{d\theta} + \frac{\partial f}{\partial y}\frac{dy}{d\theta}$ come from? (In particular, why are there three terms on the right-hand side?) And what is the exact definition of "total derivative"? $\endgroup$ Jul 23, 2012 at 15:56
  • 8
    $\begingroup$ It comes from the chain rule and letting $x$ and $y$ be functions of $r$ and $\theta$. Technically, I should have probably used partial symbols in $\rm{d} x/\rm{d}\theta$. A "total derivative" can be thought of as the computation of the derivative of a parametric function with respect to the parameter(s). See more here: en.wikipedia.org/wiki/Total_derivative $\endgroup$
    – Emily
    Jul 23, 2012 at 16:04
  • 12
    $\begingroup$ I see. So you're regarding $f$ as a function $f(\theta, x, y)$, then writing $df = \frac{\partial f}{\partial \theta}d\theta + \frac{\partial f}{\partial x}dx + \frac{\partial f}{\partial y}dy$, and then dividing by $d\theta$. $\endgroup$ Jul 23, 2012 at 16:14
  • 9
    $\begingroup$ In that case, I think it is misleading to suggest to the OP that he needs something more than just the chain rule in his situation. $\endgroup$ Jul 23, 2012 at 17:47
  • 6
    $\begingroup$ The OP asked what the "total derivative" means. In one regard you could say that the "total derivative" is nothing more than applying the chain rule in such a way that you "end up" with derivatives with respect to only the parameter. However, contextually, computing the "total derivative" means something different than just applying the chain rule. For instance, $f(x,y) = xy$ can be computed using the chain rule, but it may not be the total derivative if $x=x(t)$ and $y=y(t)$. So, in other words, the total derivative applies the chain rule, but it means something slightly stronger. $\endgroup$
    – Emily
    Jul 23, 2012 at 18:59
53
$\begingroup$

I know this answer is incredibly delayed; but just to summarise the last post:

If I gave you the function

$$ f(x,y) = \sin(x)+3y^2$$

and asked you for the partial derivative with respect to $x$, you should write:

$$ \frac{\partial f(x,y)}{\partial x} = \cos(x)+0$$

since $y$ is effectively a constant with respect to $x$. In other words, substituting a value for $y$ has no effect on $x$. However, if I asked you for the total derivative with respect to $x$, you should write:

$$\frac{df(x,y)}{dx}=\cos(x)\cdot {dx\over dx} + 6y\cdot {dy\over dx}$$

Of course I've utilized the chain rule in the bottom case. You wouldn't write $dx\over dx$ in practice since it's just $1$, but you need to realise that it is there :)

$\endgroup$
4
  • 2
    $\begingroup$ I hope you did notice that my answer was for $\partial w / \partial r$ $\endgroup$ Dec 13, 2013 at 13:20
  • 2
    $\begingroup$ Helpful approach. Can you please compare/contrast the total derivative w.r.t. x (which you show) with the total derivative w.r.t. y (which you did not show)? $\endgroup$ May 30, 2017 at 16:43
  • 3
    $\begingroup$ @electronpusher w.r.t $y$ we have$\frac{df(x,y)}{dy}=\frac{\partial f} { \partial x } \frac{dx}{dy} + \frac{\partial f }{\partial y } \frac{dy}{dy}= \cos x \frac{dx}{dy} + 6y (1)$ $\endgroup$
    – john
    Aug 28, 2019 at 5:23
  • 1
    $\begingroup$ I'm not sure how relevant this example is, because it only has one layer of variables. In the OP, x and y further depend on two variables. Does anyone know how such logic would be applied to the actual question in the OP? $\endgroup$ May 7, 2021 at 23:52
39
$\begingroup$

Does everyone agree that the poster arrived at the correct answer?

People write $$\frac{\partial}{\partial t}g(x(t),t)$$ or $$\frac{\text{d}}{\text{d} t}g(x(t),t)$$

The first is typically used to mean "the derivative of function $g$ with respect to the second argument". The second usually means the "total derivative". There are variations on this. Some people omit the arguments and just write, for example, $\frac{\partial}{\partial t}g$

So for example: if $x$ is secretly a function of $t$, then the notation $\frac{d}{dt}f(x,t)$ is called the total derivative and is an abbreviation for the (single-variable derivative) $g′(t)$ where $g(t)=f(x(t),t)$. In applying the chain rule to the last expression, you would need some way to denote "the derivative of f with respect to its first argument" many people would write $\frac{\partial}{\partial x}f$ for this, but in many cases this is confusing as I explain in the example below.

The wide-spread math notation here confuses many people and I think it is pretty much unnecessary to use it. If you want to take a total derivative, construct explicitly the function (like $g$ above) and take a single-variable derivative. Otherwise, the explanations for the difference between total and partial derivatives needs you to make appeals like temporarily fixing variables or saying that a variable is effectively constant or switching between thinking of $x$ as a function and as an expression. These are all fuzzy things you can do successfully once you already feel comfortable with what's going on. But otherwise, it pays to think carefully about what's really happening.

Your example

The problem stems from the conflation of an expression and a function. You did this when you wrote $w = f(x,y) = x^2 + y^2$. In that case, many will write

$\frac{\partial}{\partial x}w$ and

$\frac{\partial}{\partial x} f(x,y)$

(which are equivalent). This sort of makes sense. In both cases, the thing to the right of the differential operator is an expression which contains $x$ and $y$. The thing that is produced by applying that operator is also an expression in the same variables. This is also true of what $\frac{d}{dx}$ means. For the particular expressions above, I would just use that.

The actual purpose of the partial derivative is to take derivatives of functions with respect to one of its arguments, not expressions. That's not what's happening above. That is what's happening when people write:

$\frac{\partial}{\partial x} f$.

$f$ is not an expression. It is a function. I personally do not like this notation. You could have defined an identical $f$ by writing $f(a,b) = a^2 + b^2$. The variables that appear in the definition of a function are, in the strictest sense, invisible to the rest of the world. It's just a convenient way of stating "$f$ is a function that takes two arguments. It squares the first, squares the second, and returns the sum of the squares". Instead of having to write that sentence out (which people had to do before inventing better notation), you can instead give names to the arguments of $f$ so that you can easily refer to them when defining $f$.

But when you write $\frac{\partial}{\partial x} f$, then you are using some knowledge of how you defined $f$---that you chose the name $x$ for the first argument. It can be useful to have names for function arguments instead of just referring to their position (first, second, etc. argument), and so that's why the partial notation survives, but I think the notation needs to improve for this.

What someone typically means when they write $\frac{\partial}{\partial x} f$ is roughly "the function that takes two arguments and returns the sensitivity of $f$ with respect to its first argument". So if you're at some point $(a,b)$ or $(x,y)$ or whatever, and you wiggle the first argument $a$ or $x$, how much does the output of $f$ wiggle? That is the question that the gradient of a function is supposed to answer. This is probably what someone means if they say "normal derivative" They are thinking about only a single function, with possibly multiple arguments. And they are trying to make an object that tells you how sensitive the output of the function is to a change in each of the inputs.

The total derivative usually means that somewhere you've implicitly defined some new functions. In this case, you have made functions $x(r,\theta) = r \sin(\theta)$ and $y(r,\theta) = r \cos(\theta)$, and you can compose these functions, making a new function: $$g(r,\theta) = f(x(r,\theta),y(r,\theta))$$

Notice again, that $r$ and $\theta$ are chosen only to give a human information about connotation of this function. If we processed things purely symbolically, then the definition of $g$ could as well have been

$$g(input_1,input_2) = f(x(input_1,input_2),y(input_1,input_2))$$

And so when the problem asked you to find $\frac{\partial}{\partial r} w$, there are two, in the end identical, interpretation of what that means. Either construct the function $g$ as I did above, and report its sensitivity with respect to the first argument. OR substitute the expressions for $x$ and $y$ into the expression for $w$. Now you have an expression for $w$ in terms of $r$ and $\theta$. I prefer the approach that thinks about functions. This is how we organize code and I think this is how we should organize math. When you deal with expressions, you effectively have a ton of global variables.

So how do we compute $\partial_1 g$, which is just the notation for "make a function with the same arity (number of inputs) as $g$, such that it evaluates the the derivative of the function $g$ with respect to its first argument"? It's just the chain rule.

$$[\partial_1 g](r,\theta) = [\partial_1 f](x(r,\theta), y(r,\theta)) \cdot [\partial_1 x](r,\theta) + [\partial_2 f](x(r,\theta), y(r,\theta)) \cdot [\partial_1 y](r,\theta)$$

We can see why thinking about things in this way is not popular! But this is the clearest, most mechanical, way to think about it. Otherwise you are relying on implicit punning of $x$ as a function and as an expression. Choose one and stick with it!

Anyway, to simplify the above definition, which didn't care about the definitions of $f$, $x$, or $y$, we need to use the definitions.

$f(x,y) = x^2 + y^2$ and therefore

  • $[\partial_1 f](x,y) = 2x$
  • $[\partial_2 f](x,y) = 2y$

$x(r,\theta) = r\sin(\theta)$ and therefore

  • $[\partial_1 x](r,\theta) = \sin(\theta)$

likewise

  • $[\partial_1 y](r,\theta) = \cos(\theta)$

FURTHERMORE, though we don't need it at the moment

  • $[\partial_2 x](r,\theta) = r\cdot \cos(\theta)$
  • $[\partial_2 y](r,\theta) = -r\cdot \sin(\theta)$

So again, the function is

$$[\partial_1 g](r,\theta) = [\partial_1 f](x(r,\theta), y(r,\theta)) \cdot [\partial_1 x](r,\theta) + [\partial_2 f](x(r,\theta), y(r,\theta)) \cdot [\partial_1 y](r,\theta)$$

substituting the functions we just computed:

$$[\partial_1 g](r,\theta) = 2x(r,\theta) \cdot \sin(\theta) + 2y(r,\theta) \cdot \cos(\theta)$$

and substituting $x$ and $y$

$$[\partial_1 g](r,\theta) = 2r\sin(\theta) \cdot \sin(\theta) + 2r\cos(\theta) \cdot \cos(\theta)$$

which, after using the very trig identity you used, is

$$[\partial_1 g](r,\theta) = 2r$$

Yet another way to make the same point:

When you see the notation $g'(x)$, you can group that as $[g'](x)$. You've made a new function, called "g prime", which is the derivative of $g$, and you're evaluating it at point $x$. $g'(y)$ means the same thing, except you're evaluating at the point $y$. The multidimensional analogue of this is $\nabla g(\mathbf{x})$. You should parse that as $[\nabla g](\mathbf{x})$.

This is not the case with the notation $\frac{d}{dx} g(x)$. If you parse that as $[\frac{d}{dx} g](x)$, you get confused because what does $x$ mean in the scope of the brackets? You don't have to give meaning to it because it should be meaningless. The operator $\frac{d}{dx}$ applies to an expression, not a function.

But, what people will routinely do is define

$g(x)= x^2+sin(x)+\text{whatever expression in }x$

and then write $\frac{d}{dx} g(y)$ when they really should have written $g'(y)$. They don't do this very often in the single-variable case, but they do it in the multi-variable case. I just showed the single-variable case because it's clearer to see the problem with it.

My inspiration for this answer comes from http://groups.csail.mit.edu/mac/users/gjs/6946/sicm-html/book-Z-H-78.html#%_sec_Temp_453)

$\endgroup$
11
  • 2
    $\begingroup$ I'm having trouble finding a clear definition of the term "total derivative" in all that text. Could you perhaps make it stand out more? $\endgroup$ May 22, 2015 at 0:36
  • 2
    $\begingroup$ x @Gus: No, I don't see what you mean. If you want to abolish the concept that's fine, but if you want me to agree that the concept should be abolished, I'll have to know what the concept we're going to abolish IS before I can agree to it. $\endgroup$ May 22, 2015 at 18:11
  • 1
    $\begingroup$ x @Gus: What I think there is still missing in the answer is a definition of the term "total deriviative". The closest it gets is a sentence that says "the total derivative usually means that (someone did such and such)". There should be a simple declarative sentence somewhere saying "The total derivative is (a clear description of the thing denoted by the term)". You're still assuming that the reader already knows the meaning of the term and jumping directly to critiquing the reasons one might have for using it. $\endgroup$ May 23, 2015 at 17:20
  • 2
    $\begingroup$ If $x$ is secretly a function of $t$, then the notation $\frac{\text{d}}{\text{d}t} f(x,t)$ is called the total derivative and is an abbreviation for the (single-variable derivative) $g'(t)$ where $g(t)=f(x(t),t)$. In applying the chain rule to the last expression, you would need some way to denote "the derivative of $f$ with respect to its first argument" many people would write $\frac{\partial}{\partial x} f$ for this, but in many cases this is confusing. $\endgroup$
    – Gus
    May 23, 2015 at 17:36
  • 2
    $\begingroup$ This is the best response but not a very good answer and I wish there was a way to mark it as the best detailed response to the issue. I could not completely comprehend it at the time you posted it but thanks. $\endgroup$ Mar 30, 2017 at 15:06
6
$\begingroup$

I find some of the answers (and comments) above to be a bit confusing. I want to address some of the issues brought up. The original question of the OP was to find the total derivative $ \frac{dw}{dr} $ for the function: $$w=f(x,y)= x^2 + y^2,~~ x=r \sin \theta ,~~y = r \cos \theta $$ assuming that $r, \theta $ are independent variables.

On the face of it finding $ \frac{dw}{dr} $ is not possible if $r, \theta $ are independent of each other.

It is true that $$ \frac{\partial w}{\partial r }= 2r$$ Proof: $$ \frac{\partial w}{\partial r } = \frac{\partial w}{\partial x } \frac{\partial x }{\partial r} + \frac{\partial w}{\partial y } \frac{\partial y }{\partial r} $$ Plugging in $$ \frac{\partial w}{\partial r } = 2x~ ( \sin \theta ) + 2y ( \cos \theta ) $$ Substituting using the given $x $ and $y $ equations $$\frac{\partial w}{\partial r } = 2( r \sin \theta ) ~ ( \sin \theta ) + 2( r \cos \theta ) ( \cos \theta ) = 2r ( \sin^2 \theta + \cos^2 \theta ) = 2r $$

We can relax the assumption that $r$ and $\theta $ are independent of each other to find $ \frac{dw}{dr} $. The computation is quite a bit more involved. We would have to temporarily assume that $\theta$ is a function of $r$. $$ \frac{dw}{dr} =\frac{\partial w}{\partial x } \frac{\partial x}{\partial r } \frac{dr}{dr }+ \frac{\partial w}{\partial x } \frac{\partial x}{\partial \theta }\frac{d\theta }{ dr }+\frac{\partial w}{\partial y } \frac{\partial y}{\partial r } \frac{dr}{dr }+ \frac{\partial w}{\partial y } \frac{\partial y}{\partial \theta }\frac{d\theta }{ dr } $$ It is true that an early substitution gives us $$ w= ( r \sin \theta) ^2 + ( r \cos \theta)^2 = r^2$$ But it would be misleading to state that $$ \frac{dw}{dr}= 2r $$ since $$ w = f( r, \theta) $$ An analogous scenario is found when we want the slope at a point on the surface $$ z=f(x,y) = x^2$$ We would still use partial derivative even though we have $$ \frac{\partial z}{\partial x } = \frac{dz}{dx} = 2x$$ We can be more explicit and define $$z=f(x,y) = x^2 + 0y$$

$\endgroup$
2
  • 1
    $\begingroup$ Absolutely the best answer here $\endgroup$ Mar 18, 2020 at 21:44
  • $\begingroup$ Why do you state "...since $w = f(r, \theta)$? This looks wrong to me: $w = f(x,y) = x^2 + y^2 = r^2 \neq r^2 + \theta^2 = f(r, \theta)$. $\endgroup$
    – user578018
    Jan 27, 2022 at 8:50
1
$\begingroup$

It may be easier to imagine a figure with orthogonal x and y co-ordinates for the base and a functional result (i.e. some function, w, of two variables x and y) plotted as a surface on the vertical z axis. If we look at the result for a change in the function that we obtain when we keep y constant and let x vary, it is a tangent to the surface of slice taken through that surface parallel to the x axis. Of course you get an equivalent picture for letting y vary but keeping x constant. Now imagine a change in the function but we are letting both x and y vary simultaneously, delta w is the change in w and basically we sum the changes in the function to get delta w, del w =f(x + delx, y + del y) - f(x,y) if we expand for del w and go to the limit we get for dw = the partial derivative wrt x times dx plus the partial derivative wrt y times dy. If x and y are both functions of a single variable t, then so is w, and we can divide each term by dt which is the total derivative wrt to t of the function.

This is the classic example of the basic concepts and you can find a version of it here:-

https://www.math.uwaterloo.ca/~ahamadeh/math217_p2.pdf

For a good illustrative example I like the rate of change of an expanding cylinder volume, V is given by V= (PI)(r^2)(h), r = radius h = height, now use the previous idea expression for delta w, but here its delta V, divide both sides by delta t and then let delta t go to zero.

It only gets slightly more complicated when we use the methodology to find differential coefficients of implicit functions, but we use similar methods. Textbook examples often let z stand for the function of x and y, then you just form delta z (as 'normal') divide both sides by delta x and let delta x go to zero giving an expression for dz/dx. Often you are given info about z, may be z = 0 (constant) so dz/dx = 0.

If you tack on to these ideas the change of variable idea, which is a bit more of the same really, e.g. say z is a function of x and y z = f(x,y) and x and y are in turn functions of two other variables u and v , then z is a function of u and v, so you form delta z as 'normal' in terms the partial diff of z wrt x times delta x plus the partial diff of y times delta y, divide both sides by delta u and let delta u got to zero, v is being kept constant for the time being. That gives you the partial differential of z wrt u, and you follow the same procedure to get an expression for the partial differential of z wrt v .

With these you have most of the basic tools to handle such problems, and I suppose the basic answer to your question is that you have an implicit function, so when you want the change in the function when x is varying you have to add on the 'extra' bit. The concept pops up in a number of places, may be your function describes the temperature of a volume element, its cooling with time, but its also moving and the spatial co-ordinates bring it near a heat source, so you have to add the two effects. So if you are not careful you miss that 'extra' spatial term and just have the 'pure' time term.

Apologies for the wordiness of this reply, but just maybe a half reasonable idea of what is going on has been conveyed (for time I'd imagine the whole function surface altering shape with time in 3 D perhaps we can only have snapshots in time.).

$\endgroup$
1
$\begingroup$

Partial derivative is the derivative of a function with several independent variables with respect to any one of them, keeping the others constant.

The symbols $ \dfrac{\partial}{\partial x}, \dfrac{\partial}{\partial y} $ are used to denote such differentiations.

And the expressions $ \dfrac{\partial u}{\partial x}, \dfrac{\partial u}{\partial y} $ are called partial differential coefficients of $u$ with respect to $x$ and $y$.

So, if $u=f(x,y)$, then $ \dfrac{\partial u}{\partial x} $ can be calculated by differentiating $u$ with respect to $x,$ keeping $y$ constant.

While in the case of the Total derivative, we don't assume the other variables to be constant, their change with respect to the change in that variable is also taken into consideration.

So, if $u=f(x,y)$, where $x=\phi_1(t)$, and $y=\phi_2 (t)$, it can be calculated as:

$ \dfrac{du}{dt} =$ $ \dfrac{\partial u}{\partial x}. $ $ \dfrac{dx}{dt} $ + $ \dfrac{\partial u}{\partial y}. $ $ \dfrac{dy}{dt} $

So, if $x$ and $y$ both depend on $t$, then change in $x$ will lead to change in $t$ which in turn will lead to change in $x$ (since $y$ is also a function of $t$), hence the formula mentioned above.

In your question, Since $x$ and $y$ both depend on $\theta$ (Assuming $r$ is a constant), so in order to find the total derivative of $f(x,y)$ with respect to $\theta$ , apart from the partial derivatives of $u$ with respect to $x$ and $y$ you will need to consider the change in $x$ as well as the change in $y$ with respect to $\theta$.

Summarizing the whole thing:

Total derivative is a measure of the change of all variables, while Partial derivative is a measure of the change of a particular variable having others kept constant.

Hope this helps!

Edit: Here's what another a different user came up with:

$f(x,y) = e^{xy}$

Total derivative with chain rule gives:

$\dfrac{df(x,y)}{dx} = \dfrac{de^{xy}} {dx} + \dfrac{de^{xy}}{dy} \dfrac{dy}{dx} = ye^{xy} + xe^{xy}$

The partial derivative keeps y constant. So the second term will disappear.

$\dfrac{\partial f(x,y)}{ \partial x} = \dfrac{\partial e^{xy}} {\partial x} + \dfrac{\partial e^{xy}}{\partial y} \dfrac{\partial y}{\partial x} = ye^{xy}$ (Since $\dfrac{\partial y}{\partial x} = 0$)

$\endgroup$
5
  • 2
    $\begingroup$ This doesn't seem to answer the question. The question was not what is a partial derivative (everyone who's ever taken a basic calculus course knows that), but that is a "total derivative", a mysterious concept which nobody seems to be able to give a straight definition for. $\endgroup$ May 22, 2015 at 0:29
  • $\begingroup$ The expression in the end is for total derivative only. @HenningMakholm $\endgroup$ May 22, 2015 at 18:04
  • 1
    $\begingroup$ x @Nivedita: But the OP asked to understand what "total derivative" means, not just get an expression for his particular situation without any explanation of its significance, or even what makes that expression right. $\endgroup$ May 22, 2015 at 18:07
  • $\begingroup$ @HenningMakholm I have edited the answer. Let me know if more explanation is needed. $\endgroup$ May 22, 2015 at 18:17
  • $\begingroup$ So how do we solve the total derivative of this question, did you arrive at a different answer? @Iamnotarobot $\endgroup$ Feb 28, 2020 at 14:29
1
$\begingroup$

There are two ways to approach this problem

  1. Substitute $x$ and $y$ into $w$ and we will get $$w= ( r \sin \theta) ^2 + ( r \cos \theta)^2 = r^2$$

Then total derivative and partial derivative of $w$ with respect to $r$ is same I.e. $$\frac{dw}{dr}= \frac{\partial w}{\partial r } = 2r$$

  1. Writing chain rule also we will get same result.

$$ \frac{\partial w}{\partial r } = \frac{\partial w}{\partial x } \frac{\partial x }{\partial r} + \frac{\partial w}{\partial y } \frac{\partial y }{\partial r} $$

Both methods are correct. This is due to the fact that, In this particular problem ,eventhough $x$ and $y$ are functions of $r$ and $\theta$, $w$ is a function of $r$ only.

Also Then, $$\frac{\partial w}{\partial \theta } = 0$$ Massive discussion was not required in this topic.

$\endgroup$
1
$\begingroup$

$\newcommand{\d}{\mathrm{d}}\newcommand{\L}{\mathscr{L}}$Yes, I know this is $11$ years old, but I believe this post deserves an explicit answer. It annoyed me that I had to invent my own definition / understanding of the "$\d w/\d r=\frac{\partial w}{\partial r}+\frac{\partial w}{\partial \theta}\cdot\frac{\d\theta}{\d r}$" thing and I would like to spare anyone else this same annoyance. If my explanation of this below is slightly non-standard, it's because I made it up: please let me know if there is a problematic clash with existing interpretations.


Let $V$ and $U$ be Banach spaces. Take $U=V=\Bbb R$ if you wish. Let's fix a function $f:V^n\to U$ where $n\in\Bbb N$ is given. Let $\L(A,B)$ denote the Banach space of continuous linear functions $A\to B$ for given Banach spaces $A,B$. If there is any conflict with jargon from differential geometry, I won't be aware of it because unfortunately I don't yet know the subject.

There are three things we could talk about. The derivative/differential, the partial derivative (w.r.t a particular coordinate) and the total derivative (w.r.t a particular coordinate).

The definition of the first varies, but the definitions all wish to capture the same idea.

  • The differential or derivative, sometimes written as $\d f$ or $D_f$, of $f$ is the unique element of $\L(V^n,\L(V^n,U))$ - if it exists - satisfying for all $x\in V^n$: $$\lim_{h\to0\\h\in V^n}\frac{\|f(x+h)-f(x)-D_f(x)(h)\|}{\|h\|}=0$$To understand $\L(V^n,\L(V^n,U))$, it means $D_f$ takes $x\in V^n$ to a linear map $D_f(x)\in\L(V^n,U)$, i.e. $D_f(x):V^n\to U$, and so $D_f(x)(h)$ means the evaluation of this map at $h\in V^n$. This map captures the local approximation of (the change in) $f$ at a basepoint $x$ along a perturbation $h$.
  • The partial derivative with respect to the $k^{\rm th}$ coordinate of $f$, written $\partial_k f$, is the unique element of $\L(V,U)$ - if it exists - satisfying for all $x=(x_1,\cdots,x_n)\in V^n$: $$\lim_{h\to0\\h\in V}\frac{\|f(x_1,\cdots,x_{k-1},x_k+h,x_{k+1},\cdots,x_n)-f(x)-\partial_k f(x)(h)\|}{\|h\|}=0$$

Now the total derivative w.r.t a particular coordinate is basically just the derivative. However the whole business with: $$\tag{$\ast$}\frac{\d f}{\d x_k}=\frac{\partial f}{\partial x_k}+\sum_{1\le i\le n\\i\neq k}\frac{\partial f}{\partial x_i}\cdot\frac{\d x_i}{\d x_k}$$

Has a particular meaning. It means if you fix $x\in V^n$ and have some $\gamma=\langle\gamma_1,\cdots,\gamma_{k-1},\gamma_{k+1},\cdots,\gamma_n\rangle:V\to V^{n-1}$ which is differentiable at zero with $\gamma(0)=0$, which we will think of as a perturbation, then we want to know if there exists a (unique) continuous linear transformation $\d_kf_\gamma:V\to U$ with:

$$\small\lim_{h\to0\\h\in V}\frac{\|f(x_1+\gamma_1(h),\cdots,x_{k-1}+\gamma_{k-1}(h),x_k+h,x_{k+1}+\gamma_{k+1}(h),\cdots,x_n+\gamma_n(h))-f(x)-\d_kf_\gamma(x)(h)\|}{\|h\|}\\=0$$

Here $\d\gamma_i(0)(h)$ represents the change in the $i^{\rm th}$ coordinate of the perturbation $(x+)\gamma$ which represents the notion of $\d x_i/\d x_k$, since, loosely speaking, we have $\d x_k=h$. This expression is talking about the changes in $f$ as we approach $x$ "mostly" along the $k^{\rm th}$-coordinate axis but with some controlled deviations $\gamma$ which affect the other coordinates.

It can be shown that if $\d f$ exists, then this (and something more general) holds, and the magic $\d_kf_\gamma(x)$ is essentially a precise version of $(\ast)$: $$\d_kf_\gamma(x):=\partial_kf(x)+\sum_{1\le i\le n\\i\neq k}\partial_if(x)\circ\d\gamma_i(0)$$

Define $\Gamma:V\to V^n$ via $y\mapsto(\gamma_1(y),\cdots,\gamma_{k-1}(y),y,\gamma_{k+1}(y),\cdots,\gamma_n(y)$.

Then the numerator is just: $$f(x+\Gamma(h))-f(x)-D_f(x)(\d\Gamma(0)(h))\\=f(x+\Gamma(h))-f(x)-D_f(x)(\Gamma(h))+D_f(x)(\Gamma(h)-\Gamma(0)-\d\Gamma(0)(h))$$And note that $\Gamma(h)=\Gamma(0)+\d\Gamma(0)(h)+o(h)=\d\Gamma(0)(h)+o(h)$ so $\limsup_{h\to0\\h\in V}\|\Gamma(h)\|/\|h\|\le\|\d\Gamma(0)\|$ follows easily.

For sufficiently small $h$ and generic $\epsilon>0$ we have $\frac{1}{\|h\|}\le\frac{\|\d\Gamma(0)\|+\epsilon}{\|\Gamma(h)\|}$ whenever $\Gamma(h)$ is nonzero.

From this it is straightforward to conclude, the continuity of $\d\Gamma(0)$ and $D_f(x)$ being important.


The differential $\d f$ is a local approximation of the change in $f$ via a linear transformation. The partial derivative is what you get if you throw away a lot of information and just view $f$ as a single variate function restricted to a particular coordinate: yes, it is looking at a linear approximation, but it doesn't capture the change w.r.t any other coordinates.

The total derivative $\d f/\d x_k$ intuitively expresses how to approximate the change in $f$ as you deviate from $x$ via a known amount in the $k^{\rm th}$ coordinate and by a varying amount in the other coordinates. But you have to translate the highly informal notation "$\d x_j/\d x_k$" as: "if you fix a particular path to $x$ which is differentiable, then ...": $\d\gamma_i(0)(h)$ is capturing this idea of $\d x_i/\d x_k$, but doing so precisely. To fully formalise $\d_k f$ as a function, we could work on some generalised tangent space, but I won't go there because I have neither the experience nor the will.

The difference between partial and total differentiation is that (total) differentiation claims that not only is $f$ locally linear, in a precise sense, w.r.t changes in one coordinate, but it is so in all coordinates, and I get a good picture of how $f$ behaves around a particular point when I totally differentiate. Partial differentiation blinds me to a single coordinate and I may as well have forgotten $f$ was originally defined on $V^n$ rather than just $V$.

$\partial w/\partial r$ differs from $\d w/\d r$ only in that $\d w/\d r$ is a (loose) expression informing one about variation along arbitrary perturbations whereas $\partial w/\partial r$ informs one about variation along the very simple perturbation $h\mapsto(0,h)$.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .