\(\int \frac {1}{a+b x^2} \, dx\) [459]

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

Optimal result

Integrand size = 9, antiderivative size = 24 \[ \int \frac {1}{a+b x^2} \, dx=\frac {\arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b}} \]

[Out]

arctan(x*b^(1/2)/a^(1/2))/a^(1/2)/b^(1/2)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {211} \[ \int \frac {1}{a+b x^2} \, dx=\frac {\arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b}} \]

[In]

Int[(a + b*x^2)^(-1),x]

[Out]

ArcTan[(Sqrt[b]*x)/Sqrt[a]]/(Sqrt[a]*Sqrt[b])

Rule 211

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

Rubi steps \begin{align*} \text {integral}& = \frac {\tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00 \[ \int \frac {1}{a+b x^2} \, dx=\frac {\arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b}} \]

[In]

Integrate[(a + b*x^2)^(-1),x]

[Out]

ArcTan[(Sqrt[b]*x)/Sqrt[a]]/(Sqrt[a]*Sqrt[b])

Maple [A] (verified)

Time = 0.80 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.67

method result size
default \(\frac {\arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}}\) \(16\)
risch \(-\frac {\ln \left (b x +\sqrt {-a b}\right )}{2 \sqrt {-a b}}+\frac {\ln \left (-b x +\sqrt {-a b}\right )}{2 \sqrt {-a b}}\) \(41\)

[In]

int(1/(b*x^2+a),x,method=_RETURNVERBOSE)

[Out]

1/(a*b)^(1/2)*arctan(b*x/(a*b)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 67, normalized size of antiderivative = 2.79 \[ \int \frac {1}{a+b x^2} \, dx=\left [-\frac {\sqrt {-a b} \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right )}{2 \, a b}, \frac {\sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right )}{a b}\right ] \]

[In]

integrate(1/(b*x^2+a),x, algorithm="fricas")

[Out]

[-1/2*sqrt(-a*b)*log((b*x^2 - 2*sqrt(-a*b)*x - a)/(b*x^2 + a))/(a*b), sqrt(a*b)*arctan(sqrt(a*b)*x/a)/(a*b)]

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 53 vs. \(2 (22) = 44\).

Time = 0.06 (sec) , antiderivative size = 53, normalized size of antiderivative = 2.21 \[ \int \frac {1}{a+b x^2} \, dx=- \frac {\sqrt {- \frac {1}{a b}} \log {\left (- a \sqrt {- \frac {1}{a b}} + x \right )}}{2} + \frac {\sqrt {- \frac {1}{a b}} \log {\left (a \sqrt {- \frac {1}{a b}} + x \right )}}{2} \]

[In]

integrate(1/(b*x**2+a),x)

[Out]

-sqrt(-1/(a*b))*log(-a*sqrt(-1/(a*b)) + x)/2 + sqrt(-1/(a*b))*log(a*sqrt(-1/(a*b)) + x)/2

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.62 \[ \int \frac {1}{a+b x^2} \, dx=\frac {\arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}} \]

[In]

integrate(1/(b*x^2+a),x, algorithm="maxima")

[Out]

arctan(b*x/sqrt(a*b))/sqrt(a*b)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.62 \[ \int \frac {1}{a+b x^2} \, dx=\frac {\arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}} \]

[In]

integrate(1/(b*x^2+a),x, algorithm="giac")

[Out]

arctan(b*x/sqrt(a*b))/sqrt(a*b)

Mupad [B] (verification not implemented)

Time = 8.86 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.67 \[ \int \frac {1}{a+b x^2} \, dx=\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )}{\sqrt {a}\,\sqrt {b}} \]

[In]

int(1/(a + b*x^2),x)

[Out]

atan((b^(1/2)*x)/a^(1/2))/(a^(1/2)*b^(1/2))