15.4.7 problem 7

Internal problem ID [2920]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 8, page 34
Problem number : 7
Date solved : Sunday, March 30, 2025 at 12:55:30 AM
CAS classification : [_exact]

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

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