Square of a differential Just wondering, is this valid:
$$
\left(\frac{df}{dx}\right)^2=\frac{d^{2}f}{dx^{2}}
$$
 A: Beside the trivial solution $f=c_1$, as Paul Evans commented, the only solution of the differential equation $$\left(\frac{df}{dx}\right)^2=\frac{d^{2}f}{dx^{2}}$$ is $$f=c_2-\log \left(c_1+x\right)$$ This is obtained setting first $p=\frac{df}{dx}$ which reduces the equation to $p^2=\frac{dp}{dx}$  which is separable and easy to solve. Once $p$ is obtained, one more integration.
A: No.
$$\left(\frac{\text{d}f}{\text{d}x}\right)^2 = \frac{\text{d}f}{\text{d}x}\cdot \frac{\text{d}f}{\text{d}x}$$
Whilst
$$\frac{\text{d}^2f}{\text{d}x^2} = \frac{\text{d}}{\text{d}x}\left(\frac{\text{d}f}{\text{d}x}\right)$$
A: There are two specific formulae where this works, but that is all:
$$f(x) = c-\ln(x+a)$$
$$f'(x) = -\frac{1}{x+a}$$
$$f''(x) = \frac{1}{(x+a)^2}$$
and
$$f(x) = c$$
$$f'(x) = f''(x) = 0$$
A: Take the example $f(x)=x^2$
$$
\left( \dfrac{d\left(x^2\right)}{dx}\right) ^2=(2x)^2
$$
but
$$
\left( \dfrac{d^2\left(x^2\right)}{dx^2}\right)=2
$$
Which is a counterexample to your statement
A: The fact that the exponent $2$ is placed differently for $f$ and $x$ should set you thinking.
$$\frac{d^2f}{dx^2}\text{ is neither }\frac{d^2f}{d^2x}\text{ nor }\frac{df^2}{dx^2}\text{, but}\frac d{dx}\left(\frac{df}{dx}\right).$$
The meaning of the notation is indeed a second order differential, i.e. a difference of difference, not a squared difference.
Then about any function will show you that the square of the first derivative isn't the second derivative.

Looking for counterexamples, we have
$$f'^2(x)=f''(x),$$ or with $f'(x)=g(x)$,
$$g^2(x)=g'(x)\implies\frac{g'(x)}{g^2(x)}=-\left(\frac1{g(x)}\right)'=1\implies\frac1{g(x)}=C-x\implies g(x)=\frac1{C-x},$$
so that
$$f(x)=C'-\ln|C-x|.$$
