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

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

[Out]

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

_______________________________________________________________________________________

Rubi [A]  time = 0.0453643, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.133 \[ \frac{\left (x-\sqrt{a+x^2}\right )^{n+1}}{2 (n+1)}-\frac{a \left (x-\sqrt{a+x^2}\right )^{n-1}}{2 (1-n)} \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Mathematica [A]  time = 0.0235853, size = 39, normalized size = 0.7 \[ \frac{\left (x-\sqrt{a+x^2}\right )^n \left (n \left (-\sqrt{a+x^2}\right )-x\right )}{n^2-1} \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Maple [F]  time = 0.024, size = 0, normalized size = 0. \[ \int \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)

[Out]

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

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.299274, size = 45, normalized size = 0.8 \[ -\frac{{\left (\sqrt{x^{2} + a} n + x\right )}{\left (x - \sqrt{x^{2} + a}\right )}^{n}}{n^{2} - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-(sqrt(x^2 + a)*n + x)*(x - sqrt(x^2 + a))^n/(n^2 - 1)

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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