Can anyone explain the final step in the following proof. 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}.
$$
Let $f\left(x\right)=a_0+a_1x+a_2x^2...$
then, $$f\left(x\right)+f'\left(x\right)=(a_0+a_1)+(a_1+2a_2)x...=0$$
but $a_0=f\left(0\right)=0$ and $a_1=f'\left(0\right)=0$
Therefore, it must be zero at all points to satisfy them.