= Solution
The common <homogeneous solution> is $C_1\cos2x+C_2\sin2x$. For forcing $\sin x$, a trial $a\sin x$ gives $3a\sin x=\sin x$, so the first <general solution> is
$$
\boxed{y=C_1\cos2x+C_2\sin2x+\frac13\sin x}.
$$
For forcing $\sin2x$, the frequency produces <resonance in a differential equation>. A trial $ax\cos2x$ gives $y_p''+4y_p=-4a\sin2x$, so $a=-1/4$ and the second solution is
$$
\boxed{y=C_1\cos2x+C_2\sin2x-\frac x4\cos2x}.
$$
The <superposition principle> permits adding the two particular solutions. The sum-forcing equation therefore has
$$
\boxed{y=C_1\cos2x+C_2\sin2x+\frac13\sin x-\frac x4\cos2x}.
$$
Only one pair of homogeneous constants is needed, because the two original homogeneous families coincide.
Back to article page