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

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

Optimal result

Integrand size = 19, antiderivative size = 31 \[ \int \frac {1}{\sqrt {1-x^2} \left (4+x^2\right )} \, dx=\frac {\arctan \left (\frac {\sqrt {5} x}{2 \sqrt {1-x^2}}\right )}{2 \sqrt {5}} \]

[Out]

1/10*arctan(1/2*x*5^(1/2)/(-x^2+1)^(1/2))*5^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {385, 209} \[ \int \frac {1}{\sqrt {1-x^2} \left (4+x^2\right )} \, dx=\frac {\arctan \left (\frac {\sqrt {5} x}{2 \sqrt {1-x^2}}\right )}{2 \sqrt {5}} \]

[In]

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

[Out]

ArcTan[(Sqrt[5]*x)/(2*Sqrt[1 - x^2])]/(2*Sqrt[5])

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 385

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

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {1}{4+5 x^2} \, dx,x,\frac {x}{\sqrt {1-x^2}}\right ) \\ & = \frac {\arctan \left (\frac {\sqrt {5} x}{2 \sqrt {1-x^2}}\right )}{2 \sqrt {5}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.06 \[ \int \frac {1}{\sqrt {1-x^2} \left (4+x^2\right )} \, dx=-\frac {\arctan \left (\frac {x \sqrt {5-5 x^2}}{2 \left (-1+x^2\right )}\right )}{2 \sqrt {5}} \]

[In]

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

[Out]

-1/2*ArcTan[(x*Sqrt[5 - 5*x^2])/(2*(-1 + x^2))]/Sqrt[5]

Maple [A] (verified)

Time = 0.58 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.77

method result size
pseudoelliptic \(-\frac {\sqrt {5}\, \arctan \left (\frac {2 \sqrt {5}\, \sqrt {-x^{2}+1}}{5 x}\right )}{10}\) \(24\)
default \(-\frac {\sqrt {5}\, \arctan \left (\frac {\sqrt {-x^{2}+1}\, \sqrt {5}\, x}{2 x^{2}-2}\right )}{10}\) \(29\)
trager \(\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+5\right ) \ln \left (\frac {-9 \operatorname {RootOf}\left (\textit {\_Z}^{2}+5\right ) x^{2}+20 x \sqrt {-x^{2}+1}+4 \operatorname {RootOf}\left (\textit {\_Z}^{2}+5\right )}{x^{2}+4}\right )}{20}\) \(50\)

[In]

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

[Out]

-1/10*5^(1/2)*arctan(2/5/x*5^(1/2)*(-x^2+1)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.74 \[ \int \frac {1}{\sqrt {1-x^2} \left (4+x^2\right )} \, dx=-\frac {1}{10} \, \sqrt {5} \arctan \left (\frac {2 \, \sqrt {5} \sqrt {-x^{2} + 1}}{5 \, x}\right ) \]

[In]

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

[Out]

-1/10*sqrt(5)*arctan(2/5*sqrt(5)*sqrt(-x^2 + 1)/x)

Sympy [F]

\[ \int \frac {1}{\sqrt {1-x^2} \left (4+x^2\right )} \, dx=\int \frac {1}{\sqrt {- \left (x - 1\right ) \left (x + 1\right )} \left (x^{2} + 4\right )}\, dx \]

[In]

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

[Out]

Integral(1/(sqrt(-(x - 1)*(x + 1))*(x**2 + 4)), x)

Maxima [F]

\[ \int \frac {1}{\sqrt {1-x^2} \left (4+x^2\right )} \, dx=\int { \frac {1}{{\left (x^{2} + 4\right )} \sqrt {-x^{2} + 1}} \,d x } \]

[In]

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

[Out]

integrate(1/((x^2 + 4)*sqrt(-x^2 + 1)), x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 51 vs. \(2 (21) = 42\).

Time = 0.29 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.65 \[ \int \frac {1}{\sqrt {1-x^2} \left (4+x^2\right )} \, dx=\frac {1}{20} \, \sqrt {5} {\left (\pi \mathrm {sgn}\left (x\right ) + 2 \, \arctan \left (-\frac {\sqrt {5} x {\left (\frac {{\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} - 1\right )}}{5 \, {\left (\sqrt {-x^{2} + 1} - 1\right )}}\right )\right )} \]

[In]

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

[Out]

1/20*sqrt(5)*(pi*sgn(x) + 2*arctan(-1/5*sqrt(5)*x*((sqrt(-x^2 + 1) - 1)^2/x^2 - 1)/(sqrt(-x^2 + 1) - 1)))

Mupad [B] (verification not implemented)

Time = 0.58 (sec) , antiderivative size = 79, normalized size of antiderivative = 2.55 \[ \int \frac {1}{\sqrt {1-x^2} \left (4+x^2\right )} \, dx=\frac {\sqrt {5}\,\ln \left (\frac {\frac {\sqrt {5}\,\left (-1+x\,2{}\mathrm {i}\right )\,1{}\mathrm {i}}{5}-\sqrt {1-x^2}\,1{}\mathrm {i}}{x-2{}\mathrm {i}}\right )\,1{}\mathrm {i}}{20}-\frac {\sqrt {5}\,\ln \left (\frac {\frac {\sqrt {5}\,\left (1+x\,2{}\mathrm {i}\right )\,1{}\mathrm {i}}{5}+\sqrt {1-x^2}\,1{}\mathrm {i}}{x+2{}\mathrm {i}}\right )\,1{}\mathrm {i}}{20} \]

[In]

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

[Out]

(5^(1/2)*log(((5^(1/2)*(x*2i - 1)*1i)/5 - (1 - x^2)^(1/2)*1i)/(x - 2i))*1i)/20 - (5^(1/2)*log(((5^(1/2)*(x*2i
+ 1)*1i)/5 + (1 - x^2)^(1/2)*1i)/(x + 2i))*1i)/20