For the PI you might be tempted to tryyp=Lcos 3x, but in fact we need both cos 3x
and sin 3xterms because of the first order derivative on the left-hand side. We therefore try
yp=Lcos 3x+Msin 3x
yp′=− 3 Lsin 3x+ 3 Mcos 3xyp′′=− 9 Lcos 3x− 9 Msin 3xsubstituting in the DE gives, on collecting cos and sin terms:
(− 7 L+ 6 M)cos 3x+(− 6 L− 7 M)sin 3x≡2cos3xSo
− 6 L− 7 M= 0
− 7 L+ 6 M= 2
whence
L=−14
85,M=12
85and the PI is
yp=−14
85cos 3x+12
85sin 3xand the GS is
y=e−x(Acosx+Bsinx)−14
85cos 3x+12
85sin 3x(again, check back in the equation).
Problem 15.20
Find the general solution to the equationy′′Y 4 y=e−xcosxThe CF is
yc=Acos 2x+Bsin 2x
For the PI choose
yp=Le−xcosx+Me−xsinxThen, as an exercise in differentiation by the product rule (234
➤
), you can check that
yp′′=e−x( 2 Lsinx− 2 Mcosx)Substituting in the equation gives, after simplification
e−x[( 4 L− 2 M)cosx+( 2 L+ 4 M)sinx]≡e−xcosx