54.3.27 problem 27

Internal problem ID [8583]
Book : Elementary differential equations. Rainville, Bedient, Bedient. Prentice Hall. NJ. 8th edition. 1997.
Section : CHAPTER 17. Power series solutions. 17.5. Solutions Near an Ordinary Point. Exercises page 355
Problem number : 27
Date solved : Wednesday, March 05, 2025 at 06:10:00 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

\begin{align*} 2 \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 48
Order:=8; 
ode:=diff(diff(y(x),x),x)+(x-2)*y(x) = 0; 
dsolve(ode,y(x),type='series',x=2);
 
\[ y = \left (1-\frac {\left (x -2\right )^{3}}{6}+\frac {\left (x -2\right )^{6}}{180}\right ) y \left (2\right )+\left (x -2-\frac {\left (x -2\right )^{4}}{12}+\frac {\left (x -2\right )^{7}}{504}\right ) y^{\prime }\left (2\right )+O\left (x^{8}\right ) \]
Mathematica. Time used: 0.001 (sec). Leaf size: 51
ode=D[y[x],{x,2}]+(x-2)*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,2,7}]
 
\[ y(x)\to c_1 \left (\frac {1}{180} (x-2)^6-\frac {1}{6} (x-2)^3+1\right )+c_2 \left (\frac {1}{504} (x-2)^7-\frac {1}{12} (x-2)^4+x-2\right ) \]
Sympy. Time used: 0.728 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((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=8)
 
\[ y{\left (x \right )} = C_{2} \left (x + \frac {\left (x - 2\right )^{7}}{504} - \frac {\left (x - 2\right )^{4}}{12} - 2\right ) + C_{1} \left (\frac {\left (x - 2\right )^{6}}{180} - \frac {\left (x - 2\right )^{3}}{6} + 1\right ) + O\left (x^{8}\right ) \]