56.5.6 problem 6

Internal problem ID [8967]
Book : Own collection of miscellaneous problems
Section : section 5.0
Problem number : 6
Date solved : Sunday, March 30, 2025 at 01:57:31 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.005 (sec). Leaf size: 19
ode:=x*diff(diff(y(x),x),x)-(2*x+2)*diff(y(x),x)+(x+2)*y(x) = 6*x^3*exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} \left (c_2 +c_1 \,x^{3}+\frac {3}{2} x^{4}\right ) \]
Mathematica. Time used: 0.064 (sec). Leaf size: 31
ode=x*D[y[x],{x,2}]-(2*x+2)*D[y[x],x]+(2+x)*y[x] == 6*x^3*Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{6} e^x \left (9 x^4+2 e c_2 x^3+6 e c_1\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-6*x**3*exp(x) + x*Derivative(y(x), (x, 2)) + (x + 2)*y(x) - (2*x + 2)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (-6*x**3*exp(x) + x*y(x) + x*Derivative(y(x), (x, 2)) + 2*y(x))/(2*(x + 1)) cannot be solved by the factorable group method