46.5.2 problem 12

Internal problem ID [7338]
Book : ADVANCED ENGINEERING MATHEMATICS. ERWIN KREYSZIG, HERBERT KREYSZIG, EDWARD J. NORMINTON. 10th edition. John Wiley USA. 2011
Section : Chapter 5. Series Solutions of ODEs. REVIEW QUESTIONS. page 201
Problem number : 12
Date solved : Sunday, March 30, 2025 at 11:54:44 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

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

Maple. Time used: 0.029 (sec). Leaf size: 39
Order:=6; 
ode:=x*diff(diff(y(x),x),x)+(-2*x+1)*diff(y(x),x)+(x-1)*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = \left (1+x +\frac {1}{2} x^{2}+\frac {1}{6} x^{3}+\frac {1}{24} x^{4}+\frac {1}{120} x^{5}\right ) \left (\ln \left (x \right ) c_2 +c_1 \right )+O\left (x^{6}\right ) \]
Mathematica. Time used: 0.007 (sec). Leaf size: 74
ode=x*D[y[x],{x,2}]+(1-2*x)*D[y[x],x]+(x-1)*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to c_1 \left (\frac {x^5}{120}+\frac {x^4}{24}+\frac {x^3}{6}+\frac {x^2}{2}+x+1\right )+c_2 \left (\frac {x^5}{120}+\frac {x^4}{24}+\frac {x^3}{6}+\frac {x^2}{2}+x+1\right ) \log (x) \]
Sympy. Time used: 0.904 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), (x, 2)) + (1 - 2*x)*Derivative(y(x), x) + (x - 1)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=6)
 
\[ y{\left (x \right )} = C_{1} \left (\frac {x^{5}}{120} + \frac {x^{4}}{24} + \frac {x^{3}}{6} + \frac {x^{2}}{2} + x + 1\right ) + O\left (x^{6}\right ) \]