3.332 \(\int \frac{\left (x-\sqrt{a+x^2}\right )^n}{a+x^2} \, dx\)

Optimal. Leaf size=63 \[ \frac{2 \left (x-\sqrt{a+x^2}\right )^{n+1} \, _2F_1\left (1,\frac{n+1}{2};\frac{n+3}{2};-\frac{\left (x-\sqrt{x^2+a}\right )^2}{a}\right )}{a (n+1)} \]

[Out]

(2*(x - Sqrt[a + x^2])^(1 + n)*Hypergeometric2F1[1, (1 + n)/2, (3 + n)/2, -((x -
 Sqrt[a + x^2])^2/a)])/(a*(1 + n))

_______________________________________________________________________________________

Rubi [A]  time = 0.123828, antiderivative size = 63, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087 \[ \frac{2 \left (x-\sqrt{a+x^2}\right )^{n+1} \, _2F_1\left (1,\frac{n+1}{2};\frac{n+3}{2};-\frac{\left (x-\sqrt{x^2+a}\right )^2}{a}\right )}{a (n+1)} \]

Antiderivative was successfully verified.

[In]  Int[(x - Sqrt[a + x^2])^n/(a + x^2),x]

[Out]

(2*(x - Sqrt[a + x^2])^(1 + n)*Hypergeometric2F1[1, (1 + n)/2, (3 + n)/2, -((x -
 Sqrt[a + x^2])^2/a)])/(a*(1 + n))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 12.7166, size = 46, normalized size = 0.73 \[ \frac{2 \left (x - \sqrt{a + x^{2}}\right )^{n + 1}{{}_{2}F_{1}\left (\begin{matrix} 1, \frac{n}{2} + \frac{1}{2} \\ \frac{n}{2} + \frac{3}{2} \end{matrix}\middle |{- \frac{\left (x - \sqrt{a + x^{2}}\right )^{2}}{a}} \right )}}{a \left (n + 1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((x-(x**2+a)**(1/2))**n/(x**2+a),x)

[Out]

2*(x - sqrt(a + x**2))**(n + 1)*hyper((1, n/2 + 1/2), (n/2 + 3/2,), -(x - sqrt(a
 + x**2))**2/a)/(a*(n + 1))

_______________________________________________________________________________________

Mathematica [A]  time = 0.04136, size = 0, normalized size = 0. \[ \int \frac{\left (x-\sqrt{a+x^2}\right )^n}{a+x^2} \, dx \]

Verification is Not applicable to the result.

[In]  Integrate[(x - Sqrt[a + x^2])^n/(a + x^2),x]

[Out]

Integrate[(x - Sqrt[a + x^2])^n/(a + x^2), x]

_______________________________________________________________________________________

Maple [F]  time = 0.038, size = 0, normalized size = 0. \[ \int{\frac{1}{{x}^{2}+a} \left ( x-\sqrt{{x}^{2}+a} \right ) ^{n}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((x-(x^2+a)^(1/2))^n/(x^2+a),x)

[Out]

int((x-(x^2+a)^(1/2))^n/(x^2+a),x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (x - \sqrt{x^{2} + a}\right )}^{n}}{x^{2} + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x - sqrt(x^2 + a))^n/(x^2 + a),x, algorithm="maxima")

[Out]

integrate((x - sqrt(x^2 + a))^n/(x^2 + a), x)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{{\left (x - \sqrt{x^{2} + a}\right )}^{n}}{x^{2} + a}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x - sqrt(x^2 + a))^n/(x^2 + a),x, algorithm="fricas")

[Out]

integral((x - sqrt(x^2 + a))^n/(x^2 + a), x)

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{\left (x - \sqrt{a + x^{2}}\right )^{n}}{a + x^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x-(x**2+a)**(1/2))**n/(x**2+a),x)

[Out]

Integral((x - sqrt(a + x**2))**n/(a + x**2), x)

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (x - \sqrt{x^{2} + a}\right )}^{n}}{x^{2} + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x - sqrt(x^2 + a))^n/(x^2 + a),x, algorithm="giac")

[Out]

integrate((x - sqrt(x^2 + a))^n/(x^2 + a), x)