Solution:
We know that the general solution will be the sum of the complementary solution and particular solution.
First we find the complementary solution by solving dx2d2y(x)−dxdy(x)−2y(x)=0 :
Assume a solution will be proportional to eλx for some constant λ .
Substitute y(x)=eλx into the differential equation:
dx2d2(eλx)−dxd(eλx)−2eλx=0
λ2eλx−λeλx−2eλx=0
(λ2−λ−2)eλx=0
Since eλx=0 for any finite λ , the zeros must come from the polynomial:
λ2−λ−2=0
(λ−2)(λ+1)=0
λ=−1 or λ=2
The general solution is the sum of the above solutions:
y(x)=y1(x)+y2(x)=c1e−x+c2e2x
Now we determine the particular solution by the method of undetermined coefficients:
The particular solution will be the sum of the particular solutions to dx2d2y(x)−dxdy(x)−2y(x)=−2x+1 and dx2d2y(x)−dxdy(x)−2y(x)=−9e−x
The particular solution to dx2d2y(x)−dxdy(x)−2y(x)=−2x+1 is of the form:
yp1(x)=a1+a2x
The particular solution to dx2d2y(x)−dxdy(x)−2y(x)=−9e−x is of the form:
yp2(x)=x(a3e−x) , where a3e−x was multiplied by x to account for e−x in the complementary solution.
yp(x)=yp1(x)+yp2(x)=a1+a2x+a3e−xx
Now, we solve for the unknown constants a1,a2, and a3 :
Compute dxdyp(x):dxdyp(x)=dxd(a1+a2x+a3e−xx)=a2+a3e−x−a3e−xx Compute dx2d2yp(x):dx2d2yp(x)=dx2d2(a1+a2x+a3e−xx)=a3(−2e−x+e−xx)
Substitute the particular solution yp(x) into the differential equation:
dx2d2yp(x)−dxdyp(x)−2yp(x)=−9e−x−2x+1
a3(−2e−x+e−xx)−(a2+a3e−x−a3e−xx)−2(a1+a2x+a3e−xx)=−9e−x−2x+1
−2a1−a2−3a3e−x−2a2x=1−9e−x−2x
On equating the coefficients on both sides of the equation:
−2a1−a2=1
−3a3=−9
−2a2=−2
On solving,
a1=−1a2=1a3=3
Substitute
a1,a2, and a3 into yp(x)=a1+xa2+e−xxa3We get yp(x)=x+3e−xx−1
So, the general solution is: y(x)=yc(x)+yp(x)=x+3e−xx+c1e−x+c2e2x−1
Comments