86.2.5 problem 5

Internal problem ID [23079]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 3. Some standard types of differential equations. Exercise 3c at page 50
Problem number : 5
Date solved : Thursday, October 02, 2025 at 09:19:09 PM
CAS classification : [_separable]

\begin{align*} x \cos \left (y\right ) y^{\prime }+\sin \left (y\right )&=5 \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 18
ode:=x*cos(y(x))*diff(y(x),x)+sin(y(x)) = 5; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \arcsin \left (\frac {5 c_1 x +1}{x c_1}\right ) \]
Mathematica. Time used: 39.583 (sec). Leaf size: 23
ode=x*Cos[y[x]]*D[y[x],x]+Sin[y[x]]==5; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \arcsin \left (5-\frac {e^{c_1}}{x}\right )\\ y(x)&\to \arcsin (5) \end{align*}
Sympy. Time used: 0.283 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*cos(y(x))*Derivative(y(x), x) + sin(y(x)) - 5,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \pi - \operatorname {asin}{\left (\frac {C_{1}}{x} + 5 \right )}, \ y{\left (x \right )} = \operatorname {asin}{\left (\frac {C_{1}}{x} + 5 \right )}\right ] \]