29.8.18 problem 18

Internal problem ID [7360]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 13. Miscellaneous problems. page 466
Problem number : 18
Date solved : Tuesday, September 30, 2025 at 04:29:39 PM
CAS classification : [[_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

\begin{align*} \left (x \cos \left (y\right )-{\mathrm e}^{-\sin \left (y\right )}\right ) y^{\prime }+1&=0 \end{align*}
Maple. Time used: 0.016 (sec). Leaf size: 20
ode:=(x*cos(y(x))-exp(-sin(y(x))))*diff(y(x),x)+1 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \left (-y-c_1 \right ) {\mathrm e}^{-\sin \left (y\right )}+x = 0 \]
Mathematica. Time used: 0.505 (sec). Leaf size: 71
ode=(x*Cos[y[x]] - Exp[-Sin[y[x]]])*D[y[x],x]+1==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=\exp \left (\int _1^{y(x)}-\cos (K[1])dK[1]\right ) \int _1^{y(x)}\exp \left (-\sin (K[2])-\int _1^{K[2]}-\cos (K[1])dK[1]\right )dK[2]+c_1 \exp \left (\int _1^{y(x)}-\cos (K[1])dK[1]\right ),y(x)\right ] \]
Sympy. Time used: 1.523 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x*cos(y(x)) - exp(-sin(y(x))))*Derivative(y(x), x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + x e^{\sin {\left (y{\left (x \right )} \right )}} - y{\left (x \right )} = 0 \]