Suppose $f:\mathbb{R} \to \mathbb{R}$ is twice differentiable and that $f''(x)+f(x)=0$ for all $x$ Prove that if $f(0)=0$ and $f′(0)=0$, then $f(x)=0$ for all x.
Proof: $$f''(x)+ f(x) = 0 $$
$$ f'(x) f''(x) +f'(x)f(x) =0 $$
$$ (1/2)(f^2 + f'^2 )' =0$$
$$f^2 + f'^2=C$$
Since $$ (f^2 + f'^2)(0)=0$$
We get $C=0$, that is $f(x)=0$
Can anyone explain how they deduced that $f(x) = 0$, I am really confused.
It comes from $$ 0\le[f(x)]^2=\color{red}{-}[f'(x)]^2\le0,\quad x \in \mathbb{R}, $$ which is only possible with $$ f(x)=0,\quad x \in \mathbb{R}. $$