29.5.22 problem 139

Internal problem ID [4739]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 5
Problem number : 139
Date solved : Tuesday, March 04, 2025 at 07:12:23 PM
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.875 (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