ODE
\[ \left (x^2+1\right ) y'(x)+x \sin (y(x)) \cos (y(x))=x \left (x^2+1\right ) \cos ^2(y(x)) \] ODE Classification
[`y=_G(x,y')`]
Book solution method
Change of Variable, new dependent variable
Mathematica ✓
cpu = 0.23079 (sec), leaf count = 39
\[\left \{\left \{y(x)\to \tan ^{-1}\left (\frac {-6 c_1 \sqrt {x^2+1}+x^4+2 x^2+1}{3 x^2+3}\right )\right \}\right \}\]
Maple ✓
cpu = 0.784 (sec), leaf count = 31
\[ \left \{ {\it \_C1}+{\frac {1}{3} \left ( {x}^{2}+1 \right ) ^{{\frac {3}{2}}}}-{\frac {\sin \left ( y \left ( x \right ) \right ) }{\cos \left ( y \left ( x \right ) \right ) }\sqrt {{x}^{2}+1}}=0 \right \} \] Mathematica raw input
DSolve[x*Cos[y[x]]*Sin[y[x]] + (1 + x^2)*y'[x] == x*(1 + x^2)*Cos[y[x]]^2,y[x],x]
Mathematica raw output
{{y[x] -> ArcTan[(1 + 2*x^2 + x^4 - 6*Sqrt[1 + x^2]*C[1])/(3 + 3*x^2)]}}
Maple raw input
dsolve((x^2+1)*diff(y(x),x)+x*sin(y(x))*cos(y(x)) = x*(x^2+1)*cos(y(x))^2, y(x),'implicit')
Maple raw output
_C1+1/3*(x^2+1)^(3/2)-1/cos(y(x))*sin(y(x))*(x^2+1)^(1/2) = 0