72.2.12 problem 15 b(2)

Internal problem ID [14576]
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(2)
Date solved : Monday, March 31, 2025 at 12:32:01 PM
CAS classification : [_quadrature]

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

With initial conditions

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

Maple. Time used: 0.425 (sec). Leaf size: 34
ode:=diff(S(t),t) = S(t)^3-2*S(t)^2+S(t); 
ic:=S(1) = 1/2; 
dsolve([ode,ic],S(t), singsol=all);
 
\[ S = {\mathrm e}^{\operatorname {RootOf}\left (-i \pi \,{\mathrm e}^{\textit {\_Z}}-\ln \left ({\mathrm e}^{\textit {\_Z}}+1\right ) {\mathrm e}^{\textit {\_Z}}+\textit {\_Z} \,{\mathrm e}^{\textit {\_Z}}+t \,{\mathrm e}^{\textit {\_Z}}+{\mathrm e}^{\textit {\_Z}}+1\right )}+1 \]
Mathematica
ode=D[S[t],t]==S[t]^3-2*S[t]^2+S[t]; 
ic={S[1]==1/2}; 
DSolve[{ode,ic},S[t],t,IncludeSingularSolutions->True]
 

{}

Sympy. Time used: 0.320 (sec). Leaf size: 24
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(1): 1/2} 
dsolve(ode,func=s(t),ics=ics)
 
\[ t + \log {\left (s{\left (t \right )} - 1 \right )} - \log {\left (s{\left (t \right )} \right )} + \frac {1}{s{\left (t \right )} - 1} = -1 + i \pi \]