12.3.2 problem 2

Internal problem ID [1579]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. separable equations. Section 2.2 Page 52
Problem number : 2
Date solved : Saturday, March 29, 2025 at 11:00:10 PM
CAS classification : [_separable]

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

Maple. Time used: 0.039 (sec). Leaf size: 12
ode:=sin(x)*sin(y(x))+cos(y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \arcsin \left (\frac {{\mathrm e}^{\cos \left (x \right )}}{c_1}\right ) \]
Mathematica. Time used: 27.86 (sec). Leaf size: 22
ode=Sin[x]*Sin[y[x]]+Cos[y[x]]*D[y[x],x]== 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \arcsin \left (e^{\cos (x)+\frac {c_1}{2}}\right ) \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.585 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(sin(x)*sin(y(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} e^{\cos {\left (x \right )}} \right )}, \ y{\left (x \right )} = \operatorname {asin}{\left (C_{1} e^{\cos {\left (x \right )}} \right )}\right ] \]