TITLE: What is the mathematical truth behind the Leibniz notation in differentiating twice or more?
QUESTION [6 upvotes]: So $f: \mathbb{R} \to \mathbb{R}$ is $n>1$ (or more) times differentiable.  
The notation of the first derivative makes perfect "sense" with regard to what's going on:
$$\lim_{h \to 0} \frac{f(x+h) - f(x)}{h} \equiv \frac{df}{dx}$$
The second makes me tilt my head a bit (to no effect):
$$\lim_{h \to 0} \frac{\frac{df}{dx}\big|_{x+h} - \frac{df}{dx}\big|_{x}}{h} = \frac{d}{dx} \frac{df}{dx} = \frac{d^2 f}{dx^2}$$ 
This notation looks like as if:
$$\frac{d^2 f}{dx^2} = \lim_{h \to 0} \frac{(f(x+h)-f(x))^2}{(x+h)^2-x^2}$$
But I couldn't find any sense in that..
Now, I was told that this notation has complete (more advanced) mathematical sense.
I'd like to know where to look for it.

REPLY [5 votes]: Assuming that $f(x)$ is twice differentiable, we have
$$ \frac{d^2}{dx^2}[f(x)]=\frac{d}{dx}\left[\frac{d}{dx}[f(x)]\right]$$
$$=\frac{d}{dx}\left[\lim\limits_{h\to 0} \frac{f(x+h)-f(x)}{h}\right]$$
$$=\lim\limits_{h\to 0} \frac{\frac{d}{dx}[f(x+h)-f(x)]}{h}$$
$$ =\lim\limits_{h\to 0} \frac{\lim\limits_{k\to 0}\frac{f(x+h+k)-f(x+k)-f(x+h)+f(x)}{k}}{h} $$
$$ =\lim\limits_{h\to 0}\lim\limits_{k\to 0} \frac{f(x+h+k)-f(x+k)-f(x+h)+f(x)}{hk} $$
You might come across the following formula for the $n^{\mathrm{th}}$ derivative
$$
\frac{d^n}{dx^n}[f(x)]=\lim_{h\to 0} \frac{1}{h^n}\sum_{k=0}^n (-1)^n\left(\begin{array}{c}n \\ k \end{array}\right)f(x+kh)
$$
Although in some cases this limit does output a value that is equivalent to the $n^{\mathrm{th}}$ derivative, this formula is ultimately ill defined. A more precise definition would have $n$ limits as opposed to just one. Furthermore, there are cases in which this limit exists, but $f(x)$ is not $n$ times differentiable.