Leibniz notation for high-order derivatives What is the reason for the positioning of the superscript $n$ in an $n$-order derivative $\frac{d^ny}{dx^n}$?  Is it just a convention or does it have some mathematical meaning?
 A: We can unpack what is meant, mathematically, by $\dfrac {d^ny}{dx^n}$:
$$\frac{d^n y}{dx^n} = \frac{d}{dx}\left(\dfrac d{dx}\left(\frac d{dx}\cdots\left(\frac{dy}{dx}\right)\right)\right)=\frac{\underbrace{d\cdot d \cdots \cdot d}_{n\;\text{times}}y}{\underbrace{dx \cdot dx\cdots dx}_{n\;\text{times}}}$$
A: $$
\frac{d^2 y}{dx^2} = \frac{d}{dx}\frac{dy}{dx}=\frac{d\cdot dy}{dx \cdot dx}
$$
Of course, formally.
A: The $n$th derivative is the $n$-fold composition of the first derivative operator:
$$ \frac{d^n y}{d x^n} = \left(\frac{d}{dx}\right)^n(y). $$
So a simple justification is to just treat the $d/dx$ as a fraction and distribute the exponent to the top and bottom. This is "valid" in a certain sense - if you look at the finite approximations to the second derivative for example, you have
$$ \frac{d^2 y}{dx^2} \approx \frac{1}{\delta x}\delta\left(\frac{\delta y}{\delta x}\right) = \frac{\delta(\delta y)}{(\delta x)^2}$$
where $\delta f = f(x+\delta x) - f(x)$ is the change in $f(x)$ when you change $x$ by $\delta x$.
A: Several people have already posted answers saying it's $\left(\dfrac{d}{dx}\right)^n y$, so instead of saying more about that I will mention another aspect.
Say $y$ is in meters and $x$ is in seconds; then in what units is $\dfrac{dy}{dx}$ measured?  The unit is $\text{meter}/\text{second}$.  The infinitely small quantities $dy$ and $dx$ are respectively in meters and seconds, and you're dividing one by the other.
So in what units is $\dfrac{d^n y}{dx^n}$ measured?  The thing on the bottom is in $\text{second}^n$ (seconds to the $n$th power); the thing on top is still in meters, not meters to the $n$th power.  The "$d$" is in effect unitless, or dimensionless if you like that word.
I don't think it's mere chance that has resulted in long-run survival of a notation that is "dimensionally correct".  But somehow it seems unfashionable to talk about this.
