72.2.13 problem 15 b(3)

Internal problem ID [14577]
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.3 page 47
Problem number : 15 b(3)
Date solved : Monday, March 31, 2025 at 12:32:18 PM
CAS classification : [_quadrature]

\begin{align*} S^{\prime }&=S^{3}-2 S^{2}+S \end{align*}

With initial conditions

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

Maple. Time used: 0.008 (sec). Leaf size: 5
ode:=diff(S(t),t) = S(t)^3-2*S(t)^2+S(t); 
ic:=S(0) = 1; 
dsolve([ode,ic],S(t), singsol=all);
 
\[ S = 1 \]
Mathematica. Time used: 0.001 (sec). Leaf size: 6
ode=D[S[t],t]==S[t]^3-2*S[t]^2+S[t]; 
ic={S[0]==1}; 
DSolve[{ode,ic},S[t],t,IncludeSingularSolutions->True]
 
\[ S(t)\to 1 \]
Sympy
from sympy import * 
t = symbols("t") 
s = Function("s") 
ode = Eq(-s(t)**3 + 2*s(t)**2 - s(t) + Derivative(s(t), t),0) 
ics = {s(0): 1} 
dsolve(ode,func=s(t),ics=ics)
 
ValueError : Couldnt solve for initial conditions