Solve $y''+y=\cos^2(x)$ by variation of parameters

371 Views Asked by At

The answer I got is $$y=c_1 \cos(x) + c_2 \sin(x) + \frac{1}{2} \sin(2x) + \frac{1}{3} \cos(2x).$$ Can the last two trig terms be simplified further?

1

There are 1 best solutions below

0
On

$$y''+y=\cos^2(x) \tag 1$$ Your answer $\quad y=c_1 \cos(x) + c_2 \sin(x) + \frac{1}{2} \sin(2x) + \frac{1}{3} \cos(2x)\quad$ is FALSE.

Why didn't you put it back into Eq.$(1)$ in order to check your result ?

You should find : $$y=c_1 \cos(x) + c_2 \sin(x) - \frac{1}{6} \cos(2x)+\frac12$$

$y'=-c_1 \sin(x) + c_2 \cos(x) + \frac{1}{3} \sin(2x)$

$y''=-c_1 \cos(x) - c_2 \sin(x) + \frac{2}{3} \cos(2x)$

$y''+y=\frac{2}{3} \cos(2x)- \frac{1}{6} \cos(2x)+\frac12 = \frac{\cos(2x)+1}{2}=\cos^2(x)$