35.4.6 problem 6

Internal problem ID [6124]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 4. OTHER METHODS FOR FIRST-ORDER EQUATIONS. page 406
Problem number : 6
Date solved : Sunday, March 30, 2025 at 10:39:37 AM
CAS classification : unknown

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

Maple. Time used: 0.173 (sec). Leaf size: 35
ode:=cos(x)*cos(y(x))+sin(x)^2-(sin(x)*sin(y(x))+cos(y(x))^2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ c_1 +x -y-\frac {\sin \left (2 x \right )}{2}+\sin \left (x +y\right )+\sin \left (x -y\right )-\frac {\sin \left (2 y\right )}{2} = 0 \]
Mathematica. Time used: 0.39 (sec). Leaf size: 43
ode=(Cos[x]*Cos[y[x]]+Sin[x]^2)-(Sin[x]*Sin[y[x]]+Cos[y[x]]^2)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [2 \left (\frac {y(x)}{2}+\frac {1}{4} \sin (2 y(x))\right )-2 \sin (x) \cos (y(x))-x+\frac {1}{2} \sin (2 x)=c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-sin(x)*sin(y(x)) - cos(y(x))**2)*Derivative(y(x), x) + sin(x)**2 + cos(x)*cos(y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out