72.5.12 problem 3 and 15(iv)

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

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

With initial conditions

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

Maple. Time used: 0.082 (sec). Leaf size: 11
ode:=diff(y(t),t) = cos(y(t)); 
ic:=y(0) = Pi; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = \arctan \left (\tanh \left (t \right ), -\operatorname {sech}\left (t \right )\right ) \]
Mathematica
ode=D[y[t],t]==Cos[ y[t]]; 
ic={y[0]==Pi}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 

{}

Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-cos(y(t)) + Derivative(y(t), t),0) 
ics = {y(0): pi} 
dsolve(ode,func=y(t),ics=ics)
 
Timed Out