72.5.14 problem 4 and 16(i)

Internal problem ID [14621]
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(i)
Date solved : Thursday, March 13, 2025 at 04:10:23 AM
CAS classification : [_quadrature]

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

With initial conditions

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

Maple. Time used: 0.003 (sec). Leaf size: 5
ode:=diff(w(t),t) = w(t)*cos(w(t)); 
ic:=w(0) = 0; 
dsolve([ode,ic],w(t), singsol=all);
 
\[ w = 0 \]
Mathematica. Time used: 0.001 (sec). Leaf size: 6
ode=D[w[t],t]==w[t]*Cos[ w[t]]; 
ic={w[0]==0}; 
DSolve[{ode,ic},w[t],t,IncludeSingularSolutions->True]
 
\[ w(t)\to 0 \]
Sympy. Time used: 0.393 (sec). Leaf size: 19
from sympy import * 
t = symbols("t") 
w = Function("w") 
ode = Eq(-w(t)*cos(w(t)) + Derivative(w(t), t),0) 
ics = {w(0): 0} 
dsolve(ode,func=w(t),ics=ics)
 
\[ \int \limits ^{w{\left (t \right )}} \frac {1}{y \cos {\left (y \right )}}\, dy = t + \int \limits ^{0} \frac {1}{y \cos {\left (y \right )}}\, dy \]