27
$\begingroup$

Back in high school—back in the 1900s, as my sons say—when our calculus teacher was introducing the chain rule...

$\frac{dy}{dx} = \frac{dy}{dt} \cdot \frac{dt}{dx}$

...he made a special point of saying that we shouldn't think of the $dt$ as cancelling out in this equation. He said it was just happened to look that way. We were supposed to consider $\frac{\partial}{dx}$ as an indivisible operator. (That was probably not his term.)

So I was confused when my son's calculus book introduced differentials, and explicitly encouraged algebraic manipulation of expressions like $\frac{dy}{dx}$ — multiplying both sides of an equation by $dx$, and things like that. I've looked into it somewhat, and as far as I can tell this is regarded as mathematically legitimate. (Feel free to correct me on that.)

I'm mostly just curious now why our calculus teacher warned us off from thinking of Leibniz notation in this way. I could imagine that when students think about $\frac{dy}{dx}$, then there could be a lot of algebraic rabbit trails. Are there other reasons for discouraging high school students from thinking about differentials?

$\endgroup$
15
  • 5
    $\begingroup$ What book is this? Most of the popular textbooks still discourage students from thinking of the derivative as a quotient, and they'll mention that cancelling differentials doesn't give a valid proof of the chain rule. But there's usually a later section on "differentials" in which they'll define the differential of $y=f(x)$ to be $dy=f'(x)dx$, and they'll use differentials to do linear approximation. This paper argues that the reason for this is to stop students from thinking of differentials as infinitesimals. $\endgroup$ Commented Oct 12, 2023 at 0:16
  • 2
    $\begingroup$ I edited with what I hope is a more informative title -- OP, if you think it's not good, feel free to edit or revert. $\endgroup$ Commented Oct 12, 2023 at 1:16
  • 2
    $\begingroup$ I took a look, and Saxon Calculus does show some informal arguments involving cancelling differentials and referring to them as infinitesimals. It doesn’t go as far as what some would consider “teaching with differentials.” This answer goes into some of the pros and cons of teaching with differentials. $\endgroup$ Commented Oct 12, 2023 at 10:50
  • 2
    $\begingroup$ Is this a duplicate of math.stackexchange.com/questions/21199/… ? $\endgroup$ Commented Oct 16, 2023 at 15:44
  • 1
    $\begingroup$ Does this answer your question? Why are we so careful in saying that dy/dx is not a fraction? $\endgroup$ Commented Oct 20, 2023 at 11:17

7 Answers 7

36
$\begingroup$

If you have a function $f(x,y)$ where $x=x(t)$ and $y=y(t)$ are themselves functions of a parameter $t,$ and you blindly cancel out differentials, then you can get to incorrect statements like

$$\require{cancel}\dfrac{\partial f}{\partial t} = \dfrac{\partial f}{\cancel{\partial x}} \cdot \dfrac{\cancel{\partial x}}{\partial t} = \dfrac{\partial f}{\cancel{\partial y}} \cdot \dfrac{\cancel{\partial y}}{\partial t}, \quad {\color{red}\times}$$

whereas what's actually true is

$$\dfrac{\partial f}{\partial t} = \dfrac{\partial f}{\partial x} \cdot \dfrac{\partial x}{\partial t} + \dfrac{\partial f}{\partial y} \cdot \dfrac{\partial y}{\partial t}. \quad {\color{green}\checkmark}$$

You can't cancel because the $\partial f$'s in the numerators of $\dfrac{\partial f}{\partial t},$ $\dfrac{\partial f}{\partial x},$ $ \dfrac{\partial f}{\partial y}$ all mean different things.

  • The $\partial f$ in the numerator of $\dfrac{\partial f}{\partial t},$ represents the change in $f$ attributed to the change in $t.$

  • The $\partial f$ in the numerator of $\dfrac{\partial f}{\partial x}$ represents the change in $f$ attributed to the change in $x.$

  • The $\partial f$ in the numerator of $\dfrac{\partial f}{\partial y}$ represents the change in $f$ attributed to the change in $y.$

But in single-variable calculus (which is likely the focus of your son's textbook), you're working exclusively with functions that have only one input variable. And if you have a function $f(x)$ where $x=x(t)$ is itself a function of a parameter $t,$ then it's true that

$$\dfrac{\partial f}{\partial t} = \dfrac{\partial f}{\partial x} \cdot \dfrac{\partial x}{\partial t}.$$

The above is conventionally written with "total" derivative symbols ($\mathrm d$ means "total", $\partial$ means "partial") since the change attributed to the single variable is the same as the total change of the function.

$$\dfrac{\mathrm df}{\mathrm dt} = \dfrac{\mathrm df}{\mathrm dx} \cdot \dfrac{\mathrm dx}{\mathrm dt}$$

So in general, you can manipulate total derivatives ($\mathrm d$) like fractions, but you can't do the same with partial derivatives ($\partial$).

$$\begin{align*} \require{cancel} \textrm{valid:} \quad &\dfrac{\mathrm df}{\mathrm dt} = \dfrac{\mathrm df}{\cancel{\mathrm dx}} \cdot \dfrac{\cancel{\mathrm dx}}{\mathrm dt} \quad \color{green}\checkmark \\[5pt] \textrm{NOT valid:} \quad &\dfrac{\partial f}{\partial t} = \dfrac{\partial f}{\cancel{\partial x}} \cdot \dfrac{\cancel{\partial x}}{\partial t} \quad \color{red}\times \end{align*}$$


Response to comments about notation: The streamlined notation makes this answer is friendly for non-experts. Yes, it relies on some intuitive inference as to what is meant -- for instance, given $f(x,y),$ $x(t),$ $y(t),$ the streamlined notation $\dfrac{\partial f}{\partial t}$ refers to $\dfrac{\partial f(x(t),y(t))}{\partial t}.$ But non-experts generally find it easier to make reasonably intuitive inferences like this than to work with technically complete notation that overwhelms them. (Those who disagree: maybe it was different for you when you were a student, but that's how it is for 99% of students.)

If anyone has a suggested improvement that will make the notation more technically unambiguous without making the answer less friendly for non-experts, then feel free to make an edit suggestion.

$\endgroup$
12
  • 11
    $\begingroup$ I think that you want to avoid the non-standard notation of the lone $\partial f$, $\partial x$, and $\partial y$ entirely and instead use the usual notation for the total differential $df = \frac{\partial f}{\partial x} dx+ \frac{\partial f}{\partial y} dy$. (i.e. the dual to the gradient.) $\endgroup$
    – Adam
    Commented Oct 11, 2023 at 18:47
  • $\begingroup$ Good point @Adam. Edited the answer to make that more clear. $\endgroup$ Commented Oct 11, 2023 at 19:45
  • 9
    $\begingroup$ You could argue that $\frac{\partial f}{\partial t}$ is also abuse of notation. The partial derivative means that we change one of $f$'s arguments and keep all the other arguments constant. Which argument of $f$ is $t$? None is! $f$ is a function of two variables: $f: (x,y)\mapsto f(x,y)$. We have secretly composed $f(x,y)$ and $x(t), y(t)$ together. So better would be to say $\frac{\mathrm df}{\mathrm dt}=\frac{\partial f}{\partial x}\frac{\partial x}{\partial t}+\frac{\partial f}{\partial y}\frac{\partial y}{\partial t}$. Usually I would not care about this, but in this case it is relevant $\endgroup$ Commented Oct 12, 2023 at 14:33
  • $\begingroup$ @AccidentalTaylorExpansion but in the multivariable example I gave, $x(t,u)$ and $y(t,u)$ are functions of two parameters. If you peel the arguments back a later and interpret $f(x,y)$ as $f(t,u),$ then it's still a multivariable function, and you can't take a total derivative with respect to one input of a multivariable function. $\endgroup$ Commented Oct 12, 2023 at 15:02
  • 1
    $\begingroup$ @ReinstateMonica $u$ is there so that it's proper to use $\frac{\partial f}{\partial t},$ not $\frac{\mathrm df}{\mathrm dt}.$ And the reason why I wanted to use only partials in the incorrect example is that it lets us bypass a discussion of $\mathrm d$ vs $\partial.$ I wanted to avoid getting caught up in that nuance at the beginning. One thing at a time. $\endgroup$ Commented Oct 12, 2023 at 15:47
12
$\begingroup$

There is a nice write up at the included link with an application to thermodynamics. I've included two of the images (subsequently transcribed) that give the core of the argument. Single variable functions and differentials (derivatives with $d$) are safe to use as fractions, but multivariate functions and partial derivatives (with a $\partial$) aren't.

https://johncarlosbaez.wordpress.com/2021/09/13/the-cyclic-identity-for-partial-derivatives/

WHEN YOU REALIZE, SADLY, THAT DERIVATIVES DON'T ALWAYS ACT LIKE FRACTIONS

Suppose $u$, $v$, $w$ are functions on the plane and you can take any two as coordinates and write the third as a smooth function of those two. Then

$$ \frac{\partial u}{\partial v}\Bigr|_w \frac{\partial v}{\partial w}\Bigr|_u \frac{\partial w}{\partial u}\Bigr|_v = \color{red}{-1} $$

AN EXAMPLE

Say $u$, $v$, $w$ are these functions on the plane:

$$ u = x \quad v = y \quad w = x + y $$

Then each is a function of the other two:

$$ u = w - v \quad v = w - u \quad w = u + v $$

and we get

$$ \underbrace{\frac{\partial u}{\partial v}\Bigr|_w}_{= -1} \underbrace{\frac{\partial v}{\partial w}\Bigr|_u}_{= 1} \underbrace{\frac{\partial w}{\partial u}\Bigr|_v}_{= 1} = \color{red}{-1} $$

$\endgroup$
1
  • 2
    $\begingroup$ So, we can only cancel differentials in even-dimensional contexts. Just kidding. This is a good example, Sir Roger Penrose gives it as one of the fundamental confusions of calculus in his "Road to Reality" book if memory serves me correctly. $\endgroup$ Commented Oct 14, 2023 at 16:30
5
$\begingroup$

First: ${\partial}\over{\partial x}$ $\neq$ ${d}\over{d x}$

The difference being the concepts in multivariable calculus vs single variable calculus are different and for different purposes. But by the context of your question I'm pretty sure you meant ${d}\over{d x}$, so let's go with that.

Second: The cancel is actual a pretty helpful tool when solving differential equations, so I do love it. Buuuut, I 100% understand why you should be taught it last and be dissuaded from using it.

The reason why he said not to think of it like that is because its lazy, without conceptual meaning, and an abuse of notation. However, it's ironically right unless you go further with the thought. No seriously here's a simple proof.

$$f(x+dx)=f(x)+df(x)$$ So the chain rule comes naturally from: $$df(g(x))+f(g(x))=$$ $$f(g(x+dx))=f(g(x)+dg(x))$$ And the cancel: $$\frac{1}{dg(x)}\frac{dg(x)}{dx}=\frac{1}{dx}$$ And all together is the chain rule as you know and love: $$\frac{df}{dx}=\frac{df}{dg}\frac{dg}{dx}$$

So from this you may tell that, yes, the cancel is really there, but also an erroneously incomplete perception on the subject. In fact, you can do calculus without the fractions at all using lie algebra or using the techniques I used above.

$$[D,x]=Dx-xD=1 \implies [D,f(x)]=f'(x)$$

But probably the most horrendous abuse of notation is with the second derivative.

$$\frac{d^2f}{dx^2} \neq \frac{d^2f}{dg^2}\frac{dg^2}{dx^2}=\frac{d^2f}{dg^2}\left(\frac{dg}{dx}\right)^2$$

Nor is it anything remotely similar because if you start treating it as a linear algebra you should understand that the algebra is non-commutative which means $ab \neq ba$ and implies $(ab)^c \neq a^c b^c$. The product rule makes it more complicated:

$$\left(g'\frac{d}{dg}\right)^2=$$ $$g'\frac{d}{dg}g'\frac{d}{dg}=$$ $$g'\left(\frac{d}{dg} \cdot g'\right)\frac{d}{dg}=$$ $$g'\left(g''+g'\frac{d}{dg}\right)\frac{d}{dg}=$$ $$g'g''\frac{d}{dg}+(g')^2\frac{d^2}{dg^2}=$$

Note that this, as expected from the product rule, doesn't equal the equation that is wrongly created using just the cancel.

$\endgroup$
1
  • $\begingroup$ That horrendous equation with the second derivative is true if you interpret the second derivative notation according to it's original meaning. See my answer. $\endgroup$ Commented Oct 24, 2023 at 4:31
4
$\begingroup$

The reason given in the accepted answer is valid, but I'd like to point out something that Ben Crowell (user507) said in a comment several years back: that problem has got nothing to do with calculus, infinitesimals, or treating derivatives as fractions, but more with an incomplete notation used to denote the fractions involved. Because the same problem arises if we look at a linear function $z=f(x,y)$, with $x,y$ themselves being linear functions of $t$, and ask for $\frac{\Delta z}{\Delta t}$ (no calculus, no infinitesimals, true fractions). In that case we also have (with incomplete notation) $$ \Delta z = \frac{\Delta z}{\Delta x}\Delta x + \frac{\Delta z}{\Delta y}\Delta y$$ and dividing by $\Delta t$ gives the 'chain rule'. Here we could literally cancel $\Delta x$ in the first summand and $\Delta y$ in the second, but then we arrive at the nonsense $\Delta z= 2\Delta z$. How come? The reason is that in the first summand $\Delta z$ denotes the change of $z$ when $y$ is held constant, while in the second it denotes the change of $z$ while $x$ is held constant. If the notation made explicit that those two $\Delta z$ are different, we could in principle avoid the problem. For instance writing $$ \Delta z = \frac{\Delta z|_{y=\text{const.}}}{\Delta x}\Delta x + \frac{\Delta z|_{x=\text{const.}}}{\Delta y}\Delta y$$

If we now cancel we arrive at

$$ \Delta z = \Delta z|_{y=\text{const.}}+ \Delta z|_{x=\text{const.}}$$

which might seem unusual but at least we wouldn't reduce it to $\Delta z = 2 \Delta z$. Similarly we could explain to a student that

$$ \frac{\Delta z}{\Delta t} \neq \frac{\Delta z|_{y=\text{const.}}}{\Delta x}\frac{\Delta x}{\Delta t}$$

not because we are not allowed to cancel, but simply because in general $\Delta z\neq \Delta z|_{y=\text{const.}}$.

Returning to partial derivatives $\frac{\partial z}{\partial x}$ etc. the same problem arises there: the notation does not show explicitly which variables are held fixed when we take the derivative with respect to $x$. Jacobi was the first to draw attention to that problem, but his proposed solution was silly and its adoption probably caused more confusion. (It's likely the reason for the discussion under the accepted answer). If instead we use a more cumbersome but explicit notation like $\left.\frac{\partial z}{\partial x}\right|_{y=\text{const.}}$, which physicist sometimes write as $\left(\frac{\partial z}{\partial x}\right)_y$, then we could again explain why that false chain rule in the accepted answer is wrong: it becomes $$ \left.\frac{\partial z}{\partial t}\right|_{u=\text{const.}} \neq \left.\frac{\partial z}{\partial x}\right|_{y=\text{const.}} \left.\frac{\partial x}{\partial t}\right|_{u=\text{const.}} $$ and we are not allowed to cancel the changes in $x$ (i.e. $\partial x$), since in the first factor $\partial x$ is considered under the assumption that $y$ is constant while in the second factor it is considered under the assumption that $u$ is constant. (I added the additional variable $u$, like Justin did in a comment, to avoid a discussion about the difference between $\partial$ and $d$. So I'm assuming $x,y$ are both functions of $t,u$.)

The other problem, mentioned in davdan angelo's answer, relating to second derivative notation also disappears, if we understand where that notation for second derivatives comes from: the equality $$ \frac{d\frac{dy}{dx}}{dx}=\frac{d^2y}{dx^2} $$ was historically only considered correct, under the assumption that $dx=\text{const.}$ See here. Under that assumption (and further assumptions necessary to make sense of the involved operations), the chain rule-like equation $$\frac{d^2f}{dx^2}= \frac{d^2f}{dg^2}\left(\frac{dg}{dx}\right)^2$$ in davdan angelo's answer is true: we assume $dx=\text{const.}$, $dg=\text{const.}$ and that $f$ is a function of $g$ which is a function of $x$. These assumptions imply that $g$ is a linear function of $x$ and hence the equations holds.

(For people still worrying about what the differentials actually denote: one could make them precise by interpreting variable quantities $z,x,y,f,g$ etc. as real valued smooth functions on a manifold $M$ and differentials $dx$ etc. as differentials in the sense of differential geometry. The operation $d^2 x$ would additionally require a connection on the manifold in order to talk about the differential of a differential.)

$\endgroup$
3
$\begingroup$

Mathematics is a formal language, which people often use in an informal way. Think of the symbol ×. It is a binary operator - it needs two numbers to 'work':

3 × 2 = 6

If we wrote × with only one number ("3 ×" or "× 2") it doesn't make sense.

Differentials are the same. The symbol represents the relative change of one quantity when compared to the change in another quantity. $\frac {dy}{dx} $ means "how much does y change when compared to a change in x". Writing just "dy" is writing half a statement, and in formal understanding is meaningless.

I've had students say "but we use 'dx' alone in integral calculus". No we don't. Every integral that ends with a '.dx' starts with a $\int$. They are effectively the two ends of a set of brackets, and writing either part alone doesn't make sense.

That doesn't stop people from doing it, however. Derivatives look like fractions, but are not fractions. People can manipulate them in a way similar to fractions, and in many cases will get the right answer, but what they are doing and what they think they are doing are actually two different things. When you use the Chain Rule to make an expression simpler, you are not "cancelling out".

$\endgroup$
1
  • 17
    $\begingroup$ In higher math, there actually is a fully rigorous meaning to these loose differential terms and it comes from the theory of Differential Forms. It just requires a bachelors degree level of mathematics to understand the formal definitions involved, so we don't teach it that way :+) $\endgroup$ Commented Oct 11, 2023 at 23:30
2
$\begingroup$

There are two reasons, and they both stem from problematic notations being used in calculus.

The first reason is higher-order derivatives. The common notation for the second derivative, $\frac{d^2y}{dx^2}$, cannot be used as a fraction. However, this is because it is problematic notationally. If you consider $\frac{dy}{dx}$ a fraction, and then use the quotient rule to take its derivative, the second derivative of $y$ with respect to $x$ is $\frac{d^2y}{dx^2} - \frac{dy}{dx}\frac{d^2x}{dx^2}$, which does allow for straightforward algebraic manipulations of differentials.

The second reason is partial differentials. Unfortunately, partial differentials are individually completely ambiguous as to what they refer to. If you clean up the notation, however, and make each different unambiguous, the problem goes away.

You can check out more details about both of these in the paper "Total and Partial Differentials as Algebraically Manipulable Entities" by Maria Isabelle Fite and myself.

$\endgroup$
2
  • 1
    $\begingroup$ Side note - I wrote my own calculus book, "Calculus from the Ground Up", specifically because I was annoyed at how Saxon Calculus teaches it. $\endgroup$
    – johnnyb
    Commented Oct 25, 2023 at 11:44
  • $\begingroup$ The notation in the paper introduces more problems and I suspect that a mixup between the notion of function in the modern sense and in the original sense of "function of" is the origin. You write $\partial(f,x_1)=f(x_1+dx_1,x_2,\ldots)-f(x_1,x_2,\ldots)$: The term on the right is clearly an infinitesimal number, not a function, while the term on the left is probably supposed to be a function. You cannot equate a function with a number. But independent of that, the right hand side depends on $x_2,\ldots$ so these variables should also appear in the notation on the left. $\endgroup$ Commented Oct 26, 2023 at 14:35
1
$\begingroup$

Remember that $\frac{\partial y}{\partial t}$ is actually $ \lim\limits_{h \to 0} \frac{y(t+h) - y(t)}{h} = \lim\limits_{h \to 0} \frac{y' - y}{h}$ (I'm using $y'$ to make it less busy). It's not a fraction but the limit of a fraction.

If you rewrite the original:

$\lim\limits_{h \to 0} \frac{y' - y}{x' - x} = \lim\limits_{h \to 0} \frac{y' - y}{t' - t} \cdot \lim\limits_{h \to 0} \frac{t' - t}{x' - x} $

The $t'-t$ is inside each limit, so you can't cancel them out.

$\endgroup$
3
  • $\begingroup$ Sure, you don't have a convergent limit for $1/(x'-x)$ and so trying to define the fraction $1/dx$ this way doesn't really work. (the bit with $y$ is fine, but zero) However, there are other ways to define $dx$ to give a sensible definition. e.g. differential forms or non-standard analysis. $\endgroup$
    – Adam
    Commented Oct 13, 2023 at 14:36
  • $\begingroup$ +1: I like the start of this answer and but I think it didn't get much attention because it leaves the reader confused: "If you can't cancel, then why do calculus textbooks manipulate $\dfrac{\mathrm dy}{\mathrm dx}$ as though it were a fraction? Is there a concrete example where canceling will lead you to an incorrect result? Couldn't you just assume the $h$'s are the same in each limit in the product, so that you can combine the limits and then cancel?" Just some things I imagine going on in readers' minds. $\endgroup$ Commented Oct 14, 2023 at 20:56
  • $\begingroup$ That's the modern mainstream definition. But there are other approaches like smooth infinitesimal analysis where $f'(a)$ it is defined as the unique number $m$ such that $f(a+\epsilon)=f(a)+m\epsilon$ for every infinitesimal $\epsilon$. In this definition it is quite naturally seen as a fraction. $\endgroup$ Commented Oct 20, 2023 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.