56.1.32 problem 33

Internal problem ID [8744]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 33
Date solved : Sunday, March 30, 2025 at 01:29:28 PM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&=\frac {1}{1-y} \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=2 \end{align*}

Maple. Time used: 0.049 (sec). Leaf size: 13
ode:=diff(y(t),t) = 1/(1-y(t)); 
ic:=y(0) = 2; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = 1+\sqrt {1-2 t} \]
Mathematica. Time used: 0.003 (sec). Leaf size: 16
ode=D[y[t],t]==1/(1-y[t]); 
ic=y[0]==2; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \sqrt {1-2 t}+1 \]
Sympy. Time used: 0.416 (sec). Leaf size: 12
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(Derivative(y(t), t) - 1/(1 - y(t)),0) 
ics = {y(0): 2} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \sqrt {1 - 2 t} + 1 \]