75.2.5 problem 25

Internal problem ID [16603]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 2. The method of isoclines. Exercises page 27
Problem number : 25
Date solved : Thursday, March 13, 2025 at 08:25:43 AM
CAS classification : [_quadrature]

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

Maple. Time used: 0.003 (sec). Leaf size: 14
ode:=diff(y(x),x) = (-1+y(x))^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x -1+c_{1}}{x +c_{1}} \]
Mathematica. Time used: 0.109 (sec). Leaf size: 22
ode=D[y[x],x]==(y[x]-1)^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {x-1+c_1}{x+c_1} \\ y(x)\to 1 \\ \end{align*}
Sympy. Time used: 0.175 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(y(x) - 1)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} - x + 1}{C_{1} - x} \]