4.3.15 \(x \left (\sin (2 y(x))-x^2 \cos ^2(y(x))\right )+y'(x)=0\)

ODE
\[ x \left (\sin (2 y(x))-x^2 \cos ^2(y(x))\right )+y'(x)=0 \] ODE Classification

[`y=_G(x,y')`]

Book solution method
Change of Variable, new dependent variable

Mathematica
cpu = 0.260147 (sec), leaf count = 55

\[\left \{\left \{y(x)\to \tan ^{-1}\left (\frac {1}{2} \left (-8 c_1 e^{-x^2}+x^2-1\right )\right )\right \},\left \{y(x)\to -\tan ^{-1}\left (4 c_1 e^{-x^2}-\frac {x^2}{2}+\frac {1}{2}\right )\right \}\right \}\]

Maple
cpu = 1.17 (sec), leaf count = 23

\[ \left \{ \ln \left (-{x}^{2}+2\,\tan \left (y \relax (x ) \right ) +1 \right ) +{x}^{2}-{\it \_C1}=0 \right \} \] Mathematica raw input

DSolve[x*(-(x^2*Cos[y[x]]^2) + Sin[2*y[x]]) + y'[x] == 0,y[x],x]

Mathematica raw output

{{y[x] -> ArcTan[(-1 + x^2 - (8*C[1])/E^x^2)/2]}, {y[x] -> -ArcTan[1/2 - x^2/2 +
 (4*C[1])/E^x^2]}}

Maple raw input

dsolve(diff(y(x),x)+x*(sin(2*y(x))-x^2*cos(y(x))^2) = 0, y(x),'implicit')

Maple raw output

ln(-x^2+2*tan(y(x))+1)+x^2-_C1 = 0