81.15.17 problem 19-18

Internal problem ID [21725]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 19. Change of variables. Page 483
Problem number : 19-18
Date solved : Thursday, October 02, 2025 at 08:01:25 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \left (1-\frac {1}{x}\right ) u^{\prime \prime }+\left (\frac {2}{x}-\frac {2}{x^{2}}-\frac {1}{x^{3}}\right ) u^{\prime }-\frac {u}{x^{4}}&=\frac {2}{x}-\frac {2}{x^{2}}-\frac {2}{x^{3}} \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 17
ode:=(1-1/x)*diff(diff(u(x),x),x)+(2/x-2/x^2-1/x^3)*diff(u(x),x)-1/x^4*u(x) = 2/x-2/x^2-2/x^3; 
dsolve(ode,u(x), singsol=all);
 
\[ u = \frac {c_2}{x}+{\mathrm e}^{\frac {1}{x}} c_1 +x \]
Mathematica. Time used: 0.115 (sec). Leaf size: 26
ode=(1-1/x)*D[u[x],{x,2}]+(2/x-2/x^2-1/x^3)*D[u[x],x]-1/x^4*u[x] == 2/x-2/x^2-2/x^3; 
ic={}; 
DSolve[{ode,ic},u[x],x,IncludeSingularSolutions->True]
 
\begin{align*} u(x)&\to \frac {x^2-c_2 e^{\frac {1}{x}} x+2+c_1}{x} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
u = Function("u") 
ode = Eq((1 - 1/x)*Derivative(u(x), (x, 2)) + (2/x - 2/x**2 - 1/x**3)*Derivative(u(x), x) - 2/x + 2/x**2 + 2/x**3 - u(x)/x**4,0) 
ics = {} 
dsolve(ode,func=u(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(u(x), x) - (x**4*Derivative(u(x), (x, 2)) - x**3*Derivative(u(x), (x, 2)) - 2*x**3 + 2*x**2 + 2*x - u(x))/(x*(-2*x**2 + 2*x + 1)) cannot be solved by the factorable group method