# Square of a differential [duplicate]

Just wondering, is this valid:

$$\left(\frac{df}{dx}\right)^2=\frac{d^{2}f}{dx^{2}}$$

• Let $f$ be any non-constant polynomial. What happens? Nov 28, 2015 at 23:11
• Nope. Most examples will show you that this does not hold; for instance it will not hold for linear functions. Note that even in terms of differential notation, while the "denominator" in the second derivative is indeed $(dx)^2$, the numerator is $d^2f$, not $(df)^2$.
– Ian
Nov 28, 2015 at 23:11
• I see the right hand side as the second derivative with respect to $x$, which is not the same as the first derivative squared... Nov 28, 2015 at 23:11
• So if I have the LHS in an ODE, how would I solve? Nov 28, 2015 at 23:12
• @MichaelRoberts It's easy to solve if you let $g=\frac{df}{dx}$. Then the equation is $g^2=\frac{dg}{dx}$ which has solution $g(x)=\frac{-1}{x+c}$. Integrate that to get the solution $f(x)=-\log(|x+c_1|)+c_2$. Nov 28, 2015 at 23:18

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)$$

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

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.

• missing the trivial f = c Nov 29, 2015 at 7:52
• @PaulEvans. For sure ! I shall edit my answer and quote you !! Cheers. Nov 29, 2015 at 7:58

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$$

• There are an infinite number of options that work: -ln(x) + c Nov 29, 2015 at 5:55
• f(x) = c also works Nov 29, 2015 at 7:52

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|.$$