Let us solve the differential equation y′′+4y′+4y=(3+x)e−2x, y(0)=2,y′(0)=5.
The characteristic equation k2+4k+4=0 is equivalent to (k+2)2=0, and hence has the solutions k1=k2=−2. Therefore, the general solution of the differential equation y′′+4y′+4y=(3+x)e−2x is y=(C1+C2x)e−2x+yp, where yp=x2(ax+b)e−2x=(ax3+bx2)e−2x.
It follows that
yp′=(3ax2+2bx)e−2x−2(ax3+bx2)e−2x=(3ax2+2bx−2ax3−2bx2)e−2x,
y′′=(6ax+2b−6ax2−4bx)e−2x−2(3ax2+2bx−2ax3−2bx2)e−2x=(6ax+2b−6ax2−4bx−6ax2−4bx+4ax3+4bx2)e−2x.
Then we have
(6ax+2b−6ax2−4bx−6ax2−4bx+4ax3+4bx2)e−2x+4(3ax2+2bx−2ax3−2bx2)e−2x+4(ax3+bx2)e−2x=(3+x)e−2x,
and hence 6ax+2b=3+x. We conclude that 6a=1, 2b=3, and thus a=61, b=23.
Consequently, the general solution is of the form
y=(C1+C2x)e−2x+(61x3+23x2)e−2x=(C1+C2x+23x2+61x3)e−2x.
Then 2=y(0)=C1.
It follows that y′=(C2+3x+21x2)e−2x−2(C1+C2x+23x2+61x3)e−2x, and hence 5=y′(0)=C2−2C1=C2−4. Then C2=9.
We conclude that the solution of the differential equation y′′+4y′+4y=(3+x)e−2x, y(0)=2,y′(0)=5 is
y=(2+9x+23x2+61x3)e−2x.
Comments