Solve
(D^2 + 1) y = x Sin x
"\\text{Solve }\\frac{d^{2} y(x)}{d x^{2}}+y(x)=x \\sin (x)\\\\[2mm]\n\\text{The general solution will be the sum of the complementary solution and particular solution.}\\\\\n\\text{Find the complementary solution by solving } \\frac{d^{2} y(x)}{d x^{2}}+y(x)=0 :\\\\[2mm]\n\\text{Assume a solution will be proportional to } e^{\\lambda x} \\text{ for some constant } \\lambda.\\\\[3mm]\n\\text{Substitute } y(x)=e^{\\lambda x} \\text{ into the differential equation:}\\\\\n\\frac{d^{2}}{d x^{2}}\\left(e^{x x}\\right)+e^{x x}=0\\\\[2.5mm]\n\\text{Substitute } \\frac{d^{2}}{d x^{2}}\\left(e^{\\lambda x}\\right)=\\lambda^{2} e^{\\lambda x}\\\\[2mm]\n\\lambda^{2} e^{\\lambda x}+e^{\\lambda x}=0\\\\[3mm]\n\\text{Factor out }e^{\\lambda x} :\\\\\n\\left(\\lambda^{2}+1\\right) e^{\\lambda x}=0\\\\[2mm]\n\\text{Since } e^{\\lambda x} \\neq 0 \\text{ for any finite } \\lambda, \\text{ the zeros must come from the polynomial: } x^{2}+1=0\\\\"
"\\text{ Solve for } \\lambda :\\\\[1.5mm]\n\\lambda=i \\text { or } \\lambda=-i\\\\[2mm]\n\\text{The roots } \\lambda=\\pm i \\text{ give } y_{1}(x)=c_{1} e^{i x}, y_{2}(x)=c_{2} e^{-i x} \\text{ as solutions, where } c_{1} \\text{ and } c_{2} \\text{ are arbitrary constants.}\\\\[2mm]\n\\text{The general solution is the sum of the above solutions:}\\\\[2mm]\ny(x)=y_{1}(x)+y_{2}(x)=c_{1} e^{i x}+c_{2} e^{-i x}\\\\[4mm]\n\\text{Apply Euler's identity } e^{\\alpha+i \\beta}=e^{\\alpha} \\cos (\\beta)+i e^{\\alpha} \\sin (\\beta) :\\\\[2mm]\ny(x)=c_{1}(\\cos (x)+i \\sin (x))+c_{2}(\\cos (x)-i \\sin (x))\\\\[2mm]\n\\text{Regroup terms:}\\\\[2mm]\ny(x)=\\left(c_{1}+c_{2}\\right) \\cos (x)+i\\left(c_{1}-c_{2}\\right) \\sin (x)\\\\[2mm]\n\\text{Redefine } c_{1}+c_{2} \\text{ as } c_{1} \\text{ and } i\\left(c_{1}-c_{2}\\right) \\text{ as } c_{2}, \\text{ since these are arbitrary constants: } y(x)=c_{1} \\cos (x)+c_{2} \\sin (x)\\\\\n\\text{Determine the particular solution to } \\frac{d^{2} y(x)}{d x^{2}}+y(x)=x \\sin (x) \\text{ by the method of undetermined coefficients:}\\\\[3mm]\n\\text{The particular solution to } \\frac{d^{2} y(x)}{d x^{2}}+y(x)=x \\sin (x) \\text{ is of the form:}\\\\[2mm]\ny_{p}(x)=x\\left(a_{1} \\cos (x)+a_{2} x \\cos (x)+a_{3} \\sin (x)+a_{4} x \\sin (x)\\right),\\\\ \\text{ where } a_{1} \\cos (x)+a_{2} x \\cos (x)+a_{3} \\sin (x) + a_{4} x \\sin (x)\\\\ \\text{ was multiplied by } x \\text{ to account for } \\sin (x) \\text{ in the complementary solution. }"
"\\text{Solve for the unknown constants } a_{1}, a_{2}, a_{3}, \\text{ and } a_{4} :\\\\[2mm]\n\\text{Compute } \\frac{d^{2} y_{p}(x)}{d x^{2}} :\\\\[2mm]\n\\begin{aligned}\n\\frac{d^{2} y_{p}(x)}{d x^{2}}=& \\frac{d^{2}}{d x^{2}}\\left(a_{1} x \\cos (x)+a_{2} x^{2} \\cos (x)+a_{3} x \\sin (x)+a_{4} x^{2} \\sin (x)\\right) \\\\\n=&-a_{1} x \\cos (x)-2 a_{1} \\sin (x)+2 a_{2} \\cos (x)-a_{2} x^{2} \\cos (x)-4 a_{2} x \\sin (x)+\\\\\n& 2 a_{3} \\cos (x)-a_{3} x \\sin (x)+4 a_{4} x \\cos (x)+2 a_{4} \\sin (x)-a_{4} x^{2} \\sin (x)\n\\end{aligned}\\\\[2mm]\n\\text{Substitute the particular solution } y_{p}(x) \\text{ into the differential equation:}\\\\[2mm]\n\\begin{aligned}\n&\\frac{d^{2} y_{p}(x)}{d x^{2}}+y_{p}(x)=x \\sin (x) \\\\\n&-a_{1} x \\cos (x)-2 a_{1} \\sin (x)+2 a_{2} \\cos (x)-a_{2} x^{2} \\cos (x)-4 a_{2} x \\sin (x)+ \\\\\n&\\quad 2 a_{3} \\cos (x)-a_{3} x \\sin (x)+4 a_{4} x \\cos (x)+2 a_{4} \\sin (x)-a_{4} x^{2} \\sin (x)+ \\\\\n&\\quad a_{1} x \\cos (x)+a_{2} x^{2} \\cos (x)+a_{3} x \\sin (x)+a_{4} x^{2} \\sin (x)=x \\sin (x)\n\\end{aligned}\\\\[2mm]\n\\text{Simplify:}\\\\[2mm]\n\\left(2 a_{2}+2 a_{3}\\right) \\cos (x)+4 a_{4} x \\cos (x)+\\left(-2 a_{1}+2 a_{4}\\right) \\sin (x)-4 a_{2} x \\sin (x)=x \\sin (x)\\\\[2mm]\n\\text{Equate the coefficients of } \\cos (x) \\text{ on both sides of the equation:}\\\\\n2 a_{2}+2 a_{3}=0\\\\[3mm]\n\\text{Equate the coefficients of } x \\cos (x) \\text{ on both sides of the equation:}\\\\\n4 a_{4}=0\\\\[3mm]\n\\text{Equate the coefficients of } \\sin (x) \\text{ on both sides of the equation:}\\\\\n-2 a_{1}+2 a_{4}=0"
"\\text{Equate the coefficients of } x \\sin (x) \\text{ on both sides of the equation:}\\\\\n-4 a_{2}=1[4mm]\n\\text{Solve the system:}\\\\\n\\begin{aligned}\n&a_{1}=0 \\\\\n&a_{2}=-\\frac{1}{4} \\\\\n&a_{3}=\\frac{1}{4} \\\\\n&a_{4}=0\n\\end{aligned}\n\\text{Substitute } a_{1}, a_{2}, a_{3}, \\text{ and }a_{4} \\text{ into } y_{p}(x)=x \\cos (x) a_{1}+x^{2} \\cos (x) a_{2}+x \\sin (x) a_{3}+ x^{2} \\sin (x) a_{4}\\\\[2mm]\ny_{p}(x)=-\\frac{1}{4} x^{2} \\cos (x)+\\frac{1}{4} x \\sin (x)\\\\[4mm]\n\\text{The general solution is:}\\\\[2mm]\ny(x)=y_{\\mathrm{c}}(x)+y_{p}(x)=-\\frac{1}{4} x^{2} \\cos (x)+\\frac{1}{4} x \\sin (x)+c_{1} \\cos (x)+c_{2} \\sin (x)"
Comments
Leave a comment