We solve a second order differential equation of the type:
ay''+by'+cy=f(x)
where a=1
b=1
c=1
f(x)=xsinx
The solution will consist of common and particular solutions and have a type:
y=ycom+ypart
To find a common solution we solve second order differential equation y''+y'+y=0 and find roots of polynomial r2+r+1=0
Its roots
Roots are complex therefore the common solution will be
As in the right side of the differential equation f(x)=xsinx so particular solution will have a type:
ypart=Axsinx+Bsinx+Cxcosx+Dcosx
y'part=(A-D)sinx+(B+C)cosx+Axcosx-Cxsinx
y''part=-(B+2C)sinx-Dcosx-Cxcosx-Axsinx
Now differentiate and plug it into the differential equation
-(B+2C)sinx-Dcosx-Cxcosx-Axsinx+(A-D)sinx+(B+C)cosx+Axcosx-Cxsinx+Axsinx+Bsinx+Cxcosx+Dcosx=xsinx
(B+C)cosx+(A-2C-D)sinx-Cxsinx+Axcosx=xsinx
We need to pick A so that we get the same function on both sides of the equal sign. This means that the coefficients of the sines and cosines must be equal. Or,
xcox: A=0
cosx: B+C=0
xsinx: -C=1
sinx: A-2C-D=0
We get A=0, B=1, C=-1, D=2
ypart=sinx-xcosx+2cosx
We get final solution
Comments