soM=0. Thus, the PI isyp=x, as you can (should!) check by substituting back into
the equation:
y′′+ 2 y′+y= 0 + 2 ( 1 )+x=x+ 2
The GS to the inhomogeneous equation is therefore
y=(Ax+B)e−x+x
Applying the initial conditions we have (remembere^0 =1)
y( 0 )=B= 0
y′( 0 )=A+ 1 = 0
soA=−1,B=0 and therefore
y=x−xe−x=x( 1 −e−x)
NB: When applying the initial or boundary conditions to solutions of inhomogeneous
equations you mustapply them to the full general solution – complementary function
plus particular integral, as we have done here. It is a common mistake for beginners to
apply such conditions simply to the complementary function.
Problem 15.18
Find a particular integral for the equation
y′′Y 3 y′Y 2 y= 3 e^2 x
Hence determine the general solution.
The CF isyc=Ae−x+Be−^2 x(see Problem 15.14). For the PI we try a solution similar
to the right-hand side:
yp=Le^2 x,yp′= 2 Le^2 x,yp′′= 4 Le^2 x
Substituting in the equation gives
( 4 L+ 6 L+ 2 L)e^2 x≡ 12 Le^2 x= 3 e^2 x
so
L=^14 and the PI isyp=^14 e^2 x
(check this back in the equation).
The full GS is therefore
y=Ae−x+Be−^2 x+^14 e^2 x
Problem 15.19
Find the general solution to the equation
y′′Y 2 y′Y 2 y=2cos3x
The CF isyc=e−x(Acosx+Bsinx), from Problem 15.16.