Solve this nonhomegenous ode $y”+4y = \cos(2x)$

ordinary differential equations

Solve the given nonhomogenous linear ODE by variation of parameters or undetermined coefficients $y'' + 4y = \cos(2x)$.

A general solution is $y_1 = \cos(2x), y_2 = \sin(2x)$, and the Wronksin determinant is equal to 2.

Plugging this into the equation for the method of variation of parameters, I get
$$-\cos(2x)\int\frac{\sin(2x)\cos(2x)}{2}dx + \sin(2x)\int\frac{\cos^2(2x)}{2}dx$$

The integrals cancel out to $0$. How can I approach this correctly with the method proposed?

Best Answer

As $2i$ is a simple root of the characteristic equation of the l.h.s., a particular solution of the non-homogeneous equation has the form $$y_0(x)=Ax\cos 2x+Bx\sin 2x$$ whence \begin{align} y'_0(x)&=A\cos 2x-2Ax\sin 2x+B\sin 2x+2Bx\cos 2x \\ &= (A+2Bx)\cos 2x+(B-2Ax)\sin 2x,\\ y''_0(x)&=4(B-A)\cos 2x-4(A+Bx)\sin 2x. \end{align} Can you proceed?

Related Question