76.5.4 problem 4

Internal problem ID [17345]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 2. First order differential equations. Section 2.7 (Substitution Methods). Problems at page 108
Problem number : 4
Date solved : Thursday, March 13, 2025 at 09:30:04 AM
CAS classification : [_separable]

\begin{align*} x \left (x -1\right ) y^{\prime }&=y \left (y+1\right ) \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 15
ode:=x*(x-1)*diff(y(x),x) = y(x)*(1+y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x -1}{c_{1} x +1} \]
Mathematica. Time used: 0.32 (sec). Leaf size: 57
ode=x*(x-1)*D[y[x],x]==y[x]*(y[x]+1); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{K[1] (K[1]+1)}dK[1]\&\right ]\left [\int _1^x\frac {1}{(K[2]-1) K[2]}dK[2]+c_1\right ] \\ y(x)\to -1 \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.329 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(x - 1)*Derivative(y(x), x) - (y(x) + 1)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} \left (x - 1\right )}{- C_{1} x + C_{1} + x} \]