Let us solve the differential equation (D2+a2)y=sinax. The characteristic equation k2+a2=0 has the solutions k1=ai,k2=−ai, and hence the general solution of the homogeneous differential equation is y=C1cosax+C2sinax. The particular solution of non-homogeneous equation is of the form yp=x(Lsinax+Mcosax). Then yp′=Lsinax+Mcosax+x(aLcosax−aMsinax), and yp′′=aLcosax−aMsinax+aLcosax−aMsinax+x(−a2Lsinax−a2Mcosax).
It follows that 2aLcosax−2aMsinax+x(−a2Lsinax−a2Mcosax)+a2x(Lsinax+Mcosax)=sinax,
and hence 2aL=0 and −2aM=1. Therefore, if a=0 then L=0,M=−2a1.
We conclude that if if a=0 then the general solution of the differential equation (D2+a2)y=sinax is y=C1cosax+C2sinax−2a1xcosax. If a=0 then the general solution of the differential equation D2y=0 is y=C1x+C2.
Comments