= Solution
The differential operator is $(D-3)^2$, where $D=d/dx$. Factoring out the forcing's exponential removes this repeated <characteristic root of a constant-coefficient differential equation>: set $y=e^{3x}v$. Differentiation gives $(D-3)y=e^{3x}v'$ and $(D-3)^2y=e^{3x}v''$, so $v''=\cos(2x)$. Two integrations yield
$$
v=-\frac14\cos(2x)+Ax+B.
$$
The <initial conditions> become $v(0)=0$ and $v'(0)+3v(0)=1$, hence $B=1/4$ and $A=1$. Thus
$$
\boxed{y(x)=e^{3x}\left[x+\frac{1-\cos(2x)}4\right].}
$$
The factorization verifies the <differential equation> directly, and the displayed expression has the required value and derivative at zero.
Back to article page