Solve 9dx2d2y(x)+y(x)=(x2+1)sin(3x):
The general solution will be the sum of
the complementary solution and particular solution.
Find the complementary solution by solving 9dx2d2y(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:
9dx2d2(eλx)+eλx=0
Substitute dx2d2(eλx)=λ2eλx:
9λ2eλx+eλx=0
Factor out eλx:
(9λ2+1)eλx=0
Since eλx=0 for any finite λ, the zeros must come from the polynomial:
9λ2+1=0
Solve for λ:
λ=3iorλ=−3i
The roots λ=±3i give y1(x)=c1e3ix, y2(x)=c2e−3ix 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)=c1e3ix+c2e−3ix
Apply Euler's identity eα+iβ=eαcos(β)+ieαsin(β):
y(x)=c1(cos(3x)+isin(3x))+c2(cos(3x)−isin(3x))
Regroup terms:
y(x)=(c1+c2)cos(3x)+i(c1−c2)sin(3x)
Redefine c1+c2 as c1 and i(c1−c2)
as c2, since these are arbitrary constants:
y(x)=c1cos(3x)+c2sin(3x)
Determine the particular solution to 9dx2d2y(x)+y(x)=(x2+1)sin(3x) by the method of undetermined coefficients:
The particular solution to 9dx2d2y(x)+y(x)=(x2+1)sin(3x) is of the form:
yp(x)=a1cos(3x)+a2xcos(3x)+a3x2cos(3x)+a4sin(3x)+a5xsin(3x)+a6x2sin(3x)
Solve for the unknown constants a1,a2,a3,a4,a5, and a6:
Compute dx2d2yp(x):
dx2d2yp(x)=dx2d2(a1cos(3x)+a2xcos(3x)+a3x2cos(3x)+a4sin(3x)+a5xsin(3x)+a6x2sin(3x))=−9a1cos(3x)−9a2xcos(3x)−6a2sin(3x)+2a3cos(3x)−9a3x2cos(3x)−12a3xsin(3x)−9a4sin(3x)+6a5cos(3x)−9a5xsin(3x)+12a6xcos(3x)+2a6sin(3x)−9a6x2sin(3x))
Substitute the particular solution yp(x) into the differential equation:
9dx2d2yp(x)+yp(x)=sin(3x)+x2sin(3x)9(−9a1cos(3x)−9a2xcos(3x)−6a2sin(3x)+2a3cos(3x)−9a3x2cos(3x)−12a3xsin(3x)−9a4sin(3x)+6a5cos(3x)−9a5xsin(3x)+12a6xcos(3x)+2a6sin(3x)−9a6x2sin(3x))+(a1cos(3x)+a2xcos(3x)+a3x2cos(3x)+a4sin(3x)+a5xsin(3x)+a6x2sin(3x))=sin(3x)+x2sin(3x)
Simplify:
(−80a1+18a3+54a5)cos(3x)+(−80a2+108a6)xcos(3x)−80a3x2cos(3x)+(−54a2−80a4+18a6)sin(3x)+(−108a3−80a5)xsin(3x)−80a6x2sin(3x)=sin(3x)+x2sin(3x)
Equate the coefficients of cos(3x) on both sides of the equation:
−80a1+18a3+54a5=0
Equate the coefficients of xcos(3x) on both sides of the equation:
−80a2+108a6=0
Equate the coefficients of x2cos(3x) on both sides of the equation:
−80a3=0
Equate the coefficients of sin(3x) on both sides of the equation:
−54a2−80a4+18a6=1
Equate the coefficients of xsin(3x) on both sides of the equation:
−108a3−80a5=0
Equate the coefficients of x2sin(3x) on both sides of the equation:
−80a6=1
Solve the system:
a1=0a2=−160027a3=0a4=−64000251a5=0a6=−801
Substitute a1,a2,a3,a4,a5, and a6 into
yp(x)=a1cos(3x)+a2xcos(3x)+a3x2cos(3x)+a4sin(3x)+a5xsin(3x)+a6x2sin(3x)yp(x)=−160027xcos(3x)−64000251sin(3x)−801x2sin(3x)
The general solution is:
y(x)=yc(x)+yp(x)=−160027xcos(3x)−64000251sin(3x)−801x2sin(3x)+c1cos(3x)+c2sin(3x)