# Why is the 2nd derivative written as $\frac{\mathrm d^2y}{\mathrm dx^2}$?

In Leibniz notation, the 2nd derivative is written as $$\dfrac{\mathrm d^2y}{\mathrm dx^2}\ ?$$

Why is the location of the $2$ in different places in the $\mathrm dy/\mathrm dx$ terms?

-
Mostly to confuse you. (I am somewhat serious.) –  Pete L. Clark Mar 5 '11 at 3:53
It's somewhat logical that squaring the operator $\frac{d}{dx}$ results in $\frac{d^2}{dx^2}$ though... now let it operate on $y$. –  Myself Mar 5 '11 at 3:57
@Pete L. Clark: Really? I mean, there are ways of making the notation rigorous... –  Jesse Madnick Mar 5 '11 at 4:17
@Jesse: not really really. I agree that the notation is sensible (as evidenced by the answers below). But from a pedagogical perspective, I have found that explaining it is often more trouble than it's worth: it's tempting to switch to $y''$ instead. Really really the entire Leibniz notation, suggesting a ratio of differentials, is somewhat unfortunate. You could make it rigorous using (e.g.) nonstandard analysis, but the average student -- even if she is a future mathematician -- is not going to see or use that perspective. –  Pete L. Clark Mar 5 '11 at 4:23
@Jesse: the same remarks apply to your (nice) explanation: try it out on a calculus student, or even a typical undergrad math major, and see what kind of response you get. –  Pete L. Clark Mar 5 '11 at 4:27

Quite simply,

$$\frac{d}{dx}\left(\frac{d}{dx}(y)\right) = \frac{d}{dx}\left(\frac{dy}{dx}\right) = \frac{d\,dy}{dx\,dx} = \frac{d^2 y}{dx^2}$$

-

Purely symbolically, if we accept that $dy = f'(x)\,dx$, and treat $dx$ as a constant, then $$d^2y = d(dy) = d(f'(x)\,dx) = dx\,d(f'(x)) = dx\,f''(x)\,dx = f'(x)\,(dx)^2,$$ so dividing yields: $$\frac{d^2y}{(dx)^2} = \frac{d^2y}{dx^2} = f''(x).$$

As to where this notation actually comes from, though: My guess is that it comes from a time when mathematicians primarily thought of $dx$ and $dy$ as "infinitesimal quantities." There are ways of doing so rigorously (via non-standard analysis), and perhaps there is a way of making this notation rigorous that way.

However, we can still give rigorous meaning to these calculations without appealing to non-standard analysis by using the language of bilinear forms.

If $f$ is differentiable, we can define a map $$df\colon \mathbb{R} \to L(\mathbb{R}; \mathbb{R})$$ via $$df(x)(dx) = f'(x)\,dx.$$ Here, $L(\mathbb{R};\mathbb{R})$ denotes the set of linear maps from $\mathbb{R} \to \mathbb{R}$, and $dx$ is simply a real number. Going one step further, we can consider the map $$d^2f = d(df)\colon \mathbb{R} \to L(\mathbb{R};L(\mathbb{R};\mathbb{R})).$$ By identifying $L(\mathbb{R}; L(\mathbb{R}; \mathbb{R}))$ with $B(\mathbb{R} \times \mathbb{R};\mathbb{R})$, we get a bilinear map $$d^2f(x)(dx^1, dx^2) = dx^1\, f''(x) \,dx^2$$ whose associated quadratic form is $$d^2f(x)(dx) = f''(x)\,(dx)^2.$$ It is now perfectly legal to divide on both sides by $(dx)^2$, obtaining $$\frac{d^2f}{dx^2} = f''(x).$$

-

The $d$ is meant to represent the "change in". And the Leibniz notation is meant to remind you that you are computing the ratio between the change in $y$ and the change in $x$.

When you take the second derivative, you are computing how the derivative is changing as $x$ changes; that is, you are trying to compute $$\frac{d(y')}{dx}.$$ Now, $y'$ is itself a rate of change: it is the rate at which $y$ changes. So the "numerator" of the differential notation is telling you that you are trying to consider the change in the change in $y$, not the change in $y^2$ (which is what "$dy^2$" would represent).

So you are trying to describe the change in "the-change-in-$y$", relative to how $x$ is changing. $x$ is only changing "once", so you should have a single $d$ in the "denominator" (remember, not really a denominator). So why $x^2$? Because you are trying to figure out the change of blah as $x$ changes, and blah is a rate of change as $x$ changes as well. So you are taking $x$ twice, but considering only one change. Hence, single $d$, but $x$ squared.

-

There is no possible way of understanding why Leibniz invented the notation he did unless you think about calculus the way Leibniz did, using infinitesimal numbers.

Take the velocity $dx/dt$. Leibniz would have described it as the ratio of two infinitesimals. (Nonstandard analysis shows that this idea can be made rigorous, but in any case limits didn't exist in Leibniz's time.) The numerator is an infinitesimal number with units of meters. The denominator is an infinitesimal with units of seconds. You divide them, and it gives m/s.

In the acceleration, $d^2x/dt^2$, the numerator is written to suggest something with units of meters, and the denominator to suggest units of seconds squared, giving the correct units of m/s$^2$.

-