72.3.6 problem 6

Internal problem ID [14599]
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.4 page 61
Problem number : 6
Date solved : Monday, March 31, 2025 at 12:39:49 PM
CAS classification : [_quadrature]

\begin{align*} w^{\prime }&=\left (3-w\right ) \left (w+1\right ) \end{align*}

With initial conditions

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

Maple. Time used: 0.090 (sec). Leaf size: 21
ode:=diff(w(t),t) = (3-w(t))*(w(t)+1); 
ic:=w(0) = 0; 
dsolve([ode,ic],w(t), singsol=all);
 
\[ w = \frac {3 \,{\mathrm e}^{4 t}-3}{3+{\mathrm e}^{4 t}} \]
Mathematica. Time used: 0.009 (sec). Leaf size: 23
ode=D[w[t],t]==(3-w[t])*(w[t]+1); 
ic={w[0]==0}; 
DSolve[{ode,ic},w[t],t,IncludeSingularSolutions->True]
 
\[ w(t)\to \frac {3 \left (e^{4 t}-1\right )}{e^{4 t}+3} \]
Sympy
from sympy import * 
t = symbols("t") 
w = Function("w") 
ode = Eq((w(t) - 3)*(w(t) + 1) + Derivative(w(t), t),0) 
ics = {w(0): 0} 
dsolve(ode,func=w(t),ics=ics)
 
NotImplementedError : Initial conditions produced too many solutions for constants