58.2.26 problem 26

Internal problem ID [9149]
Book : Second order enumerated odes
Section : section 2
Problem number : 26
Date solved : Sunday, March 30, 2025 at 02:23:57 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

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