\(\int \frac {x}{(1+x)^2 (1+x^2)} \, dx\) [485]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 16 \[ \int \frac {x}{(1+x)^2 \left (1+x^2\right )} \, dx=\frac {1}{2 (1+x)}+\frac {\arctan (x)}{2} \]

[Out]

1/2/(1+x)+1/2*arctan(x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {815, 209} \[ \int \frac {x}{(1+x)^2 \left (1+x^2\right )} \, dx=\frac {\arctan (x)}{2}+\frac {1}{2 (x+1)} \]

[In]

Int[x/((1 + x)^2*(1 + x^2)),x]

[Out]

1/(2*(1 + x)) + ArcTan[x]/2

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 815

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
d + e*x)^m*((f + g*x)/(a + c*x^2)), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {1}{2 (1+x)^2}+\frac {1}{2 \left (1+x^2\right )}\right ) \, dx \\ & = \frac {1}{2 (1+x)}+\frac {1}{2} \int \frac {1}{1+x^2} \, dx \\ & = \frac {1}{2 (1+x)}+\frac {1}{2} \tan ^{-1}(x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.75 \[ \int \frac {x}{(1+x)^2 \left (1+x^2\right )} \, dx=\frac {1}{2} \left (\frac {1}{1+x}+\arctan (x)\right ) \]

[In]

Integrate[x/((1 + x)^2*(1 + x^2)),x]

[Out]

((1 + x)^(-1) + ArcTan[x])/2

Maple [A] (verified)

Time = 0.85 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.81

method result size
default \(\frac {1}{2 x +2}+\frac {\arctan \left (x \right )}{2}\) \(13\)
risch \(\frac {1}{2 x +2}+\frac {\arctan \left (x \right )}{2}\) \(13\)
parallelrisch \(-\frac {i \ln \left (x -i\right ) x -i \ln \left (x +i\right ) x +i \ln \left (x -i\right )-i \ln \left (x +i\right )-2}{4 \left (x +1\right )}\) \(44\)

[In]

int(x/(x+1)^2/(x^2+1),x,method=_RETURNVERBOSE)

[Out]

1/2/(x+1)+1/2*arctan(x)

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.94 \[ \int \frac {x}{(1+x)^2 \left (1+x^2\right )} \, dx=\frac {{\left (x + 1\right )} \arctan \left (x\right ) + 1}{2 \, {\left (x + 1\right )}} \]

[In]

integrate(x/(1+x)^2/(x^2+1),x, algorithm="fricas")

[Out]

1/2*((x + 1)*arctan(x) + 1)/(x + 1)

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.62 \[ \int \frac {x}{(1+x)^2 \left (1+x^2\right )} \, dx=\frac {\operatorname {atan}{\left (x \right )}}{2} + \frac {1}{2 x + 2} \]

[In]

integrate(x/(1+x)**2/(x**2+1),x)

[Out]

atan(x)/2 + 1/(2*x + 2)

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.75 \[ \int \frac {x}{(1+x)^2 \left (1+x^2\right )} \, dx=\frac {1}{2 \, {\left (x + 1\right )}} + \frac {1}{2} \, \arctan \left (x\right ) \]

[In]

integrate(x/(1+x)^2/(x^2+1),x, algorithm="maxima")

[Out]

1/2/(x + 1) + 1/2*arctan(x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 32 vs. \(2 (12) = 24\).

Time = 0.27 (sec) , antiderivative size = 32, normalized size of antiderivative = 2.00 \[ \int \frac {x}{(1+x)^2 \left (1+x^2\right )} \, dx=-\frac {1}{8} \, \pi - \frac {1}{2} \, \pi \left \lfloor -\frac {\pi - 4 \, \arctan \left (x\right )}{4 \, \pi } + \frac {1}{2} \right \rfloor + \frac {1}{2 \, {\left (x + 1\right )}} + \frac {1}{2} \, \arctan \left (x\right ) \]

[In]

integrate(x/(1+x)^2/(x^2+1),x, algorithm="giac")

[Out]

-1/8*pi - 1/2*pi*floor(-1/4*(pi - 4*arctan(x))/pi + 1/2) + 1/2/(x + 1) + 1/2*arctan(x)

Mupad [B] (verification not implemented)

Time = 9.02 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.75 \[ \int \frac {x}{(1+x)^2 \left (1+x^2\right )} \, dx=\frac {\mathrm {atan}\left (x\right )}{2}+\frac {1}{2\,\left (x+1\right )} \]

[In]

int(x/((x^2 + 1)*(x + 1)^2),x)

[Out]

atan(x)/2 + 1/(2*(x + 1))