56.2.49 problem 48

Internal problem ID [8853]
Book : Own collection of miscellaneous problems
Section : section 2.0
Problem number : 48
Date solved : Sunday, March 30, 2025 at 01:42:56 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.086 (sec). Leaf size: 34
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]
 
\[ y(x)\to c_1 \cosh \left (\frac {x^2}{2}\right )+i c_2 \sinh \left (\frac {x^2}{2}\right )-x \]
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