12.11.10 problem 21

Internal problem ID [1849]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 7 Series Solutions of Linear Second Equations. 7.1 Exercises. Page 318
Problem number : 21
Date solved : Tuesday, March 04, 2025 at 01:45:01 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

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

Maple. Time used: 0.012 (sec). Leaf size: 50
Order:=6; 
ode:=x^2*(1-x)*diff(diff(y(x),x),x)+x*(x+4)*diff(y(x),x)+(2-x)*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = \frac {\ln \left (x \right ) \left (9 x +18 x^{2}+3 x^{3}+\operatorname {O}\left (x^{6}\right )\right ) c_2 +c_1 \left (1+2 x +\frac {1}{3} x^{2}+\operatorname {O}\left (x^{6}\right )\right ) x +\left (1-5 x -55 x^{2}-\frac {53}{3} x^{3}+\operatorname {O}\left (x^{6}\right )\right ) c_2}{x^{2}} \]
Mathematica. Time used: 0.054 (sec). Leaf size: 56
ode=x^2*(1-x)*D[y[x],{x,2}]+x*(4+x)*D[y[x],x]+(2-x)*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to c_1 \left (\frac {3 \left (x^2+6 x+3\right ) \log (x)}{x}-\frac {21 x^3+75 x^2+15 x-1}{x^2}\right )+c_2 \left (\frac {x}{3}+\frac {1}{x}+2\right ) \]
Sympy. Time used: 1.030 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*(1 - x)*Derivative(y(x), (x, 2)) + x*(x + 4)*Derivative(y(x), x) + (2 - x)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=6)
 
\[ y{\left (x \right )} = \frac {C_{2}}{x} + \frac {C_{1}}{x^{2}} + O\left (x^{6}\right ) \]