7.6.3 problem 3

Internal problem ID [173]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.7 (population models). Problems at page 82
Problem number : 3
Date solved : Thursday, March 13, 2025 at 03:26:00 PM
CAS classification : [_quadrature]

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

With initial conditions

\begin{align*} x \left (0\right )&=3 \end{align*}

Maple. Time used: 0.056 (sec). Leaf size: 9
ode:=diff(x(t),t) = 1-x(t)^2; 
ic:=x(0) = 3; 
dsolve([ode,ic],x(t), singsol=all);
 
\[ x = \coth \left (t +\operatorname {arctanh}\left (\frac {1}{3}\right )\right ) \]
Mathematica. Time used: 0.011 (sec). Leaf size: 26
ode=D[x[t],t]==1-x[t]^2; 
ic={x[0]==3}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to \frac {2 e^{2 t}+1}{2 e^{2 t}-1} \]
Sympy
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(x(t)**2 + Derivative(x(t), t) - 1,0) 
ics = {x(0): 3} 
dsolve(ode,func=x(t),ics=ics)
 
NotImplementedError : Initial conditions produced too many solutions for constants