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)} \]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2117, 14} \begin {gather*} \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)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2117
Rubi steps
\begin {align*} \int \left (x-\sqrt {a+x^2}\right )^n \, dx &=\frac {1}{2} \operatorname {Subst}\left (\int x^{-2+n} \left (a+x^2\right ) \, dx,x,x-\sqrt {a+x^2}\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \left (a x^{-2+n}+x^n\right ) \, dx,x,x-\sqrt {a+x^2}\right )\\ &=-\frac {a \left (x-\sqrt {a+x^2}\right )^{-1+n}}{2 (1-n)}+\frac {\left (x-\sqrt {a+x^2}\right )^{1+n}}{2 (1+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 50, normalized size = 0.89 \begin {gather*} \frac {1}{2} \left (x-\sqrt {a+x^2}\right )^{n-1} \left (\frac {\left (x-\sqrt {a+x^2}\right )^2}{n+1}+\frac {a}{n-1}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.20, size = 0, normalized size = 0.00 \begin {gather*} \int \left (x-\sqrt {a+x^2}\right )^n \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.58, size = 33, normalized size = 0.59 \begin {gather*} -\frac {{\left (\sqrt {x^{2} + a} n + x\right )} {\left (x - \sqrt {x^{2} + a}\right )}^{n}}{n^{2} - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int {\left (x - \sqrt {x^{2} + a}\right )}^{n}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.05, size = 0, normalized size = 0.00 \begin {gather*} \int \left (x -\sqrt {x^{2}+a}\right )^{n}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int {\left (x - \sqrt {x^{2} + a}\right )}^{n}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int {\left (x-\sqrt {x^2+a}\right )}^n \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (x - \sqrt {a + x^{2}}\right )^{n}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________