Prove that $f^2+g^2$ is a constant. Suppose that $f$ and $g$ are functions defined on $\mathbb{R}$ and that $f'(x)=g(x)$ and $g'(x) =-f(x)$ for all $x\in\mathbb{R}$. Prove that $f^2+g^2$ is constant. 
I'm trying to prove this algebraically (not sure if it's the right way). Here is my attempt so far;
$$f^2 = (g'(x))^2$$
$$g^2 = (f'(x))^2$$
$$f^2+g^2 = (f'(x))^2+(g'(x))^2$$
Not sure how to proceed from here. Any help is appreciated. 

Using Chain rule,
$$ (f^2 + g^2)' = 2ff' + 2gg' = 2fg + 2g(-f) = 0. $$
