50.2.49 problem 48

Internal problem ID [10139]
Book : Own collection of miscellaneous problems
Section : section 2.0
Problem number : 48
Date solved : Tuesday, September 30, 2025 at 07:04:40 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-\frac {y^{\prime }}{x}-x^{2} y-x^{3}-\frac {1}{x}&=0 \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 24
ode:=diff(diff(y(x),x),x)-1/x*diff(y(x),x)-x^2*y(x)-x^3-1/x = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sinh \left (\frac {x^{2}}{2}\right ) c_2 +\cosh \left (\frac {x^{2}}{2}\right ) c_1 -x \]
Mathematica. Time used: 0.083 (sec). Leaf size: 110
ode=D[y[x],{x,2}]-1/x*D[y[x],x]-x^2*y[x]-x^3-1/x==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \cosh \left (\frac {x^2}{2}\right ) \int _1^x-\frac {\left (K[1]^4+1\right ) \sinh \left (\frac {K[1]^2}{2}\right )}{K[1]^2}dK[1]+i \sinh \left (\frac {x^2}{2}\right ) \int _1^x-\frac {i \cosh \left (\frac {K[2]^2}{2}\right ) \left (K[2]^4+1\right )}{K[2]^2}dK[2]+c_1 \cosh \left (\frac {x^2}{2}\right )+i c_2 \sinh \left (\frac {x^2}{2}\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 - x**2*y(x) + Derivative(y(x), (x, 2)) - Derivative(y(x), x)/x - 1/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE x**4 + x**3*y(x) - x*Derivative(y(x), (x, 2)) + Derivative(y(x), x) + 1 cannot be solved by the factorable group method