ODE
\[ \left (x^2+1\right ) y'(x)=\tan (x)-2 x y(x) \] ODE Classification
[_linear]
Book solution method
Linear ODE
Mathematica ✓
cpu = 0.0228375 (sec), leaf count = 21
\[\left \{\left \{y(x)\to \frac {c_1-\log (\cos (x))}{x^2+1}\right \}\right \}\]
Maple ✓
cpu = 0.008 (sec), leaf count = 19
\[ \left \{ y \left ( x \right ) ={\frac {-\ln \left ( \cos \left ( x \right ) \right ) +{\it \_C1}}{{x}^{2}+1}} \right \} \] Mathematica raw input
DSolve[(1 + x^2)*y'[x] == Tan[x] - 2*x*y[x],y[x],x]
Mathematica raw output
{{y[x] -> (C[1] - Log[Cos[x]])/(1 + x^2)}}
Maple raw input
dsolve((x^2+1)*diff(y(x),x) = tan(x)-2*x*y(x), y(x),'implicit')
Maple raw output
y(x) = (-ln(cos(x))+_C1)/(x^2+1)