4.7.5 \(\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
\[ \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.568341 (sec), leaf count = 39

\[\left \{\left \{y(x)\to \tan ^{-1}\left (\frac {x^4+2 x^2-6 c_1 \sqrt {x^2+1}+1}{3 x^2+3}\right )\right \}\right \}\]

Maple
cpu = 0.956 (sec), leaf count = 191

\[\left [y \left (x \right ) = \frac {\arctan \left (\frac {6 \sqrt {x^{2}+1}\, x^{4}+12 \sqrt {x^{2}+1}\, x^{2}+18 x^{2} \textit {\_C1} +6 \sqrt {x^{2}+1}+18 \textit {\_C1}}{\sqrt {x^{2}+1}\, \left (x^{6}+6 \sqrt {x^{2}+1}\, \textit {\_C1} \,x^{2}+3 x^{4}+6 \sqrt {x^{2}+1}\, \textit {\_C1} +9 \textit {\_C1}^{2}+12 x^{2}+10\right )}, -\frac {x^{6}+6 \sqrt {x^{2}+1}\, \textit {\_C1} \,x^{2}+3 x^{4}+6 \sqrt {x^{2}+1}\, \textit {\_C1} +9 \textit {\_C1}^{2}-6 x^{2}-8}{x^{6}+6 \sqrt {x^{2}+1}\, \textit {\_C1} \,x^{2}+3 x^{4}+6 \sqrt {x^{2}+1}\, \textit {\_C1} +9 \textit {\_C1}^{2}+12 x^{2}+10}\right )}{2}\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))

Maple raw output

[y(x) = 1/2*arctan(6*((x^2+1)^(1/2)*x^4+2*(x^2+1)^(1/2)*x^2+3*x^2*_C1+(x^2+1)^(1
/2)+3*_C1)/(x^2+1)^(1/2)/(x^6+6*(x^2+1)^(1/2)*_C1*x^2+3*x^4+6*(x^2+1)^(1/2)*_C1+
9*_C1^2+12*x^2+10),-(x^6+6*(x^2+1)^(1/2)*_C1*x^2+3*x^4+6*(x^2+1)^(1/2)*_C1+9*_C1
^2-6*x^2-8)/(x^6+6*(x^2+1)^(1/2)*_C1*x^2+3*x^4+6*(x^2+1)^(1/2)*_C1+9*_C1^2+12*x^
2+10))]