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?
Calculus – Leibniz Notation for High-Order Derivatives
calculusderivativesnotation
Related Solutions
I think you just did the math wrong. When using Leibniz notation, always treat it as two operations - differential followed by division. So, we are going to take the differential of $\frac{1}{\frac{dy}{dx}}$ and then divide it by $dy$:
$$\frac{d}{dy}\left(\frac{1}{\frac{dy}{dx}}\right) = \frac{d\left(\frac{1}{\frac{dy}{dx}}\right)}{dy}$$
So, let's solve for $d\left(\frac{1}{\frac{dy}{dx}}\right)$ using $u$-substitution: $$ u = \frac{dy}{dx} \\ d\left(\frac{1}{\frac{dy}{dx}}\right) = d(u^{-1}) \\ d(u^{-1}) = -u^{-2}du $$
Now we have the basic form of the differential, so let's find out $du$:
$$ u = \frac{dy}{dx} \\ du = d\left(\frac{dy}{dx}\right) \\ du = \frac{dx\cdot d^2y - dy\cdot d^2x}{dx^2} \\ $$
Now, going back, the basic form of the differential was $u^{-2}du$. So, substituting our $u$s and $du$s we get:
$$ d\left(\frac{1}{\frac{dy}{dx}}\right) = -\left(\frac{dy}{dx}\right)^{-2}\cdot\frac{dx\cdot d^2y - dy\cdot d^2x}{dx^2} \\ = -\left(\frac{dx^2}{dy^2}\right)\cdot\frac{dx\cdot d^2y - dy\cdot d^2x}{dx^2} \\ = - \frac{dx\cdot d^2y - dy\cdot d^2x}{dy^2} \\ = \frac{dy\cdot d^2x - dx\cdot d^2y}{dy^2} \\ = \frac{d^2x}{dy} - dx\frac{d^2y}{dy^2} \\ = \frac{d^2x}{dy} - dx\cdot 0 \\ $$
Now you may be surprised that $\frac{d^2y}{dy^2}$ reduces to 0. However, think of it this way. This is read as the "second derivative of y with respect to itself". The first derivative of y with respect to y is $\frac{dy}{dy} = 1$. So if the first derivative is a constant, then the second derivative must be zero. (For more info on this, see my blog post here)
Now, this reduces to: $$ d\left(\frac{1}{\frac{dy}{dx}}\right) = \frac{d^2x}{dy} \\ $$
This is the differential - to get the derivative we divide by $dy$:
$$ \frac{d}{dy}\left(\frac{1}{\frac{dy}{dx}}\right) = \frac{d^2x}{dy^2} $$
Congratulations, you have met one of the worst ambiguities in mathematical notation!
Assume you have a function of two variables, $f \colon A \times B \to \mathbb{R}$, where $A$ and $B$ are subsets of $\mathbb{R}$. The notation $$\frac{\partial f}{\partial x}(x_0,y_0)$$ is commonly used to denote the value of the partial derivative of $f$ with respect to the first variable, evaluated at $(x_0,y_0)$. This is the cleanest use of the notation for partial derivatives.
Anyway, it sometimes happens to use some lazy piece of notation such as $$\frac{\partial f(x,g(x,y))}{\partial x}$$ to denote the partial derivative of the map $(x,y) \mapsto f(x,g(x,y))$. This is imcompatible (in general) with the interpretation of the same formula as
The derivative of $f$ with respect to the first variable, evaluated at the point $(x,g(x,y))$.
This is bad, but it seems we have to live with it. Why? Just spend a couple of minutes and think about the second interpretation. To be rigorous, we should have written $$ \frac{\partial}{\partial x} \left( f \circ \left( (x,y) \mapsto (x,g(x,y)) \right) \right) (x,y), $$ which is a true nightmare.
Best Answer
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.