72.5.18 problem 5

Internal problem ID [14633]
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.6 page 89
Problem number : 5
Date solved : Monday, March 31, 2025 at 12:45:04 PM
CAS classification : [_quadrature]

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

Maple. Time used: 0.005 (sec). Leaf size: 19
ode:=diff(w(t),t) = (1-w(t))*sin(w(t)); 
dsolve(ode,w(t), singsol=all);
 
\[ t +\int _{}^{w}\frac {\csc \left (\textit {\_a} \right )}{-1+\textit {\_a}}d \textit {\_a} +c_1 = 0 \]
Mathematica. Time used: 0.238 (sec). Leaf size: 41
ode=D[w[t],t]==(1-w[t])*Sin[ w[t]]; 
ic={}; 
DSolve[{ode,ic},w[t],t,IncludeSingularSolutions->True]
 
\begin{align*} w(t)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {\csc (K[1])}{K[1]-1}dK[1]\&\right ][-t+c_1] \\ w(t)\to 0 \\ w(t)\to 1 \\ \end{align*}
Sympy. Time used: 0.625 (sec). Leaf size: 14
from sympy import * 
t = symbols("t") 
w = Function("w") 
ode = Eq(-(1 - w(t))*sin(w(t)) + Derivative(w(t), t),0) 
ics = {} 
dsolve(ode,func=w(t),ics=ics)
 
\[ \int \limits ^{w{\left (t \right )}} \frac {1}{\left (y - 1\right ) \sin {\left (y \right )}}\, dy = C_{1} - t \]