4.7.6 \(\left (x^2+1\right ) y'(x)=x^2-y(x) \cot ^{-1}(x)+1\)

ODE
\[ \left (x^2+1\right ) y'(x)=x^2-y(x) \cot ^{-1}(x)+1 \] ODE Classification

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 2.19019 (sec), leaf count = 37

\[\left \{\left \{y(x)\to e^{\frac {1}{2} \cot ^{-1}(x)^2} \left (\int _1^xe^{-\frac {1}{2} \cot ^{-1}(K[1])^2}dK[1]+c_1\right )\right \}\right \}\]

Maple
cpu = 0.082 (sec), leaf count = 29

\[\left [y \left (x \right ) = \left (\int {\mathrm e}^{-\frac {\left (-\pi +2 \arctan \left (x \right )\right )^{2}}{8}}d x +\textit {\_C1} \right ) {\mathrm e}^{\frac {\mathrm {arccot}\left (x \right )^{2}}{2}}\right ]\] Mathematica raw input

DSolve[(1 + x^2)*y'[x] == 1 + x^2 - ArcCot[x]*y[x],y[x],x]

Mathematica raw output

{{y[x] -> E^(ArcCot[x]^2/2)*(C[1] + Inactive[Integrate][E^(-1/2*ArcCot[K[1]]^2),
 {K[1], 1, x}])}}

Maple raw input

dsolve((x^2+1)*diff(y(x),x) = 1+x^2-y(x)*arccot(x), y(x))

Maple raw output

[y(x) = (Int(exp(-1/8*(-Pi+2*arctan(x))^2),x)+_C1)*exp(1/2*arccot(x)^2)]