Suppose $f$ and $g$ are continuously differentiable functions such that $f(x) = g'(x)$ and $g(x) = f'(x)$ and that any product of $f, f', g$ and $g'$ is commutative for all $x ∈ R$. Show that $ f^2 − g^2 = C $ for some real constant C
I have actually no clue how to solve this, and would be really greatfull for all the help i can get
Define a new function $\gamma(x) = f^2(x) - g^2(x)$, then the derivative is: $$ \frac{\mathrm{d}\gamma}{\mathrm{d}x} = 2 f(x) \frac{\mathrm{d}f}{\mathrm{d}x} - 2 g(x) \frac{\mathrm{d}g}{\mathrm{d}x} = 2 \Big(\underbrace{\frac{\mathrm{d}g}{\mathrm{d}x}}_{=f(x)}\frac{\mathrm{d}f}{\mathrm{d}x} - \underbrace{\frac{\mathrm{d}f}{\mathrm{d}x}}_{=g(x)} \frac{\mathrm{d}g}{\mathrm{d}x} \Big) $$ And since these commute, so that: $$\frac{\mathrm{d}g}{\mathrm{d}x}\frac{\mathrm{d}f}{\mathrm{d}x} = \frac{\mathrm{d}f}{\mathrm{d}x} \frac{\mathrm{d}g}{\mathrm{d}x} $$ The term in the brackets is zero, thus: $$\frac{\mathrm{d}\gamma}{\mathrm{d}x} =0 $$ Which implies that $\gamma(x) = f^2(x) - g^2(x)$ is a constant, say, $C$. $$ f^2(x) - g^2(x) = C$$