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?

Since this is a differential equation with a right side equal to zero, we say that it is homogeneous. Thus, we solve the auxiliary equation associated with the equation:  f′′(x) + 25 f(x) = 0  ------>   r^2 + 25 = 0
This yields:   
r = +/- 5i 
Solution will be of the form: f = Ae^(5i) + be^(-5i)
Which using Euler's method yields:
f = ACos(5t) + BSin(5t).
Differentiating f twice and plugging into the original diff. eq. should yield zero.
Is this what you wanted?
