20.25.3 problem 4

Internal problem ID [4008]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 11, Series Solutions to Linear Differential Equations. Exercises for 11.4. page 758
Problem number : 4
Date solved : Tuesday, March 04, 2025 at 05:22:35 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

\begin{align*} 0 \end{align*}

Maple. Time used: 0.017 (sec). Leaf size: 60
Order:=6; 
ode:=(x-2)^2*diff(diff(y(x),x),x)+(x-2)*exp(x)*diff(y(x),x)+4*y(x)/x = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y \left (x \right ) = c_{1} x \left (1-\frac {1}{4} x -\frac {1}{24} x^{2}-\frac {13}{576} x^{3}-\frac {35}{2304} x^{4}-\frac {1297}{138240} x^{5}+\operatorname {O}\left (x^{6}\right )\right )+c_{2} \left (\ln \left (x \right ) \left (-x +\frac {1}{4} x^{2}+\frac {1}{24} x^{3}+\frac {13}{576} x^{4}+\frac {35}{2304} x^{5}+\operatorname {O}\left (x^{6}\right )\right )+\left (1+\frac {1}{2} x -\frac {5}{4} x^{2}-\frac {41}{144} x^{3}-\frac {1097}{6912} x^{4}-\frac {397}{4320} x^{5}+\operatorname {O}\left (x^{6}\right )\right )\right ) \]
Mathematica. Time used: 0.063 (sec). Leaf size: 87
ode=(x-2)^2*D[y[x],{x,2}]+(x-2)*Exp[x]*D[y[x],x]+4/x*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to c_1 \left (\frac {1}{576} x \left (13 x^3+24 x^2+144 x-576\right ) \log (x)+\frac {-1097 x^4-1968 x^3-8640 x^2+3456 x+6912}{6912}\right )+c_2 \left (-\frac {35 x^5}{2304}-\frac {13 x^4}{576}-\frac {x^3}{24}-\frac {x^2}{4}+x\right ) \]
Sympy. Time used: 1.402 (sec). Leaf size: 66
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x - 2)**2*Derivative(y(x), (x, 2)) + (x - 2)*exp(x)*Derivative(y(x), x) + 4*y(x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=6)
 
\[ y{\left (x \right )} = C_{1} x \left (\frac {x^{4} \left (x + 1\right ) \left (x + 2\right ) \left (x + 4\right ) \left (3 x + 4\right )}{360} - \frac {x^{3} \left (x + 2\right ) \left (x + 4\right ) \left (3 x + 4\right )}{72} + \frac {x^{2} \left (x + 2\right ) \left (x + 4\right )}{6} - \frac {x \left (x + 4\right )}{2} + 1\right ) + O\left (x^{6}\right ) \]