4.5.20 problem 27

Internal problem ID [1212]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.6. Page 100
Problem number : 27
Date solved : Tuesday, September 30, 2025 at 04:29:36 AM
CAS classification : [[_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

\begin{align*} 1+\left (-\sin \left (y\right )+\frac {x}{y}\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.071 (sec). Leaf size: 25
ode:=1+(-sin(y(x))+x/y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ x +\frac {-\sin \left (y\right )+\cos \left (y\right ) y-c_1}{y} = 0 \]
Mathematica. Time used: 0.094 (sec). Leaf size: 29
ode=1+(-Sin[y[x]]+x/y[x])*D[y[x],x] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=\frac {\sin (y(x))-y(x) \cos (y(x))}{y(x)}+\frac {c_1}{y(x)},y(x)\right ] \]
Sympy. Time used: 4.865 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x/y(x) - sin(y(x)))*Derivative(y(x), x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + x y{\left (x \right )} + y{\left (x \right )} \cos {\left (y{\left (x \right )} \right )} - \sin {\left (y{\left (x \right )} \right )} = 0 \]