2.30.23 Problem 132

2.30.23.1 second order bessel ode
2.30.23.2 Maple
2.30.23.3 Mathematica
2.30.23.4 Sympy

Internal problem ID [13793]
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-4
Problem number : 132
Date solved : Thursday, January 01, 2026 at 02:40:34 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

2.30.23.1 second order bessel ode

0.313 (sec)

\begin{align*} x^{2} y^{\prime \prime }+a x y^{\prime }+\left (b \,x^{n}+c \right ) y&=0 \\ \end{align*}
Entering second order bessel ode solverWriting the ode as
\begin{align*} x^{2} y^{\prime \prime }+a x y^{\prime }+\left (b \,x^{n}+c \right ) y = 0\tag {1} \end{align*}

Bessel ode has the form

\begin{align*} x^{2} y^{\prime \prime }+y^{\prime } x +\left (-n^{2}+x^{2}\right ) y = 0\tag {2} \end{align*}

The generalized form of Bessel ode is given by Bowman (1958) as the following

\begin{align*} x^{2} y^{\prime \prime }+\left (1-2 \alpha \right ) x y^{\prime }+\left (\beta ^{2} \gamma ^{2} x^{2 \gamma }-n^{2} \gamma ^{2}+\alpha ^{2}\right ) y = 0\tag {3} \end{align*}

With the standard solution

\begin{align*} y&=x^{\alpha } \left (c_1 \operatorname {BesselJ}\left (n , \beta \,x^{\gamma }\right )+c_2 \operatorname {BesselY}\left (n , \beta \,x^{\gamma }\right )\right )\tag {4} \end{align*}

Comparing (3) to (1) and solving for \(\alpha ,\beta ,n,\gamma \) gives

\begin{align*} \alpha &= \frac {1}{2}-\frac {a}{2}\\ \beta &= \frac {2 \sqrt {b}}{n}\\ n &= \frac {\sqrt {a^{2}-2 a -4 c +1}}{n}\\ \gamma &= \frac {n}{2} \end{align*}

Substituting all the above into (4) gives the solution as

\begin{align*} y = c_1 \,x^{\frac {1}{2}-\frac {a}{2}} \operatorname {BesselJ}\left (\frac {\sqrt {a^{2}-2 a -4 c +1}}{n}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}}}{n}\right )+c_2 \,x^{\frac {1}{2}-\frac {a}{2}} \operatorname {BesselY}\left (\frac {\sqrt {a^{2}-2 a -4 c +1}}{n}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}}}{n}\right ) \end{align*}

Summary of solutions found

\begin{align*} y &= c_1 \,x^{\frac {1}{2}-\frac {a}{2}} \operatorname {BesselJ}\left (\frac {\sqrt {a^{2}-2 a -4 c +1}}{n}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}}}{n}\right )+c_2 \,x^{\frac {1}{2}-\frac {a}{2}} \operatorname {BesselY}\left (\frac {\sqrt {a^{2}-2 a -4 c +1}}{n}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}}}{n}\right ) \\ \end{align*}
2.30.23.2 Maple. Time used: 0.006 (sec). Leaf size: 80
ode:=x^2*diff(diff(y(x),x),x)+a*x*diff(y(x),x)+(b*x^n+c)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x^{-\frac {a}{2}} \sqrt {x}\, \left (\operatorname {BesselY}\left (\frac {\sqrt {a^{2}-2 a -4 c +1}}{n}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}}}{n}\right ) c_2 +\operatorname {BesselJ}\left (\frac {\sqrt {a^{2}-2 a -4 c +1}}{n}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}}}{n}\right ) c_1 \right ) \]

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a symmetry of the form [xi=0, eta=F(x)] 
checking if the LODE is missing y 
-> Trying an equivalence, under non-integer power transformations, 
   to LODEs admitting Liouvillian solutions. 
   -> 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
 
2.30.23.3 Mathematica. Time used: 0.114 (sec). Leaf size: 168
ode=x^2*D[y[x],{x,2}]+a*x*D[y[x],x]+(b*x^n+c)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to n^{\frac {a-1}{n}} b^{-\frac {a-1}{2 n}} \left (x^n\right )^{-\frac {a-1}{2 n}} \left (c_1 \operatorname {Gamma}\left (1-\frac {\sqrt {a^2-2 a-4 c+1}}{n}\right ) \operatorname {BesselJ}\left (-\frac {\sqrt {a^2-2 a-4 c+1}}{n},\frac {2 \sqrt {b} \sqrt {x^n}}{n}\right )+c_2 \operatorname {Gamma}\left (\frac {n+\sqrt {a^2-2 a-4 c+1}}{n}\right ) \operatorname {BesselJ}\left (\frac {\sqrt {a^2-2 a-4 c+1}}{n},\frac {2 \sqrt {b} \sqrt {x^n}}{n}\right )\right ) \end{align*}
2.30.23.4 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
n = symbols("n") 
y = Function("y") 
ode = Eq(a*x*Derivative(y(x), x) + x**2*Derivative(y(x), (x, 2)) + (b*x**n + c)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : invalid input: 1 - a