80.3.2 problem 2

Internal problem ID [21166]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 3. First order nonlinear differential equations. Excercise 3.7 at page 67
Problem number : 2
Date solved : Thursday, October 02, 2025 at 07:15:15 PM
CAS classification : [_quadrature]

\begin{align*} x^{\prime }&=x^{2}-1 \end{align*}

With initial conditions

\begin{align*} x \left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.019 (sec). Leaf size: 8
ode:=diff(x(t),t) = x(t)^2-1; 
ic:=[x(0) = 0]; 
dsolve([ode,op(ic)],x(t), singsol=all);
 
\[ x = -\tanh \left (t \right ) \]
Mathematica. Time used: 0.007 (sec). Leaf size: 24
ode=D[x[t],t]==x[t]^2-1; 
ic={x[0]==0}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {1-e^{2 t}}{e^{2 t}+1} \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-x(t)**2 + Derivative(x(t), t) + 1,0) 
ics = {x(0): 0} 
dsolve(ode,func=x(t),ics=ics)
 
NotImplementedError : Initial conditions produced too many solutions for constants