1. Complementary Function (yc):
The homogeneous equation is dx2d2y−y=0.
Its auxiliary equation is:
m2−1=0⟹m=±1
So, the complementary function is:
yc=C1ex+C2e−x
2. Particular Integral (yp):
Let the particular solution be of the form:
yp=(Ax+B)sinx+(Cx+D)cosx
Differentiating yp with respect to x:
yp′=Asinx+(Ax+B)cosx+Ccosx−(Cx+D)sinx
yp′=(A−Cx−D)sinx+(C+Ax+B)cosx
Differentiating again:
yp′′=−Csinx+(A−Cx−D)cosx+Acosx−(C+Ax+B)sinx
yp′′=(−2C−Ax−B)sinx+(2A−Cx−D)cosx
Substitute yp and yp′′ into the original differential equation (yp′′−yp=xsinx):
[(−2C−Ax−B)sinx+(2A−Cx−D)cosx]−[(Ax+B)sinx+(Cx+D)cosx]=xsinx
(−2Ax−2B−2C)sinx+(−2Cx+2A−2D)cosx=xsinx
Comparing coefficients on both sides:
For xsinx: −2A=1⟹A=−21
For sinx: −2B−2C=0⟹B=−C
For xcosx: −2C=0⟹C=0⟹B=0
For cosx: 2A−2D=0⟹D=A=−21
So, A=−21,B=0,C=0,D=−21.
Thus, yp=−21xsinx−21cosx
General Solution:
y=yc+yp
y=C1ex+C2e−x−21(xsinx+21cosx)