13.1.9 problem 9

Internal problem ID [3523]
Book : Differential equations and linear algebra, Stephen W. Goode, second edition, 2000
Section : 1.4, page 36
Problem number : 9
Date solved : Tuesday, September 30, 2025 at 06:41:16 AM
CAS classification : [_separable]

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