35.8.18 problem 18

Internal problem ID [6225]
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 : Wednesday, March 05, 2025 at 12:25:55 AM
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.020 (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.746 (sec). Leaf size: 26
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=y(x) e^{-\sin (y(x))}+c_1 e^{-\sin (y(x))},y(x)\right ] \]
Sympy. Time used: 2.260 (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 \]