72.5.17 problem 4 and 16(iv)

Internal problem ID [14632]
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 : 4 and 16(iv)
Date solved : Monday, March 31, 2025 at 12:44:59 PM
CAS classification : [_quadrature]

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

With initial conditions

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

Maple. Time used: 0.201 (sec). Leaf size: 19
ode:=diff(w(t),t) = w(t)*cos(w(t)); 
ic:=w(0) = -1; 
dsolve([ode,ic],w(t), singsol=all);
 
\[ w = \operatorname {RootOf}\left (\int _{\textit {\_Z}}^{-1}\frac {\sec \left (\textit {\_a} \right )}{\textit {\_a}}d \textit {\_a} +t \right ) \]
Mathematica
ode=D[w[t],t]==w[t]*Cos[ w[t]]; 
ic={w[0]==-1}; 
DSolve[{ode,ic},w[t],t,IncludeSingularSolutions->True]
 

{}

Sympy. Time used: 0.383 (sec). Leaf size: 20
from sympy import * 
t = symbols("t") 
w = Function("w") 
ode = Eq(-w(t)*cos(w(t)) + Derivative(w(t), t),0) 
ics = {w(0): -1} 
dsolve(ode,func=w(t),ics=ics)
 
\[ \int \limits ^{w{\left (t \right )}} \frac {1}{y \cos {\left (y \right )}}\, dy = t + \int \limits ^{-1} \frac {1}{y \cos {\left (y \right )}}\, dy \]