Solve dx2d2y(x)+y(x)=xsin(x)The general solution will be the sum of the complementary solution and particular solution.Find the complementary solution by solving dx2d2y(x)+y(x)=0:Assume a solution will be proportional to eλx for some constant λ.Substitute y(x)=eλx into the differential equation:dx2d2(exx)+exx=0Substitute dx2d2(eλx)=λ2eλxλ2eλx+eλx=0Factor out eλx:(λ2+1)eλx=0Since eλx=0 for any finite λ, the zeros must come from the polynomial: x2+1=0
Solve for λ:λ=i or λ=−iThe roots λ=±i give y1(x)=c1eix,y2(x)=c2e−ix as solutions, where c1 and c2 are arbitrary constants.The general solution is the sum of the above solutions:y(x)=y1(x)+y2(x)=c1eix+c2e−ixApply Euler’s identity eα+iβ=eαcos(β)+ieαsin(β):y(x)=c1(cos(x)+isin(x))+c2(cos(x)−isin(x))Regroup terms:y(x)=(c1+c2)cos(x)+i(c1−c2)sin(x)Redefine c1+c2 as c1 and i(c1−c2) as c2, since these are arbitrary constants: y(x)=c1cos(x)+c2sin(x)Determine the particular solution to dx2d2y(x)+y(x)=xsin(x) by the method of undetermined coefficients:The particular solution to dx2d2y(x)+y(x)=xsin(x) is of the form:yp(x)=x(a1cos(x)+a2xcos(x)+a3sin(x)+a4xsin(x)), where a1cos(x)+a2xcos(x)+a3sin(x)+a4xsin(x) was multiplied by x to account for sin(x) in the complementary solution.
Solve for the unknown constants a1,a2,a3, and a4:Compute dx2d2yp(x):dx2d2yp(x)==dx2d2(a1xcos(x)+a2x2cos(x)+a3xsin(x)+a4x2sin(x))−a1xcos(x)−2a1sin(x)+2a2cos(x)−a2x2cos(x)−4a2xsin(x)+2a3cos(x)−a3xsin(x)+4a4xcos(x)+2a4sin(x)−a4x2sin(x)Substitute the particular solution yp(x) into the differential equation:dx2d2yp(x)+yp(x)=xsin(x)−a1xcos(x)−2a1sin(x)+2a2cos(x)−a2x2cos(x)−4a2xsin(x)+2a3cos(x)−a3xsin(x)+4a4xcos(x)+2a4sin(x)−a4x2sin(x)+a1xcos(x)+a2x2cos(x)+a3xsin(x)+a4x2sin(x)=xsin(x)Simplify:(2a2+2a3)cos(x)+4a4xcos(x)+(−2a1+2a4)sin(x)−4a2xsin(x)=xsin(x)Equate the coefficients of cos(x) on both sides of the equation:2a2+2a3=0Equate the coefficients of xcos(x) on both sides of the equation:4a4=0Equate the coefficients of sin(x) on both sides of the equation:−2a1+2a4=0
Equate the coefficients of xsin(x) on both sides of the equation:−4a2=1[4mm]Solve the system:a1=0a2=−41a3=41a4=0Substitute a1,a2,a3, and a4 into yp(x)=xcos(x)a1+x2cos(x)a2+xsin(x)a3+x2sin(x)a4yp(x)=−41x2cos(x)+41xsin(x)The general solution is:y(x)=yc(x)+yp(x)=−41x2cos(x)+41xsin(x)+c1cos(x)+c2sin(x)
Comments