[tex] \frac{d^2 u}{dx^2} = \big( f(x)\big)^2\\ \frac{d u}{dx} \frac{d u}{dx} = \big( f(x)\big)^2

\\\frac{d u}{dx} = f(x) [/tex].

Why could my professor do this? How does this make sense in a physical sense? Or in a mathematical sense? What are the cases for where this trick won't work? Any clarification is much appreciated.