Is $d^2y/dx$ a valid mathematical notation? I have often seen "the second derivative of y with respect to x" written as $${d^2y\over dx^2},$$ but I don't understand the reason for this notation. I have always seen it written as $${d^2y\over dx^2},$$ and never as $${d^2y\over dx}.$$ Would $d^2y\over dx$ be a valid notation as well, and would it have a different meaning from $d^2y\over dx^2$?
 A: The derivative of $y$ with respect to $x$ can be written as
$$\frac{\operatorname{d}}{\operatorname{d}\!x} \, y $$
Usually, we bring the $y$ up into the numerator to shortern the notation. So, what is the second derivative, well - it's the derivative of the derivative:
$$\frac{\operatorname{d}}{\operatorname{d}\!x} \left( \frac{\operatorname{d}}{\operatorname{d}\!x} \, y \right) = \frac{\operatorname{d}}{\operatorname{d}\!x} \, \frac{\operatorname{d}}{\operatorname{d}\!x} \, y = \frac{\operatorname{d^2}}{\operatorname{d}\!x^2} y $$
Again, we usually bring the $y$ up into the numerator.
I have never seen the notation $\tfrac{\operatorname{d}^2\!y}{\operatorname{d}\!x}$ in my life. I would suggest that it is meaningless. It's tempting to try to derive some meaning for it by thinking of it as the exterior derivative $\operatorname{d}\tfrac{\operatorname{d}\!y}{\operatorname{d}\!x}$, but that seems to be mixing up two different types of notation, and is best to be avoided. 
A: As in the other answers, the main response to the question is that probably something is wrong... since the basic Leibniz notation would never write ${d^2y \over dx}$.
The only possible sense would be an "infinitesimal" change in the derivative ${dy\over dx}$, in Leibniz' notation indeed $d{dy \over dx}$, though I've seen this only very rarely, and it would rarely be useful.
Nevertheless, there are some manipulations to solve differential equations that do exactly make use of similar ideas. For example, in one dimension, Newton'e inverse square law ${d^2y\over dx^2}={-1\over y^2}$ can be rewritten (usefully!) as
$$
{-1\over y^2} = {d^2 y\over dx^2} = {d\over dx}{dy\over dx}
= {d(y')\over dx} = {dy'\over dy}{dy\over dx} = {dy'\over dy}\,y'
$$
Then ${-dy\over y^2}=y'\,dy'$ gives ${1\over y}={1\over 2}(y')^2$, and so on. :)
A: The notation you've often seen for the second derivative is the notation Leibniz used:
$$\dfrac {d^2 y}{dx^2} = \dfrac{d}{dx}\left(\frac {dy}{dx}\right) \tag{1}$$
Regarding the second question, no, $\dfrac{d^2y}{dx} = d\left(\dfrac {dy}{dx}\right)$ is not valid, and is rather meaningless.
