78.14.17 problem 6 (b)

Internal problem ID [18353]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 3. Second order linear equations. Section 19. The Method of Variation of Parameters. Problems at page 135
Problem number : 6 (b)
Date solved : Tuesday, January 28, 2025 at 11:48:14 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} \left (x^{2}+x \right ) y^{\prime \prime }+\left (-x^{2}+2\right ) y^{\prime }-\left (x +2\right ) y&=x \left (1+x \right )^{2} \end{align*}

Solution by Maple

Time used: 0.009 (sec). Leaf size: 32

dsolve((x^2+x)*diff(y(x),x$2)+(2-x^2)*diff(y(x),x)-(2+x)*y(x)=x*(x+1)^2,y(x), singsol=all)
 
\[ y = \frac {3 \,{\mathrm e}^{x} x c_{1} -x^{3}-3 x^{2}+3 c_{2} -3 x}{3 x} \]

Solution by Mathematica

Time used: 0.133 (sec). Leaf size: 45

DSolve[(x^2+x)*D[y[x],{x,2}]+(2-x^2)*D[y[x],x]-(2+x)*y[x]==x*(x+1)^2,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to -\frac {x^2}{3}-x+\sqrt {2} c_2 e^{x+\frac {1}{2}}+\frac {c_1}{\sqrt {2 e} x}-1 \]