64.15.2 problem 2

Internal problem ID [13500]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 6, Series solutions of linear differential equations. Section 6.2 (Frobenius). Exercises page 251
Problem number : 2
Date solved : Wednesday, March 05, 2025 at 10:02:41 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

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

Maple. Time used: 0.040 (sec). Leaf size: 307
Order:=6; 
ode:=(x^3+x^2)*diff(diff(y(x),x),x)+(x^2-2*x)*diff(y(x),x)+4*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = x^{{3}/{2}} \left (c_{2} x^{\frac {i \sqrt {7}}{2}} \left (1+\frac {3 \sqrt {7}-i}{2 i-2 \sqrt {7}} x +\frac {-4 \sqrt {7}-12 i}{\left (i-\sqrt {7}\right ) \left (i \sqrt {7}+2\right )} x^{2}+\frac {224}{3} \frac {1}{\left (-\sqrt {7}+2 i\right ) \left (-i+\sqrt {7}\right ) \left (3+i \sqrt {7}\right )} x^{3}+\frac {\frac {1036 i}{3}-84 \sqrt {7}}{\left (-i+\sqrt {7}\right ) \left (i \sqrt {7}+2\right ) \left (3+i \sqrt {7}\right ) \left (4+i \sqrt {7}\right )} x^{4}+\frac {\frac {2576 i \sqrt {7}}{3}+\frac {6608}{5}}{\left (4 i-\sqrt {7}\right ) \left (-i+\sqrt {7}\right ) \left (i \sqrt {7}+2\right ) \left (3+i \sqrt {7}\right ) \left (i \sqrt {7}+5\right )} x^{5}+\operatorname {O}\left (x^{6}\right )\right )+c_{1} x^{-\frac {i \sqrt {7}}{2}} \left (1+\frac {-3 \sqrt {7}-i}{2 \sqrt {7}+2 i} x +\frac {12+4 i \sqrt {7}}{5+3 i \sqrt {7}} x^{2}+\frac {224}{3} \frac {1}{\left (i \sqrt {7}-2\right ) \left (\sqrt {7}+3 i\right ) \left (\sqrt {7}+i\right )} x^{3}+\frac {63 i \sqrt {7}-259}{15 i \sqrt {7}-129} x^{4}+\frac {-1239 i-805 \sqrt {7}}{675 i+255 \sqrt {7}} x^{5}+\operatorname {O}\left (x^{6}\right )\right )\right ) \]
Mathematica. Time used: 0.017 (sec). Leaf size: 5834
ode=(x^3+x^2)*D[y[x],{x,2}]+(x^2-2*x)*D[y[x],x]+4*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 

Too large to display

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x**2 - 2*x)*Derivative(y(x), x) + (x**3 + x**2)*Derivative(y(x), (x, 2)) + 4*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=6)
 
TypeError : Invalid comparison of non-real 1 + sqrt(7)*I