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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 17 \[ \int \frac {1}{\left (1+x^2\right ) \left (4+x^2\right )} \, dx=-\frac {1}{6} \arctan \left (\frac {x}{2}\right )+\frac {\arctan (x)}{3} \]

[Out]

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

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {400, 209} \[ \int \frac {1}{\left (1+x^2\right ) \left (4+x^2\right )} \, dx=\frac {\arctan (x)}{3}-\frac {1}{6} \arctan \left (\frac {x}{2}\right ) \]

[In]

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

[Out]

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

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 400

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*} \text {integral}& = \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] (verified)

Time = 0.01 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\left (1+x^2\right ) \left (4+x^2\right )} \, dx=\frac {1}{6} \arctan \left (\frac {2}{x}\right )+\frac {\arctan (x)}{3} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.81 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.71

method result size
default \(-\frac {\arctan \left (\frac {x}{2}\right )}{6}+\frac {\arctan \left (x \right )}{3}\) \(12\)
risch \(-\frac {\arctan \left (\frac {x}{2}\right )}{6}+\frac {\arctan \left (x \right )}{3}\) \(12\)
parallelrisch \(\frac {i \ln \left (x +i\right )}{6}-\frac {i \ln \left (x -i\right )}{6}+\frac {i \ln \left (x -2 i\right )}{12}-\frac {i \ln \left (x +2 i\right )}{12}\) \(34\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.65 \[ \int \frac {1}{\left (1+x^2\right ) \left (4+x^2\right )} \, dx=-\frac {1}{6} \, \arctan \left (\frac {1}{2} \, x\right ) + \frac {1}{3} \, \arctan \left (x\right ) \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.59 \[ \int \frac {1}{\left (1+x^2\right ) \left (4+x^2\right )} \, dx=- \frac {\operatorname {atan}{\left (\frac {x}{2} \right )}}{6} + \frac {\operatorname {atan}{\left (x \right )}}{3} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.65 \[ \int \frac {1}{\left (1+x^2\right ) \left (4+x^2\right )} \, dx=-\frac {1}{6} \, \arctan \left (\frac {1}{2} \, x\right ) + \frac {1}{3} \, \arctan \left (x\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.65 \[ \int \frac {1}{\left (1+x^2\right ) \left (4+x^2\right )} \, dx=-\frac {1}{6} \, \arctan \left (\frac {1}{2} \, x\right ) + \frac {1}{3} \, \arctan \left (x\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.65 \[ \int \frac {1}{\left (1+x^2\right ) \left (4+x^2\right )} \, dx=\frac {\mathrm {atan}\left (x\right )}{3}-\frac {\mathrm {atan}\left (\frac {x}{2}\right )}{6} \]

[In]

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

[Out]

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