4.6.24 problem 24

Internal problem ID [1241]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Miscellaneous problems, end of chapter 2. Page 133
Problem number : 24
Date solved : Tuesday, September 30, 2025 at 04:31:18 AM
CAS classification : [_separable]

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