Prove that if $f''(x)+25f(x)=0$ then $f(x)=Acos(5x)+Bsin(5x)$ for some constants $A,B$ Suppose $f: \mathbb{R} \rightarrow \mathbb{R}$ is twice differentiable.
Prove that if $f''(x)+25f(x)=0$ then $f(x)=Acos(5x)+Bsin(5x)$ for some constants $A,B$

Consider $g(x):= f(x)-Acos(5x)-Bsin(5x)$ where $A$ and $B$ are chosen so that $g(0)=g'(0)=0$ [this portion is given, so can someone explain why it is important?]
For reference, we note that
$g(x):= f(x)-Acos(5x)-Bsin(5x)$
$g'(x):= f'(x)+5Asin(5x)-5Bcos(5x)$
$g''(x):= f''(x)+25Acos(5x)+25Bsin(5x)$
Consider the derivative of $\frac{25}{2}g(x)^2+\frac{1}{2}g'(x)^2$
$25g(x)g'(x)+g''(x)g'(x)$ if and only if $g'(x)[25g(x)+g''(x)]$
Following substitution, we conclude that 
$g'(x)[25g(x)+g''(x)]=g'(x)(0)=0$
Therefore, by the Constancy Theorem, $\frac{25}{2}g(x)^2+\frac{1}{2}g'(x)^2=C_0$, where $C_0$ is a constant
$25g(x)^2+g'(x)^2=C$, where $C$ is a constant
Thus, 
$25(f(x)-Acos(5x)-Bsin(5x))^2 + (f'(x)+5Asin(5x)-5Bcos(5x))^2=C$

Where do I go from here?

I don't remenber the general formula, you can find in some book of ODE. You have this y= f(x)=> y'' + 25y=0. We make the substitution $y=\exp{rx}$. Then $r^2e^{rx}+25e^{}rx=0$ and $e^{rx}(r^2+25)=0$. We find the roots of polinomial $r^2+25$ there are $r=5i$ and $r=-5i$ for the properties of the solutions of the ode we can say $y = (e^{5xi}+e^-{-5xi})/2=cos(5x)$ is a solution or $y = (e^{5xi}+e^-{-5xi})/2=i sin(5x)$
