82.2.9 problem 24-9

Internal problem ID [21770]
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-9
Date solved : Thursday, October 02, 2025 at 08:01:58 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using series method with expansion around

\begin{align*} 1 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 70
Order:=6; 
ode:=diff(diff(y(x),x),x)+(x-1)*y(x) = exp(x); 
dsolve(ode,y(x),type='series',x=1);
 
\[ y = \left (1-\frac {\left (x -1\right )^{3}}{6}\right ) y \left (1\right )+\left (x -1-\frac {\left (x -1\right )^{4}}{12}\right ) y^{\prime }\left (1\right )+\frac {{\mathrm e} \left (x -1\right )^{2}}{2}+\frac {{\mathrm e} \left (x -1\right )^{3}}{6}+\frac {{\mathrm e} \left (x -1\right )^{4}}{24}-\frac {{\mathrm e} \left (x -1\right )^{5}}{60}+O\left (x^{6}\right ) \]
Mathematica. Time used: 0.008 (sec). Leaf size: 73
ode=D[y[x],{x,2}]+(x-1)*y[x]==Exp[x]; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,1,5}]
 
\[ y(x)\to -\frac {1}{60} e (x-1)^5+\frac {1}{24} e (x-1)^4+\frac {1}{6} e (x-1)^3+\frac {1}{2} e (x-1)^2+c_1 \left (1-\frac {1}{6} (x-1)^3\right )+c_2 \left (-\frac {1}{12} (x-1)^4+x-1\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x - 1)*y(x) - exp(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 - 1)*y(x) - exp(x) + Derivative(y(x), (x, 2)) does not match hint 2nd_power_series_regular