2.30.16 Problem 125

2.30.16.1 second order bessel ode
2.30.16.2 Maple
2.30.16.3 Mathematica
2.30.16.4 Sympy

Internal problem ID [13786]
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 : 125
Date solved : Thursday, January 01, 2026 at 02:37:43 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

2.30.16.1 second order bessel ode

0.252 (sec)

\begin{align*} x^{2} y^{\prime \prime }+y^{\prime } x -\left (x^{2}+\left (\frac {1}{2}+n \right )^{2}\right ) y&=0 \\ \end{align*}
Entering second order bessel ode solverWriting the ode as
\begin{align*} x^{2} y^{\prime \prime }+y^{\prime } x +\left (-x^{2}-\frac {1}{4}-n -n^{2}\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 &= 0\\ \beta &= i\\ n &= -\frac {1}{2}-n\\ \gamma &= 1 \end{align*}

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

\begin{align*} y = c_1 \operatorname {BesselJ}\left (-\frac {1}{2}-n , i x \right )+c_2 \operatorname {BesselY}\left (-\frac {1}{2}-n , i x \right ) \end{align*}

Summary of solutions found

\begin{align*} y &= c_1 \operatorname {BesselJ}\left (-\frac {1}{2}-n , i x \right )+c_2 \operatorname {BesselY}\left (-\frac {1}{2}-n , i x \right ) \\ \end{align*}
2.30.16.2 Maple. Time used: 0.003 (sec). Leaf size: 19
ode:=x^2*diff(diff(y(x),x),x)+x*diff(y(x),x)-(x^2+(n+1/2)^2)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \operatorname {BesselI}\left (n +\frac {1}{2}, x\right )+c_2 \operatorname {BesselK}\left (n +\frac {1}{2}, x\right ) \]

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
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
 
2.30.16.3 Mathematica. Time used: 0.031 (sec). Leaf size: 34
ode=x^2*D[y[x],{x,2}]+x*D[y[x],x]-(x^2+(n+1/2)^2)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 \operatorname {BesselJ}\left (n+\frac {1}{2},-i x\right )+c_2 \operatorname {BesselY}\left (n+\frac {1}{2},-i x\right ) \end{align*}
2.30.16.4 Sympy
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + x*Derivative(y(x), x) - (x**2 + (n + 1/2)**2)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False