Second derivative of itself

I know the $$\frac{d^2x}{dx^2}= 0$$, since $$dx/dx = 1 ...$$ But by playing with some equations it is easy to get that $$d^2f/dx^2=f''(x)$$, so $$d^2f=f''(x)dx^2$$ and $$df=f'(x)dx$$, so $$df^2=f'(x)^2dx^2$$. So what is: $$d^2f/df^2$$ It is easy, just substitute the expressions for $$d^2f$$ and $$df^2$$ you will get: $$d^2f/df^2=f''dx^2/f'^2dx^2=f''/f'^2$$ Can you spot the mistake?

• The mistake is trying to divide differentials of different orders! Such a division is simply not defined. – user247327 Apr 23 at 19:54
• I think the mistake here is that you have abused the mathematical notation to the point of writing "gibberish" from a mathematical perspective. – johnny09 Apr 23 at 20:14
• Thank you all for your response. But when does playing with infinitesimals become gibberish? I know there exist a mathematical foundation called non-standard analysis, although I never studied it deeply. What is the moment I made a mistake e.g. by squaring $df/dx$ or by the two substitution? – David Apr 23 at 20:57
• If one wants to take higher-order differentials seriously (as opposed to just notation), the mistake is at the very beginning. When treating both $f$ and $x$ as variables, treating the usual Leibniz notation for the second derivative as a quotient leads to inconsistent results, and one has to use instead $f''(x) = d(df/dx)/dx = d^2f/dx^2 - (df\: d^2x)/dx^3$, which is consistent with the higher-order chain rule and inverse function theorems. See e.g. the discussion in section 4 of this paper. – pregunton Apr 23 at 23:31
• Thank you pregunton, I think I met the right person. I came to that result earlier, but I didn't know what the meaning was. I didn't really know how to handle it and what to do with it. Thank you for your perfect response and sharing this paper. ;) – David Apr 24 at 9:36

$$\frac{d^2y}{dx^2}\equiv\bigg(\frac{dy}{dx}\bigg)^2$$
$$\frac{df}{dx}=g(x)\implies\frac{df^2}{dx}=g^2(x)$$
To counter the second one, we take $$f(x)=x^k$$ then $$[f'(x)]^2=k^2x^{2k-2}$$ while $$[f^2(x)]'=2kx^{2k-1}$$
• It might be beneficial to include a comment or two on why $\frac{d^2y}{dx^2}\equiv\bigg(\frac{dy}{dx}\bigg)^2$ and $\frac{df}{dx}=g(x)\implies\frac{df^2}{dx}=g^2(x)$ are false. It is only a suggestion. – johnny09 Apr 23 at 20:10
• I dont see when $d^2y/dx^2=(dy/dx)^2$ is used. However, could $f'(x)^2=(df/dx)^2=df^2/dx^2$, then multiplying by $dx^2$ be an invalid part? – David Apr 23 at 21:00