12.7.14 problem 14

Internal problem ID [1724]
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 : 14
Date solved : Tuesday, March 04, 2025 at 01:39:57 PM
CAS classification : [[_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

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

Maple. Time used: 0.015 (sec). Leaf size: 19
ode:=cos(x)*cos(y(x))+(sin(x)*cos(y(x))-sin(x)*sin(y(x))+y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \left (\sin \left (x \right ) \cos \left (y\right )+y-1\right ) {\mathrm e}^{y}+c_1 = 0 \]
Mathematica. Time used: 0.228 (sec). Leaf size: 28
ode=(Cos[x]*Cos[y[x]])+(Sin[x]*Cos[y[x]]-Sin[x]*Sin[y[x]]+y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [-2 e^{y(x)} (y(x)-1)-2 e^{y(x)} \sin (x) \cos (y(x))=c_1,y(x)\right ] \]
Sympy. Time used: 10.167 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((y(x) - sin(x)*sin(y(x)) + sin(x)*cos(y(x)))*Derivative(y(x), x) + cos(x)*cos(y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} - \left (1 - y{\left (x \right )}\right ) e^{y{\left (x \right )}} + e^{y{\left (x \right )}} \sin {\left (x \right )} \cos {\left (y{\left (x \right )} \right )} = 0 \]