73.5.27 problem 6.7 (o)

Internal problem ID [15067]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 6. Simplifying through simplifiction. Additional exercises. page 114
Problem number : 6.7 (o)
Date solved : Monday, March 31, 2025 at 01:20:56 PM
CAS classification : [`y=_G(x,y')`]

\begin{align*} \cos \left (y\right ) y^{\prime }&={\mathrm e}^{-x}-\sin \left (y\right ) \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 17
ode:=cos(y(x))*diff(y(x),x) = exp(-x)-sin(y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\arcsin \left (\left (-x +c_1 \right ) {\mathrm e}^{-x}\right ) \]
Mathematica. Time used: 11.765 (sec). Leaf size: 16
ode=Cos[y[x]]*D[y[x],x]==Exp[-x]-Sin[y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \arcsin \left (e^{-x} (x+c_1)\right ) \]
Sympy. Time used: 2.804 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(sin(y(x)) + cos(y(x))*Derivative(y(x), x) - exp(-x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \operatorname {asin}{\left (\left (C_{1} - x\right ) e^{- x} \right )} + \pi , \ y{\left (x \right )} = - \operatorname {asin}{\left (\left (C_{1} - x\right ) e^{- x} \right )}\right ] \]