2.2.48 Problem 47

2.2.48.1 Maple
2.2.48.2 Mathematica
2.2.48.3 Sympy

Internal problem ID [10126]
Book : Own collection of miscellaneous problems
Section : section 2.0
Problem number : 47
Date solved : Monday, December 08, 2025 at 07:35:20 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-\frac {y^{\prime }}{x}-x y-x^{2}-\frac {1}{x}&=0 \\ \end{align*}
2.2.48.1 Maple. Time used: 0.004 (sec). Leaf size: 26
ode:=diff(diff(y(x),x),x)-1/x*diff(y(x),x)-y(x)*x-x^2-1/x = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x \left (-1+c_2 \operatorname {BesselI}\left (\frac {2}{3}, \frac {2 x^{{3}/{2}}}{3}\right )+c_1 \operatorname {BesselK}\left (\frac {2}{3}, \frac {2 x^{{3}/{2}}}{3}\right )\right ) \]

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying high order exact linear fully integrable 
trying differential order: 2; linear nonhomogeneous with symmetry [0,1] 
trying a double symmetry of the form [xi=0, eta=F(x)] 
-> Try solving first the homogeneous part of the ODE 
   checking if the LODE has constant coefficients 
   checking if the LODE is of Euler type 
   trying a symmetry of the form [xi=0, eta=F(x)] 
   checking if the LODE is missing y 
   -> Trying a Liouvillian solution using Kovacics algorithm 
   <- No Liouvillian solutions exists 
   -> Trying a solution in terms of special functions: 
      -> Bessel 
      <- Bessel successful 
   <- special function solution successful 
<- solving first the homogeneous part of the ODE successful
 
2.2.48.2 Mathematica. Time used: 0.161 (sec). Leaf size: 67
ode=D[y[x],{x,2}]-1/x*D[y[x],x]-x*y[x]-x^2-1/x==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \operatorname {AiryAiPrime}(x) \int _1^x\frac {\pi \operatorname {AiryBiPrime}(K[1]) \left (K[1]^3+1\right )}{K[1]^2}dK[1]+\operatorname {AiryBiPrime}(x) \int _1^x-\frac {\pi \operatorname {AiryAiPrime}(K[2]) \left (K[2]^3+1\right )}{K[2]^2}dK[2]+c_1 \operatorname {AiryAiPrime}(x)+c_2 \operatorname {AiryBiPrime}(x) \end{align*}
2.2.48.3 Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 - x*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**3 + x**2*y(x) - x*Derivative(y(x), (x, 2)) + Derivative(y(x), x) + 1 cannot be solved by the factorable group method