23.3.195 problem 197

Internal problem ID [5909]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 197
Date solved : Tuesday, September 30, 2025 at 02:06:04 PM
CAS classification : [[_Emden, _Fowler]]

\begin{align*} -y+2 n y^{\prime }+x y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 69
ode:=-y(x)+2*n*diff(y(x),x)+x*diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x^{-n} \left (2 \operatorname {BesselI}\left (2 n , 2 \sqrt {x}\right ) c_1 n +\operatorname {BesselI}\left (2 n +1, 2 \sqrt {x}\right ) \sqrt {x}\, c_1 -2 \operatorname {BesselK}\left (2 n , 2 \sqrt {x}\right ) c_2 n +\operatorname {BesselK}\left (2 n +1, 2 \sqrt {x}\right ) \sqrt {x}\, c_2 \right ) \]
Mathematica. Time used: 0.034 (sec). Leaf size: 69
ode=-y[x] + 2*n*D[y[x],x] + x*D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to (-1)^{-2 n} x^{\frac {1}{2}-n} \left (c_1 (-1)^{2 n} \operatorname {Gamma}(2 n) \operatorname {BesselI}\left (2 n-1,2 \sqrt {x}\right )-c_2 \operatorname {Gamma}(2-2 n) \operatorname {BesselI}\left (1-2 n,2 \sqrt {x}\right )\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
ode = Eq(2*n*Derivative(y(x), x) + x*Derivative(y(x), (x, 2)) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : invalid input: 1 - 2*n