82.2.7 problem 24-7

Internal problem ID [21768]
Book : The Differential Equations Problem Solver. VOL. II. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 24. Power series about an ordinary point. Page 719
Problem number : 24-7
Date solved : Thursday, October 02, 2025 at 08:01:57 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

\begin{align*} 2 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 41
Order:=6; 
ode:=diff(diff(y(x),x),x)-(x-2)*diff(y(x),x)+2*y(x) = 0; 
dsolve(ode,y(x),type='series',x=2);
 
\[ y = \left (1-\left (x -2\right )^{2}\right ) y \left (2\right )+\left (x -2-\frac {\left (x -2\right )^{3}}{6}-\frac {\left (x -2\right )^{5}}{120}\right ) y^{\prime }\left (2\right )+O\left (x^{6}\right ) \]
Mathematica. Time used: 0.001 (sec). Leaf size: 40
ode=D[y[x],{x,2}]-(x-2)*D[y[x],x]+2*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,2,5}]
 
\[ y(x)\to c_1 \left (1-(x-2)^2\right )+c_2 \left (-\frac {1}{120} (x-2)^5-\frac {1}{6} (x-2)^3+x-2\right ) \]
Sympy. Time used: 0.186 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((2 - x)*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=2,n=6)
 
\[ y{\left (x \right )} = C_{2} \left (x - \frac {\left (x - 2\right )^{3}}{6} - 2\right ) + C_{1} \left (1 - \left (x - 2\right )^{2}\right ) + O\left (x^{6}\right ) \]