50.11.17 problem 5(b)

Internal problem ID [8001]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 2. Second-Order Linear Equations. Section 2.3. THE METHOD OF VARIATION OF PARAMETERS. Page 71
Problem number : 5(b)
Date solved : Monday, January 27, 2025 at 03:36:33 PM
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.148 (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 \]