3.278 \(\int \frac {1}{(1+x^2) (4+x^2)} \, dx\)

Optimal. Leaf size=17 \[ \frac {1}{3} \tan ^{-1}(x)-\frac {1}{6} \tan ^{-1}\left (\frac {x}{2}\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {391, 203} \[ \frac {1}{3} \tan ^{-1}(x)-\frac {1}{6} \tan ^{-1}\left (\frac {x}{2}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-ArcTan[x/2]/6 + ArcTan[x]/3

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 391

Int[1/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x^n),
 x], x] - Dist[d/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 17, normalized size = 1.00 \[ \frac {1}{6} \tan ^{-1}\left (\frac {2}{x}\right )+\frac {1}{3} \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTan[2/x]/6 + ArcTan[x]/3

________________________________________________________________________________________

fricas [A]  time = 0.64, size = 11, normalized size = 0.65 \[ -\frac {1}{6} \, \arctan \left (\frac {1}{2} \, x\right ) + \frac {1}{3} \, \arctan \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.29, size = 11, normalized size = 0.65 \[ -\frac {1}{6} \, \arctan \left (\frac {1}{2} \, x\right ) + \frac {1}{3} \, \arctan \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.01, size = 12, normalized size = 0.71 \[ \frac {\arctan \relax (x )}{3}-\frac {\arctan \left (\frac {x}{2}\right )}{6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 2.20, size = 11, normalized size = 0.65 \[ -\frac {1}{6} \, \arctan \left (\frac {1}{2} \, x\right ) + \frac {1}{3} \, \arctan \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.03, size = 11, normalized size = 0.65 \[ \frac {\mathrm {atan}\relax (x)}{3}-\frac {\mathrm {atan}\left (\frac {x}{2}\right )}{6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

atan(x)/3 - atan(x/2)/6

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 10, normalized size = 0.59 \[ - \frac {\operatorname {atan}{\left (\frac {x}{2} \right )}}{6} + \frac {\operatorname {atan}{\relax (x )}}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-atan(x/2)/6 + atan(x)/3

________________________________________________________________________________________