3.447 \(\int \frac {2 x}{(-1+x) (5+x^2)} \, dx\)

Optimal. Leaf size=38 \[ -\frac {1}{6} \log \left (x^2+5\right )+\frac {1}{3} \log (1-x)+\frac {1}{3} \sqrt {5} \tan ^{-1}\left (\frac {x}{\sqrt {5}}\right ) \]

[Out]

1/3*ln(1-x)-1/6*ln(x^2+5)+1/3*arctan(1/5*x*5^(1/2))*5^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {12, 801, 635, 203, 260} \[ -\frac {1}{6} \log \left (x^2+5\right )+\frac {1}{3} \log (1-x)+\frac {1}{3} \sqrt {5} \tan ^{-1}\left (\frac {x}{\sqrt {5}}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(Sqrt[5]*ArcTan[x/Sqrt[5]])/3 + Log[1 - x]/3 - Log[5 + x^2]/6

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

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

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

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]

Rubi steps

\begin {align*} \int \frac {2 x}{(-1+x) \left (5+x^2\right )} \, dx &=2 \int \frac {x}{(-1+x) \left (5+x^2\right )} \, dx\\ &=2 \int \left (\frac {1}{6 (-1+x)}+\frac {5-x}{6 \left (5+x^2\right )}\right ) \, dx\\ &=\frac {1}{3} \log (1-x)+\frac {1}{3} \int \frac {5-x}{5+x^2} \, dx\\ &=\frac {1}{3} \log (1-x)-\frac {1}{3} \int \frac {x}{5+x^2} \, dx+\frac {5}{3} \int \frac {1}{5+x^2} \, dx\\ &=\frac {1}{3} \sqrt {5} \tan ^{-1}\left (\frac {x}{\sqrt {5}}\right )+\frac {1}{3} \log (1-x)-\frac {1}{6} \log \left (5+x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 40, normalized size = 1.05 \[ 2 \left (-\frac {1}{12} \log \left (x^2+5\right )+\frac {1}{6} \log (1-x)+\frac {1}{6} \sqrt {5} \tan ^{-1}\left (\frac {x}{\sqrt {5}}\right )\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

2*((Sqrt[5]*ArcTan[x/Sqrt[5]])/6 + Log[1 - x]/6 - Log[5 + x^2]/12)

________________________________________________________________________________________

fricas [A]  time = 0.66, size = 27, normalized size = 0.71 \[ \frac {1}{3} \, \sqrt {5} \arctan \left (\frac {1}{5} \, \sqrt {5} x\right ) - \frac {1}{6} \, \log \left (x^{2} + 5\right ) + \frac {1}{3} \, \log \left (x - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*sqrt(5)*arctan(1/5*sqrt(5)*x) - 1/6*log(x^2 + 5) + 1/3*log(x - 1)

________________________________________________________________________________________

giac [A]  time = 0.39, size = 28, normalized size = 0.74 \[ \frac {1}{3} \, \sqrt {5} \arctan \left (\frac {1}{5} \, \sqrt {5} x\right ) - \frac {1}{6} \, \log \left (x^{2} + 5\right ) + \frac {1}{3} \, \log \left ({\left | x - 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*sqrt(5)*arctan(1/5*sqrt(5)*x) - 1/6*log(x^2 + 5) + 1/3*log(abs(x - 1))

________________________________________________________________________________________

maple [A]  time = 0.00, size = 28, normalized size = 0.74 \[ \frac {\sqrt {5}\, \arctan \left (\frac {\sqrt {5}\, x}{5}\right )}{3}+\frac {\ln \left (x -1\right )}{3}-\frac {\ln \left (x^{2}+5\right )}{6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*ln(x-1)-1/6*ln(x^2+5)+1/3*5^(1/2)*arctan(1/5*5^(1/2)*x)

________________________________________________________________________________________

maxima [A]  time = 1.97, size = 27, normalized size = 0.71 \[ \frac {1}{3} \, \sqrt {5} \arctan \left (\frac {1}{5} \, \sqrt {5} x\right ) - \frac {1}{6} \, \log \left (x^{2} + 5\right ) + \frac {1}{3} \, \log \left (x - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*sqrt(5)*arctan(1/5*sqrt(5)*x) - 1/6*log(x^2 + 5) + 1/3*log(x - 1)

________________________________________________________________________________________

mupad [B]  time = 0.16, size = 44, normalized size = 1.16 \[ \frac {\ln \left (x-1\right )}{3}-\ln \left (x-\sqrt {5}\,1{}\mathrm {i}\right )\,\left (\frac {1}{6}+\frac {\sqrt {5}\,1{}\mathrm {i}}{6}\right )+\ln \left (x+\sqrt {5}\,1{}\mathrm {i}\right )\,\left (-\frac {1}{6}+\frac {\sqrt {5}\,1{}\mathrm {i}}{6}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x - 1)/3 - log(x - 5^(1/2)*1i)*((5^(1/2)*1i)/6 + 1/6) + log(x + 5^(1/2)*1i)*((5^(1/2)*1i)/6 - 1/6)

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 31, normalized size = 0.82 \[ \frac {\log {\left (x - 1 \right )}}{3} - \frac {\log {\left (x^{2} + 5 \right )}}{6} + \frac {\sqrt {5} \operatorname {atan}{\left (\frac {\sqrt {5} x}{5} \right )}}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x - 1)/3 - log(x**2 + 5)/6 + sqrt(5)*atan(sqrt(5)*x/5)/3

________________________________________________________________________________________