Answer
$y(x)=c_1\cos 2x+c_2\sin 2x+2x\sin 2x$
Work Step by Step
Given: $y''+4y=8\cos 2x$
Solve the auxiliary equation for the differential equation.
$r^2+4=0$
Factor and solve for the roots.
$r_1=2i\\
r_2=-2i$
Roots are: $r_1=2i$, as a multiplicity of 1 and $r_2=-2i$, as a multiplicity of 1
The general solution is
$y(x)=c_1\cos 2x+c_2\sin 2x $
We have $F(x)=8\cos 2x$
Obtain:
$(D^2+4)^2y_p(x)=8\cos 2x$
Therefore, the general solution for $(D^2+4)^2y_p(x)=0$ is:
$y(x)=c_1\cos 2x+c_2\sin 2x+A_0x\cos 2x+B_0x\sin 2x$
The trial solution can be computed as by plugging back into the given differential equation.
$y_p(x)=A_0x\cos 2x+B_0x\sin 2x$
So, we have:
$(D^2+4)^2y_p(x)=8\cos 2x\\
(D^2+4)^2(A_0x\cos 2x+B_0x\sin 2x)=8\cos 2x$
On comparing coefficients, we get:
$A_0=0\\
B_0=2$
Therefore, the general solution for the given differential equation is:
$y(x)=c_1\cos 2x+c_2\sin 2x+2x\sin 2x$