89.1.2 problem 2

Internal problem ID [24237]
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 : 2
Date solved : Thursday, October 02, 2025 at 10:01:10 PM
CAS classification : [_separable]

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