23.1.138 problem 142

Internal problem ID [4745]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 142
Date solved : Tuesday, September 30, 2025 at 08:28:19 AM
CAS classification : [`y=_G(x,y')`]

\begin{align*} 2 y^{\prime }&=2 \sin \left (y\right )^{2} \tan \left (y\right )-x \sin \left (2 y\right ) \end{align*}
Maple
ode:=2*diff(y(x),x) = 2*sin(y(x))^2*tan(y(x))-x*sin(2*y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica. Time used: 7.982 (sec). Leaf size: 66
ode=2*D[y[x],x]==2*Sin[y[x]]^2*Tan[y[x]]- x*Sin[2*y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\cot ^{-1}\left (\sqrt {e^{x^2} \left (-\sqrt {\pi } \text {erf}(x)+4 c_1\right )}\right )\\ y(x)&\to \cot ^{-1}\left (\sqrt {e^{x^2} \left (-\sqrt {\pi } \text {erf}(x)+4 c_1\right )}\right )\\ y(x)&\to 0 \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*sin(2*y(x)) - 2*sin(y(x))**2*tan(y(x)) + 2*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE x*sin(2*y(x))/2 - sin(y(x))**2*tan(y(x)) + Derivative(y(x), x) cannot be solved by the factorable group method