ODE No. 152

\[ \left (x^2+1\right ) y'(x)-x \left (x^2+1\right ) \cos ^2(y(x))+x \sin (y(x)) \cos (y(x))=0 \] Mathematica : cpu = 0.387859 (sec), leaf count = 40

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

\[\left \{\left \{y(x)\to \tan ^{-1}\left (\frac {x^4+2 x^2-6 c_1 \sqrt {x^2+1}+1}{3 \left (x^2+1\right )}\right )\right \}\right \}\] Maple : cpu = 0.904 (sec), leaf count = 159

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

\[y \left (x \right ) = \frac {\arctan \left (\frac {6 \sqrt {x^{2}+1}\, \left (x^{2} \sqrt {x^{2}+1}+\sqrt {x^{2}+1}+3 c_{1}\right )}{\left (6 x^{2} c_{1}+6 c_{1}\right ) \sqrt {x^{2}+1}+x^{6}+3 x^{4}+12 x^{2}+9 c_{1}^{2}+10}, \frac {\left (-6 x^{2} c_{1}-6 c_{1}\right ) \sqrt {x^{2}+1}-x^{6}-3 x^{4}+6 x^{2}-9 c_{1}^{2}+8}{\left (6 x^{2} c_{1}+6 c_{1}\right ) \sqrt {x^{2}+1}+x^{6}+3 x^{4}+12 x^{2}+9 c_{1}^{2}+10}\right )}{2}\]