29.4.13 problem 13

Internal problem ID [7266]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 4. OTHER METHODS FOR FIRST-ORDER EQUATIONS. page 406
Problem number : 13
Date solved : Tuesday, September 30, 2025 at 04:27:30 PM
CAS classification : [_linear]

\begin{align*} \left (x -1\right ) y^{\prime }+y-\frac {1}{x^{2}}+\frac {2}{x^{3}}&=0 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 17
ode:=(x-1)*diff(y(x),x)+y(x)-1/x^2+2/x^3 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_1}{x -1}-\frac {1}{x^{2}} \]
Mathematica. Time used: 0.025 (sec). Leaf size: 24
ode=(x-1)*D[y[x],x]+y[x]-1/x^2+2/x^3==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {c_1 x^2+x-1}{(x-1) x^2} \end{align*}
Sympy. Time used: 0.170 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x - 1)*Derivative(y(x), x) + y(x) - 1/x**2 + 2/x**3,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} - \frac {1}{x} + \frac {1}{x^{2}}}{x - 1} \]