87.24.2 problem 2

Internal problem ID [23784]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 5. Series solutions of second order linear equations. Exercise at page 218
Problem number : 2
Date solved : Thursday, October 02, 2025 at 09:45:09 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

\begin{align*} 0 \end{align*}
Maple. Time used: 0.011 (sec). Leaf size: 36
Order:=6; 
ode:=x*diff(diff(y(x),x),x)-(2*x-1)*diff(y(x),x)+2*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = \left (6 x -x^{2}-\frac {2}{9} x^{3}-\frac {1}{18} x^{4}-\frac {1}{75} x^{5}+\operatorname {O}\left (x^{6}\right )\right ) c_2 +\left (1-2 x +\operatorname {O}\left (x^{6}\right )\right ) \left (c_2 \ln \left (x \right )+c_1 \right ) \]
Mathematica. Time used: 0.001 (sec). Leaf size: 68
ode=D[y[x],{x,2}]-(2*x-1)*D[y[x],x]+2*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to c_1 \left (\frac {7 x^5}{60}-\frac {x^4}{4}+\frac {x^3}{3}-x^2+1\right )+c_2 \left (\frac {7 x^5}{120}-\frac {x^4}{8}+\frac {x^3}{6}-\frac {x^2}{2}+x\right ) \]
Sympy. Time used: 0.265 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(2*x - 1)*Derivative(y(x), x) + 2*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_ordinary",x0=0,n=6)
 
\[ y{\left (x \right )} = C_{2} \left (- \frac {x^{4}}{4} + \frac {x^{3}}{3} - x^{2} + 1\right ) + C_{1} x \left (- \frac {x^{3}}{8} + \frac {x^{2}}{6} - \frac {x}{2} + 1\right ) + O\left (x^{6}\right ) \]