3.4.55 \(\int \frac {7-4 x+8 x^2}{(1+4 x) (1+x^2)} \, dx\) [355]

Optimal. Leaf size=13 \[ -\tan ^{-1}(x)+2 \log (1+4 x) \]

[Out]

-arctan(x)+2*ln(1+4*x)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {1643, 210} \begin {gather*} 2 \log (4 x+1)-\text {ArcTan}(x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(7 - 4*x + 8*x^2)/((1 + 4*x)*(1 + x^2)),x]

[Out]

-ArcTan[x] + 2*Log[1 + 4*x]

Rule 210

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

Rule 1643

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*
Pq*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin {align*} \int \frac {7-4 x+8 x^2}{(1+4 x) \left (1+x^2\right )} \, dx &=\int \left (\frac {8}{1+4 x}+\frac {1}{-1-x^2}\right ) \, dx\\ &=2 \log (1+4 x)+\int \frac {1}{-1-x^2} \, dx\\ &=-\tan ^{-1}(x)+2 \log (1+4 x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 13, normalized size = 1.00 \begin {gather*} -\tan ^{-1}(x)+2 \log (1+4 x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(7 - 4*x + 8*x^2)/((1 + 4*x)*(1 + x^2)),x]

[Out]

-ArcTan[x] + 2*Log[1 + 4*x]

________________________________________________________________________________________

Maple [A]
time = 0.20, size = 14, normalized size = 1.08

method result size
default \(-\arctan \left (x \right )+2 \ln \left (1+4 x \right )\) \(14\)
risch \(-\arctan \left (x \right )+2 \ln \left (1+4 x \right )\) \(14\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((8*x^2-4*x+7)/(1+4*x)/(x^2+1),x,method=_RETURNVERBOSE)

[Out]

-arctan(x)+2*ln(1+4*x)

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 13, normalized size = 1.00 \begin {gather*} -\arctan \left (x\right ) + 2 \, \log \left (4 \, x + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-arctan(x) + 2*log(4*x + 1)

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 13, normalized size = 1.00 \begin {gather*} -\arctan \left (x\right ) + 2 \, \log \left (4 \, x + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-arctan(x) + 2*log(4*x + 1)

________________________________________________________________________________________

Sympy [A]
time = 0.04, size = 10, normalized size = 0.77 \begin {gather*} 2 \log {\left (x + \frac {1}{4} \right )} - \operatorname {atan}{\left (x \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((8*x**2-4*x+7)/(1+4*x)/(x**2+1),x)

[Out]

2*log(x + 1/4) - atan(x)

________________________________________________________________________________________

Giac [A]
time = 3.64, size = 14, normalized size = 1.08 \begin {gather*} -\arctan \left (x\right ) + 2 \, \log \left ({\left | 4 \, x + 1 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-arctan(x) + 2*log(abs(4*x + 1))

________________________________________________________________________________________

Mupad [B]
time = 0.06, size = 19, normalized size = 1.46 \begin {gather*} \mathrm {atan}\left (\frac {4\,x+1}{x-4}\right )+2\,\ln \left (x+\frac {1}{4}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((8*x^2 - 4*x + 7)/((4*x + 1)*(x^2 + 1)),x)

[Out]

atan((4*x + 1)/(x - 4)) + 2*log(x + 1/4)

________________________________________________________________________________________