6.7.16 problem 16

Internal problem ID [1726]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Exact equations. Integrating factors. Section 2.6 Page 91
Problem number : 16
Date solved : Tuesday, September 30, 2025 at 05:18:26 AM
CAS classification : [_separable]

\begin{align*} y \sin \left (y\right )+x \left (\sin \left (y\right )-y \cos \left (y\right )\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.060 (sec). Leaf size: 16
ode:=y(x)*sin(y(x))+x*(sin(y(x))-y(x)*cos(y(x)))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \ln \left (x \right )-\ln \left (\sin \left (y\right )\right )+\ln \left (y\right )+c_1 = 0 \]
Mathematica. Time used: 0.365 (sec). Leaf size: 27
ode=(y[x]*Sin[y[x]])+(x*(Sin[y[x]]-y[x]*Cos[y[x]]))*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \text {InverseFunction}[\log (\sin (\text {$\#$1}))-\log (\text {$\#$1})\&][\log (x)+c_1]\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 1.782 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(-y(x)*cos(y(x)) + sin(y(x)))*Derivative(y(x), x) + y(x)*sin(y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - \log {\left (x \right )} - \log {\left (y{\left (x \right )} \right )} + \log {\left (\sin {\left (y{\left (x \right )} \right )} \right )} = C_{1} \]