2

Are partial derivative and total derivative different for a system with independent variables? The term $\frac{df(x,y)}{dx} = \frac{\partial f(x,y)}{\partial x}+\frac{\partial f(x,y)}{\partial y}\frac{dy}{dx}$. But as $y$ and $x$ are independent, so $\frac{dy}{dx} = 0$. So, how are two different?

1 Answers1

4

Strictly speaking, the equation you have written down is riddles with notational ambiguities. What is going on is that there are actually three different functions involved:

  • We have a function $f:\Bbb{R}^2\to\Bbb{R}$. This means it takes in a tuple of numbers as an input and spits out a real number as output.
  • We then have a function $g:\Bbb{R}\to\Bbb{R}$. This takes in a real number as input and spits out a real number.
  • Finally, we have a third function $F:\Bbb{R}\to\Bbb{R}$. This function is defined in a very specific way from the previous two functions: we define for each $x\in\Bbb{R}$, $F(x):= f(x,g(x))$. Note that $F$ and $f$ are COMPLETELY DIFFERENT FUNCTIONS (afterall how can two functions be equal if one of them has domain $\Bbb{R}^2$ and the other has domain $\Bbb{R}$). We say that $F$ is obtained from $f$ via composition.

Let me just re-emphasize what the third bullet point means. If you give me a specific real number $x\in\Bbb{R}$, then the quantity $g(x)$ is also a specific real number. The quantity $(x,g(x))$ is a specific tuple of real numbers. So, $f(x,g(x))$ is a specific real number. I'm only emphasizing these things because it is very important to distinguish between a function (which is a "rule") vs the value of a function when evaluated at a point of its domain (which is a certain output in the target space).

Now, what is being claimed is that by the chain rule, \begin{align} F'(x)&= (\partial_1f)_{(x,g(x))} + (\partial_2f)_{(x,g(x))}\cdot g'(x) \tag{$*$} \end{align} And of course, there is no reason at all to assume $g'=0$ identically. Here, the notation $\partial_if_{(a,b)}$ means the partial derivative of the function $f$ along the $i^{th}$ coordinate direction, evaluated at the point $(a,b)$. It is important to note that $\partial_if$ is a function, while $(\partial_if)_{(a,b)}$ is a specific real number obtained by evaluating the function on an element of its domain. I think $(*)$ is the most notationally precise and unambiguous way of writing things down. A slightly more common way of writing things is as follows: \begin{align} \dfrac{dF}{dx}\bigg|_x &=\dfrac{\partial f}{\partial x}\bigg|_{(x,g(x))} + \dfrac{\partial f}{\partial y}\bigg|_{(x,g(x))}\cdot \dfrac{dg}{dx}\bigg|_{x} \tag{$**$} \end{align} This is I think as precise as you can get when using Leibniz's notation.

Hopefully by now it is clear that your confusion arises from a poor notational choice. Wherever you read that equation from, they're reusing the same letters in two different places with two different meanings, which is why you're getting confused:

  • On the left hand side, they're using the letter $f$ when they should have actually been using $F$.
  • On the right hand side, the meaning of the $y$ in $\frac{\partial f}{\partial y}$ is different from the meaning of $y$ in $\dfrac{dy}{dx}$.
  • Also, they're not indicating the point of evaluation of the derivatives.

The most ambiguous (for a beginner) way of writing down this relationship is \begin{align} \dfrac{df}{dx}&=\dfrac{\partial f}{\partial x}+\dfrac{\partial f}{\partial y}\dfrac{dy}{dx}. \tag{$***$} \end{align}


See also this other answer of mine for similar things about varying levels of precision in notation, and this answer, which deals with derivatives in the setting of Lagrangian mechanics.

peek-a-boo
  • 55,725
  • 2
  • 45
  • 89
  • But what if $F:=f(x,g(y))$ and not $F:=f(x,g(x))$, where $x$ and $y$ are independent variables. – Rajesh Kumar Jan 29 '21 at 06:28
  • @RajeshKumar that's a different question, which is not what is intended by whoever wrote that equation. If instead you had a function $H(x,y)=f(x,g(y))$ (I use $H$ to avoid confusion with the $F$ in my answer), then the correct derivative results are $(\partial_1H){(x,y)} = (\partial_1f){(x,g(y))}$ and $(\partial_2H){(x,y)}=(\partial_1f){(x,g(y))}+ (\partial_2f){(x,g(y))}\cdot g'(y)$. I'm guessing you're interested the first equation; but notice the different points of evaluation! On the LHS we have $(\partial_1H){(x,y)}$, but on the RHS we have $(\partial_1f)_{(x,g(y))}$. – peek-a-boo Jan 29 '21 at 06:32
  • We are NOT claiming that $(\partial_1H){(x,y)}= (\partial_1f){(x,y)}$, which is why we do NOT write down simply $\partial_1H = \partial_1f$, or in more common notation, we are NOT saying $\frac{\partial H}{\partial x}=\frac{\partial f}{\partial x}$. It is very crucial to notice the different points of evaluation (it goes back to my emphasis about functions vs function values)! – peek-a-boo Jan 29 '21 at 06:34
  • But if $g'(y) = \frac{dg}{dx}_{y}$, then should it be equal to zero? – Rajesh Kumar Jan 29 '21 at 06:35
  • @RajeshKumar If I tell you $f(x,y)=x^3+y$ and that $g(y)=\sin y$. Do all these computations explicitly and tell me what you find. i.e calculate $F(x)=f(x,g(x))$, calculate $H(x,y)=f(x,g(y))$, calculate all the various derivatives etc. Also, read the first answer I linked to; I explain how the computations work in a specific example (though different notation). – peek-a-boo Jan 29 '21 at 06:35
  • Is it then $\frac{df}{dx}_{x,y}$ has no meaning at all? – Rajesh Kumar Jan 29 '21 at 06:38
  • @RajeshKumar that's right. The notation $d$ is used only for functions of a single variable. If someone ever writes that, they obviously mean something else, but are just too lazy to write it more explicitly because they expect their reader to fill in the gaps. – peek-a-boo Jan 29 '21 at 06:40
  • Thanks a lot. So, if I see $\frac{df}{dx}{x,y}$ somewhere, it means the person was referring to the partial derivative only $\frac{\partial f}{\partial x}{x,y}$ – Rajesh Kumar Jan 29 '21 at 06:41
  • @RajeshKumar yes, although in any halfway respectable source, you should never see something like $\dfrac{df}{dx}\bigg|_{(x,y)}$ – peek-a-boo Jan 29 '21 at 06:43