3.485 \(\int \frac{x}{(1+x)^2 (1+x^2)} \, dx\)

Optimal. Leaf size=16 \[ \frac{1}{2 (x+1)}+\frac{1}{2} \tan ^{-1}(x) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0117033, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {801, 203} \[ \frac{1}{2 (x+1)}+\frac{1}{2} \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 801

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]

Rule 203

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

Rubi steps

\begin{align*} \int \frac{x}{(1+x)^2 \left (1+x^2\right )} \, dx &=\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]  time = 0.0064635, size = 12, normalized size = 0.75 \[ \frac{1}{2} \left (\frac{1}{x+1}+\tan ^{-1}(x)\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 13, normalized size = 0.8 \begin{align*}{\frac{1}{2+2\,x}}+{\frac{\arctan \left ( x \right ) }{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.69299, size = 16, normalized size = 1. \begin{align*} \frac{1}{2 \,{\left (x + 1\right )}} + \frac{1}{2} \, \arctan \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.2324, size = 50, normalized size = 3.12 \begin{align*} \frac{{\left (x + 1\right )} \arctan \left (x\right ) + 1}{2 \,{\left (x + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.102061, size = 10, normalized size = 0.62 \begin{align*} \frac{\operatorname{atan}{\left (x \right )}}{2} + \frac{1}{2 x + 2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.12361, size = 43, normalized size = 2.69 \begin{align*} -\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 ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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)