66.4.9 problem 16

Internal problem ID [15973]
Book : DIFFERENTIAL EQUATIONS by Paul Blanchard, Robert L. Devaney, Glen R. Hall. 4th edition. Brooks/Cole. Boston, USA. 2012
Section : Chapter 1. First-Order Differential Equations. Exercises section 1.5 page 71
Problem number : 16
Date solved : Thursday, October 02, 2025 at 10:35:54 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=\frac {t}{-2+y} \end{align*}

With initial conditions

\begin{align*} y \left (-1\right )&=0 \\ \end{align*}
Maple. Time used: 0.078 (sec). Leaf size: 15
ode:=diff(y(t),t) = t/(y(t)-2); 
ic:=[y(-1) = 0]; 
dsolve([ode,op(ic)],y(t), singsol=all);
 
\[ y = 2-\sqrt {t^{2}+3} \]
Mathematica. Time used: 0.002 (sec). Leaf size: 21
ode=D[y[t],t]==1/(y[t]-2); 
ic={y[-1]==0}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)&\to 2-\sqrt {2} \sqrt {t+3} \end{align*}
Sympy. Time used: 0.188 (sec). Leaf size: 12
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-t/(y(t) - 2) + Derivative(y(t), t),0) 
ics = {y(-1): 0} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = 2 - \sqrt {t^{2} + 3} \]