72.3.5 problem 5

Internal problem ID [14598]
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 : 5
Date solved : Monday, March 31, 2025 at 12:39:47 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 )&=4 \end{align*}

Maple. Time used: 0.090 (sec). Leaf size: 23
ode:=diff(w(t),t) = (3-w(t))*(w(t)+1); 
ic:=w(0) = 4; 
dsolve([ode,ic],w(t), singsol=all);
 
\[ w = \frac {15 \,{\mathrm e}^{4 t}+1}{-1+5 \,{\mathrm e}^{4 t}} \]
Mathematica. Time used: 0.013 (sec). Leaf size: 26
ode=D[w[t],t]==(3-w[t])*(w[t]+1); 
ic={w[0]==4}; 
DSolve[{ode,ic},w[t],t,IncludeSingularSolutions->True]
 
\[ w(t)\to \frac {15 e^{4 t}+1}{5 e^{4 t}-1} \]
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): 4} 
dsolve(ode,func=w(t),ics=ics)
 
NotImplementedError : Initial conditions produced too many solutions for constants