81.3.20 problem 20

Internal problem ID [18567]
Book : A short course on differential equations. By Donald Francis Campbell. Maxmillan company. London. 1907
Section : Chapter III. Ordinary differential equations of the first order and first degree. Exercises at page 33
Problem number : 20
Date solved : Monday, March 31, 2025 at 05:43:07 PM
CAS classification : [_separable]

\begin{align*} \sin \left (x \right ) \cos \left (y\right )+\cos \left (x \right ) \sin \left (y\right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.045 (sec). Leaf size: 9
ode:=sin(x)*cos(y(x))+cos(x)*sin(y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \arccos \left (c_1 \sec \left (x \right )\right ) \]
Mathematica. Time used: 5.87 (sec). Leaf size: 47
ode=(Sin[x]*Cos[y[x]]) +(Cos[x]*Sin[y[x]])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\arccos \left (\frac {1}{2} c_1 \sec (x)\right ) \\ y(x)\to \arccos \left (\frac {1}{2} c_1 \sec (x)\right ) \\ y(x)\to -\frac {\pi }{2} \\ y(x)\to \frac {\pi }{2} \\ \end{align*}
Sympy. Time used: 0.571 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(sin(x)*cos(y(x)) + sin(y(x))*cos(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \operatorname {acos}{\left (\frac {C_{1}}{\cos {\left (x \right )}} \right )} + 2 \pi , \ y{\left (x \right )} = \operatorname {acos}{\left (\frac {C_{1}}{\cos {\left (x \right )}} \right )}\right ] \]