61.28.7 problem 67

Internal problem ID [12488]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 2, Second-Order Differential Equations. section 2.1.2-3
Problem number : 67
Date solved : Monday, March 31, 2025 at 05:36:20 AM
CAS classification : [[_Emden, _Fowler]]

\begin{align*} x y^{\prime \prime }+a y^{\prime }+b \,x^{n} y&=0 \end{align*}

Maple. Time used: 0.061 (sec). Leaf size: 71
ode:=x*diff(diff(y(x),x),x)+a*diff(y(x),x)+b*x^n*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\operatorname {BesselY}\left (\frac {a -1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right ) c_2 +\operatorname {BesselJ}\left (\frac {a -1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right ) c_1 \right ) x^{-\frac {a}{2}+\frac {1}{2}} \]
Mathematica. Time used: 0.139 (sec). Leaf size: 165
ode=x*D[y[x],{x,2}]+a*D[y[x],x]+b*x^n*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \left (\frac {1}{n}+1\right )^{\frac {a-1}{n+1}} n^{\frac {a-1}{n+1}} b^{\frac {1-a}{2 n+2}} \left (x^n\right )^{-\frac {a-1}{2 n}} \left (c_2 \operatorname {Gamma}\left (\frac {-a+n+2}{n+1}\right ) \operatorname {BesselJ}\left (\frac {1-a}{n+1},\frac {2 \sqrt {b} \left (x^n\right )^{\frac {n+1}{2 n}}}{n+1}\right )+c_1 \operatorname {Gamma}\left (\frac {a+n}{n+1}\right ) \operatorname {BesselJ}\left (\frac {a-1}{n+1},\frac {2 \sqrt {b} \left (x^n\right )^{\frac {n+1}{2 n}}}{n+1}\right )\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
n = symbols("n") 
y = Function("y") 
ode = Eq(a*Derivative(y(x), x) + b*x**n*y(x) + x*Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : invalid input: 1 - a