72.5.15 problem 4 and 16(ii)

Internal problem ID [14630]
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(ii)
Date solved : Monday, March 31, 2025 at 12:44:51 PM
CAS classification : [_quadrature]

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

With initial conditions

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

Maple. Time used: 0.207 (sec). Leaf size: 20
ode:=diff(w(t),t) = w(t)*cos(w(t)); 
ic:=w(3) = 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 -3\right ) \]
Mathematica
ode=D[w[t],t]==w[t]*Cos[ w[t]]; 
ic={w[3]==1}; 
DSolve[{ode,ic},w[t],t,IncludeSingularSolutions->True]
 

{}

Sympy. Time used: 0.378 (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(3): 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 - 3 \]