3.355 \(\int \frac {7-4 x+8 x^2}{(1+4 x) (1+x^2)} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, 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 = {1629, 204} \[ 2 \log (4 x+1)-\tan ^{-1}(x) \]

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 204

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

Rule 1629

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 \[ 2 \log (4 x+1)-\tan ^{-1}(x) \]

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]

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 13, normalized size = 1.00 \[ -\arctan \relax (x) + 2 \, \log \left (4 \, x + 1\right ) \]

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)

________________________________________________________________________________________

giac [A]  time = 0.34, size = 14, normalized size = 1.08 \[ -\arctan \relax (x) + 2 \, \log \left ({\left | 4 \, x + 1 \right |}\right ) \]

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

________________________________________________________________________________________

maple [A]  time = 0.01, size = 14, normalized size = 1.08 \[ -\arctan \relax (x )+2 \ln \left (4 x +1\right ) \]

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)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 1.41, size = 13, normalized size = 1.00 \[ -\arctan \relax (x) + 2 \, \log \left (4 \, x + 1\right ) \]

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)

________________________________________________________________________________________

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

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)

________________________________________________________________________________________

sympy [A]  time = 0.13, size = 10, normalized size = 0.77 \[ 2 \log {\left (x + \frac {1}{4} \right )} - \operatorname {atan}{\relax (x )} \]

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)

________________________________________________________________________________________