78.19.10 problem 3 (a)

Internal problem ID [18350]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 5. Power Series Solutions and Special Functions. Section 29. Regular singular Points. Problems at page 227
Problem number : 3 (a)
Date solved : Thursday, March 13, 2025 at 11:54:43 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

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

Maple. Time used: 0.083 (sec). Leaf size: 33
Order:=6; 
ode:=x^3*diff(diff(y(x),x),x)+(-1+cos(2*x))*diff(y(x),x)+2*x*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = c_{1} x^{2} \left (1-\frac {2}{9} x^{2}+\frac {26}{675} x^{4}+\operatorname {O}\left (x^{6}\right )\right )+c_{2} x \left (1-\frac {1}{3} x^{2}+\frac {17}{270} x^{4}+\operatorname {O}\left (x^{6}\right )\right ) \]
Mathematica. Time used: 0.025 (sec). Leaf size: 60
ode=x^3*D[y[x],{x,2}]+(Cos[2*x]-1)*D[y[x],x]+2*x*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to c_2 \left (-\frac {1742 x^6}{297675}+\frac {26 x^4}{675}-\frac {2 x^2}{9}+1\right ) x^2+c_1 \left (-\frac {173 x^6}{17010}+\frac {17 x^4}{270}-\frac {x^2}{3}+1\right ) x \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**3*Derivative(y(x), (x, 2)) + 2*x*y(x) + (cos(2*x) - 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=6)
 
ValueError : ODE x**3*Derivative(y(x), (x, 2)) + 2*x*y(x) + (cos(2*x) - 1)*Derivative(y(x), x) does not match hint 2nd_power_series_regular