87.17.27 problem 28

Internal problem ID [23619]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 2. Linear differential equations. Exercise at page 127
Problem number : 28
Date solved : Thursday, October 02, 2025 at 09:43:32 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{2} y^{\prime \prime }-x y^{\prime }-8 y&={\mathrm e}^{x} \left (x^{2}+2\right ) \end{align*}
Maple. Time used: 0.007 (sec). Leaf size: 56
ode:=x^2*diff(diff(y(x),x),x)-x*diff(y(x),x)-8*y(x) = exp(x)*(x^2+2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_2 \,x^{4}+\frac {c_1}{x^{2}}+\frac {-7 \,\operatorname {Ei}_{1}\left (-x \right ) x^{6}-7 \,{\mathrm e}^{x} \left (x^{5}+x^{4}+2 x^{3}-\frac {30}{7} x^{2}+\frac {96}{7} x -\frac {96}{7}\right )}{72 x^{2}} \]
Mathematica. Time used: 0.112 (sec). Leaf size: 61
ode=x^2*D[y[x],{x,2}]-x*D[y[x],{x,1}]-8*y[x]==Exp[x]*(x^2+2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {7 x^6 \operatorname {ExpIntegralEi}(x)+72 \left (c_2 x^6+c_1\right )-e^x \left (7 x^5+7 x^4+14 x^3-30 x^2+96 x-96\right )}{72 x^2} \end{align*}
Sympy. Time used: 0.781 (sec). Leaf size: 51
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) - x*Derivative(y(x), x) - (x**2 + 2)*exp(x) - 8*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + C_{2} x^{6} - \frac {x^{4} \operatorname {E}_{3}\left (- x\right )}{6} - \frac {x^{2} \operatorname {E}_{5}\left (- x\right )}{3} + \frac {\left (- x^{3} + 3 x^{2} - 8 x + 8\right ) e^{x}}{6}}{x^{2}} \]