42.1.15 problem 3.25 v=1/2

Internal problem ID [6837]
Book : Advanced Mathematical Methods for Scientists and Engineers, Bender and Orszag. Springer October 29, 1999
Section : Chapter 3. APPROXIMATE SOLUTION OF LINEAR DIFFERENTIAL EQUATIONS. page 136
Problem number : 3.25 v=1/2
Date solved : Sunday, March 30, 2025 at 11:24:08 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} x^{2} y^{\prime \prime }+x y^{\prime }+\left (x^{2}+\frac {1}{4}\right ) y&=0 \end{align*}

Using series method with expansion around

\begin{align*} 0 \end{align*}

Maple. Time used: 0.026 (sec). Leaf size: 35
Order:=6; 
ode:=x^2*diff(diff(y(x),x),x)+x*diff(y(x),x)+(x^2+1/4)*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = c_1 \,x^{-\frac {i}{2}} \left (1+\left (-\frac {1}{5}-\frac {i}{10}\right ) x^{2}+\left (\frac {7}{680}+\frac {3 i}{340}\right ) x^{4}+\operatorname {O}\left (x^{6}\right )\right )+c_2 \,x^{\frac {i}{2}} \left (1+\left (-\frac {1}{5}+\frac {i}{10}\right ) x^{2}+\left (\frac {7}{680}-\frac {3 i}{340}\right ) x^{4}+\operatorname {O}\left (x^{6}\right )\right ) \]
Mathematica. Time used: 0.009 (sec). Leaf size: 66
ode=x^2*D[y[x],{x,2}]+x*D[y[x],x]+(x^2+1/4)*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to \left (\frac {7}{680}-\frac {3 i}{340}\right ) c_1 x^{1 i/2} \left (x^4-(16+4 i) x^2+(56+48 i)\right )+\left (\frac {7}{680}+\frac {3 i}{340}\right ) c_2 x^{-i/2} \left (x^4-(16-4 i) x^2+(56-48 i)\right ) \]
Sympy
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 + 1/4)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=6)
 
ValueError : Expected Expr or iterable but got None