2.2.45 Problem 45

Solved as second order Bessel ode
Maple
Mathematica
Sympy

Internal problem ID [9167]
Book : Second order enumerated odes
Section : section 2
Problem number : 45
Date solved : Friday, April 25, 2025 at 05:58:49 PM
CAS classification : [_Bessel]

Solved as second order Bessel ode

Time used: 0.100 (sec)

Solve

x2y+xy+(x25)y=0

Writing the ode as

(1)x2y+xy+(x25)y=0

Bessel ode has the form

(2)x2y+xy+(n2+x2)y=0

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

(3)x2y+(12α)xy+(β2γ2x2γn2γ2+α2)y=0

With the standard solution

(4)y=xα(c1BesselJ(n,βxγ)+c2BesselY(n,βxγ))

Comparing (3) to (1) and solving for α,β,n,γ gives

α=0β=1n=5γ=1

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

y=c1BesselJ(5,x)+c2BesselY(5,x)

Will add steps showing solving for IC soon.

Summary of solutions found

y=c1BesselJ(5,x)+c2BesselY(5,x)

Maple. Time used: 0.002 (sec). Leaf size: 19
ode:=x^2*diff(diff(y(x),x),x)+x*diff(y(x),x)+(x^2-5)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
y=c1BesselJ(5,x)+c2BesselY(5,x)

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
 

Maple step by step

Let’s solvex2(ddxddxy(x))+x(ddxy(x))+(x25)y(x)=0Highest derivative means the order of the ODE is2ddxddxy(x)Isolate 2nd derivativeddxddxy(x)=(x25)y(x)x2ddxy(x)xGroup terms withy(x)on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearddxddxy(x)+ddxy(x)x+(x25)y(x)x2=0Check to see ifx0=0is a regular singular pointDefine functions[P2(x)=1x,P3(x)=x25x2]xP2(x)is analytic atx=0(xP2(x))|x=0=1x2P3(x)is analytic atx=0(x2P3(x))|x=0=5x=0is a regular singular pointCheck to see ifx0=0is a regular singular pointx0=0Multiply by denominatorsx2(ddxddxy(x))+x(ddxy(x))+(x25)y(x)=0Assume series solution fory(x)y(x)=k=0akxk+rRewrite ODE with series expansionsConvertxmy(x)to series expansion form=0..2xmy(x)=k=0akxk+r+mShift index usingk>kmxmy(x)=k=makmxk+rConvertx(ddxy(x))to series expansionx(ddxy(x))=k=0ak(k+r)xk+rConvertx2(ddxddxy(x))to series expansionx2(ddxddxy(x))=k=0ak(k+r)(k+r1)xk+rRewrite ODE with series expansionsa0(r25)xr+a1(r2+2r4)x1+r+(k=2(ak(k2+2kr+r25)+ak2)xk+r)=0a0cannot be 0 by assumption, giving the indicial equationr25=0Values of r that satisfy the indicial equationr{5,5}Each term must be 0a1(r2+2r4)=0Solve for the dependent coefficient(s)a1=0Each term in the series must be 0, giving the recursion relationak(k2+2kr+r25)+ak2=0Shift index usingk>k+2ak+2((k+2)2+2(k+2)r+r25)+ak=0Recursion relation that defines series solution to ODEak+2=akk2+2kr+r2+4k+4r1Recursion relation forr=5ak+2=akk2+2k5+4+4k+45Solution forr=5[y(x)=k=0akxk+5,ak+2=akk2+2k5+4+4k+45,a1=0]Recursion relation forr=5ak+2=akk22k5+4+4k45Solution forr=5[y(x)=k=0akxk5,ak+2=akk22k5+4+4k45,a1=0]Combine solutions and rename parameters[y(x)=(k=0akxk+5)+(k=0bkxk5),ak+2=akk2+2k5+4+4k+45,a1=0,bk+2=bkk22k5+4+4k45,b1=0]
Mathematica. Time used: 0.079 (sec). Leaf size: 26
ode=x^2*D[y[x],{x,2}]+x*D[y[x],x]+(x^2-5)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)c1BesselJ(5,x)+c2BesselY(5,x)
Sympy. Time used: 0.199 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + x*Derivative(y(x), x) + (x**2 - 5)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
y(x)=C1J5(x)+C2Y5(x)