15.14.17 problem 17

Internal problem ID [3189]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 23, page 106
Problem number : 17
Date solved : Monday, January 27, 2025 at 07:25:43 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+2 y&=x^{2} {\mathrm e}^{-x} \end{align*}

Solution by Maple

Time used: 0.004 (sec). Leaf size: 35

dsolve(diff(y(x),x$2)+2*y(x)=x^2*exp(-x),y(x), singsol=all)
 
\[ y = \cos \left (\sqrt {2}\, x \right ) c_{1} +c_2 \sin \left (\sqrt {2}\, x \right )+\frac {\left (x^{2}+\frac {4}{3} x +\frac {2}{9}\right ) {\mathrm e}^{-x}}{3} \]

Solution by Mathematica

Time used: 0.024 (sec). Leaf size: 47

DSolve[D[y[x],{x,2}]+2*y[x]==x^2*Exp[-x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{27} e^{-x} \left (9 x^2+12 x+2\right )+c_1 \cos \left (\sqrt {2} x\right )+c_2 \sin \left (\sqrt {2} x\right ) \]