3.4.13 \(\int \frac {1+x^2+x^4}{(1+x^2) (4+x^2)^2} \, dx\) [313]

Optimal. Leaf size=29 \[ -\frac {13 x}{24 \left (4+x^2\right )}+\frac {25}{144} \tan ^{-1}\left (\frac {x}{2}\right )+\frac {1}{9} \tan ^{-1}(x) \]

[Out]

-13/24*x/(x^2+4)+25/144*arctan(1/2*x)+1/9*arctan(x)

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {6857, 209, 205} \begin {gather*} \frac {25}{144} \text {ArcTan}\left (\frac {x}{2}\right )+\frac {\text {ArcTan}(x)}{9}-\frac {13 x}{24 \left (x^2+4\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-13*x)/(24*(4 + x^2)) + (25*ArcTan[x/2])/144 + ArcTan[x]/9

Rule 205

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^n)^(p + 1)/(a*n*(p + 1))), x] + Dist[(n*(p
 + 1) + 1)/(a*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && LtQ[p, -1] && (
IntegerQ[2*p] || (n == 2 && IntegerQ[4*p]) || (n == 2 && IntegerQ[3*p]) || Denominator[p + 1/n] < Denominator[
p])

Rule 209

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

Rule 6857

Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a + b*x^n), x]}, Int[v, x]
 /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {1+x^2+x^4}{\left (1+x^2\right ) \left (4+x^2\right )^2} \, dx &=\int \left (\frac {1}{9 \left (1+x^2\right )}-\frac {13}{3 \left (4+x^2\right )^2}+\frac {8}{9 \left (4+x^2\right )}\right ) \, dx\\ &=\frac {1}{9} \int \frac {1}{1+x^2} \, dx+\frac {8}{9} \int \frac {1}{4+x^2} \, dx-\frac {13}{3} \int \frac {1}{\left (4+x^2\right )^2} \, dx\\ &=-\frac {13 x}{24 \left (4+x^2\right )}+\frac {4}{9} \tan ^{-1}\left (\frac {x}{2}\right )+\frac {1}{9} \tan ^{-1}(x)-\frac {13}{24} \int \frac {1}{4+x^2} \, dx\\ &=-\frac {13 x}{24 \left (4+x^2\right )}+\frac {25}{144} \tan ^{-1}\left (\frac {x}{2}\right )+\frac {1}{9} \tan ^{-1}(x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 29, normalized size = 1.00 \begin {gather*} -\frac {13 x}{24 \left (4+x^2\right )}+\frac {25}{144} \tan ^{-1}\left (\frac {x}{2}\right )+\frac {1}{9} \tan ^{-1}(x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-13*x)/(24*(4 + x^2)) + (25*ArcTan[x/2])/144 + ArcTan[x]/9

________________________________________________________________________________________

Maple [A]
time = 0.19, size = 22, normalized size = 0.76

method result size
default \(-\frac {13 x}{24 \left (x^{2}+4\right )}+\frac {25 \arctan \left (\frac {x}{2}\right )}{144}+\frac {\arctan \left (x \right )}{9}\) \(22\)
risch \(-\frac {13 x}{24 \left (x^{2}+4\right )}+\frac {25 \arctan \left (\frac {x}{2}\right )}{144}+\frac {\arctan \left (x \right )}{9}\) \(22\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^4+x^2+1)/(x^2+1)/(x^2+4)^2,x,method=_RETURNVERBOSE)

[Out]

-13/24*x/(x^2+4)+25/144*arctan(1/2*x)+1/9*arctan(x)

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 21, normalized size = 0.72 \begin {gather*} -\frac {13 \, x}{24 \, {\left (x^{2} + 4\right )}} + \frac {25}{144} \, \arctan \left (\frac {1}{2} \, x\right ) + \frac {1}{9} \, \arctan \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-13/24*x/(x^2 + 4) + 25/144*arctan(1/2*x) + 1/9*arctan(x)

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 33, normalized size = 1.14 \begin {gather*} \frac {25 \, {\left (x^{2} + 4\right )} \arctan \left (\frac {1}{2} \, x\right ) + 16 \, {\left (x^{2} + 4\right )} \arctan \left (x\right ) - 78 \, x}{144 \, {\left (x^{2} + 4\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/144*(25*(x^2 + 4)*arctan(1/2*x) + 16*(x^2 + 4)*arctan(x) - 78*x)/(x^2 + 4)

________________________________________________________________________________________

Sympy [A]
time = 0.06, size = 22, normalized size = 0.76 \begin {gather*} - \frac {13 x}{24 x^{2} + 96} + \frac {25 \operatorname {atan}{\left (\frac {x}{2} \right )}}{144} + \frac {\operatorname {atan}{\left (x \right )}}{9} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-13*x/(24*x**2 + 96) + 25*atan(x/2)/144 + atan(x)/9

________________________________________________________________________________________

Giac [A]
time = 3.99, size = 21, normalized size = 0.72 \begin {gather*} -\frac {13 \, x}{24 \, {\left (x^{2} + 4\right )}} + \frac {25}{144} \, \arctan \left (\frac {1}{2} \, x\right ) + \frac {1}{9} \, \arctan \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-13/24*x/(x^2 + 4) + 25/144*arctan(1/2*x) + 1/9*arctan(x)

________________________________________________________________________________________

Mupad [B]
time = 0.04, size = 23, normalized size = 0.79 \begin {gather*} \frac {25\,\mathrm {atan}\left (\frac {x}{2}\right )}{144}+\frac {\mathrm {atan}\left (x\right )}{9}-\frac {13\,x}{24\,\left (x^2+4\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(25*atan(x/2))/144 + atan(x)/9 - (13*x)/(24*(x^2 + 4))

________________________________________________________________________________________