84.32.6 problem 19.18

Internal problem ID [22314]
Book : Schaums outline series. Differential Equations By Richard Bronson. 1973. McGraw-Hill Inc. ISBN 0-07-008009-7
Section : Chapter 19. Power series solutions about an ordinary point. Supplementary problems
Problem number : 19.18
Date solved : Thursday, October 02, 2025 at 08:37:24 PM
CAS classification : [[_2nd_order, _missing_y]]

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

Using series method with expansion around

\begin{align*} 1 \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 38
Order:=6; 
ode:=diff(diff(y(x),x),x)-(x-1)*diff(y(x),x) = x^2-2*x; 
dsolve(ode,y(x),type='series',x=1);
 
\[ y = y \left (1\right )+\left (x -1+\frac {\left (x -1\right )^{3}}{6}+\frac {\left (x -1\right )^{5}}{40}\right ) y^{\prime }\left (1\right )-\frac {\left (x -1\right )^{2}}{2}+O\left (x^{6}\right ) \]
Mathematica. Time used: 0.009 (sec). Leaf size: 39
ode=D[y[x],{x,2}]-(x-1)*D[y[x],x]==x^2-2*x; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,1,5}]
 
\[ y(x)\to -\frac {1}{2} (x-1)^2+c_2 \left (\frac {1}{40} (x-1)^5+\frac {1}{6} (x-1)^3+x-1\right )+c_1 \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + 2*x - (x - 1)*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=1,n=6)
 
ValueError : ODE -x**2 + 2*x - (x - 1)*Derivative(y(x), x) + Derivative(y(x), (x, 2)) does not match hint 2nd_power_series_regular