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*Log[1 + 4*x]

________________________________________________________________________________________

Rubi [A]  time = 0.0347155, antiderivative size = 13, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.08, 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 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]

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

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.0086843, size = 13, normalized size = 1. \[ 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]

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 14, normalized size = 1.1 \begin{align*} -\arctan \left ( x \right ) +2\,\ln \left ( 1+4\,x \right ) \end{align*}

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.67753, size = 18, normalized size = 1.38 \begin{align*} -\arctan \left (x\right ) + 2 \, \log \left (4 \, x + 1\right ) \end{align*}

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 = 1.78125, size = 39, normalized size = 3. \begin{align*} -\arctan \left (x\right ) + 2 \, \log \left (4 \, x + 1\right ) \end{align*}

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.116184, size = 10, normalized size = 0.77 \begin{align*} 2 \log{\left (x + \frac{1}{4} \right )} - \operatorname{atan}{\left (x \right )} \end{align*}

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 = 1.11811, size = 19, normalized size = 1.46 \begin{align*} -\arctan \left (x\right ) + 2 \, \log \left ({\left | 4 \, x + 1 \right |}\right ) \end{align*}

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