89.1.9 problem 9

Internal problem ID [24244]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 2. Equations of the first order and first degree. Exercises at page 21
Problem number : 9
Date solved : Thursday, October 02, 2025 at 10:01:27 PM
CAS classification : [_separable]

\begin{align*} 1&=b \left (\cos \left (y\right )+x \sin \left (y\right ) y^{\prime }\right ) \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 14
ode:=1 = b*(cos(y(x))+x*sin(y(x))*diff(y(x),x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \arccos \left (\frac {c_1 x +1}{b}\right ) \]
Mathematica. Time used: 26.938 (sec). Leaf size: 61
ode=1==b*(Cos[y[x]]+x*Sin[y[x]]*D[y[x],x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\arccos \left (\frac {1+x e^{-b c_1}}{b}\right )\\ y(x)&\to \arccos \left (\frac {1+x e^{-b c_1}}{b}\right )\\ y(x)&\to -\arccos \left (\frac {1}{b}\right )\\ y(x)&\to \arccos \left (\frac {1}{b}\right ) \end{align*}
Sympy. Time used: 0.804 (sec). Leaf size: 61
from sympy import * 
x = symbols("x") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-b*(x*sin(y(x))*Derivative(y(x), x) + cos(y(x))) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \begin {cases} - \operatorname {acos}{\left (C_{1} - \frac {\log {\left (x \right )}}{b} \right )} + 2 \pi & \text {for}\: b = 0 \\\text {NaN} & \text {otherwise} \end {cases}, \ y{\left (x \right )} = \begin {cases} - \operatorname {acos}{\left (x e^{C_{1} b} + \frac {1}{b} \right )} + 2 \pi & \text {for}\: b \neq 0 \\\text {NaN} & \text {otherwise} \end {cases}, \ y{\left (x \right )} = \begin {cases} \operatorname {acos}{\left (C_{1} - \frac {\log {\left (x \right )}}{b} \right )} & \text {for}\: b = 0 \\\text {NaN} & \text {otherwise} \end {cases}, \ y{\left (x \right )} = \begin {cases} \operatorname {acos}{\left (x e^{C_{1} b} + \frac {1}{b} \right )} & \text {for}\: b \neq 0 \\\text {NaN} & \text {otherwise} \end {cases}\right ] \]