85.35.8 problem 15

Internal problem ID [22728]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. C Exercises at page 68
Problem number : 15
Date solved : Thursday, October 02, 2025 at 09:14:05 PM
CAS classification : [_rational, _Riccati]

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