Optimal. Leaf size=20 \[ -\frac{\left (x-\sqrt{a+x^2}\right )^n}{n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0565753, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.08, Rules used = {2122, 30} \[ -\frac{\left (x-\sqrt{a+x^2}\right )^n}{n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2122
Rule 30
Rubi steps
\begin{align*} \int \frac{\left (x-\sqrt{a+x^2}\right )^n}{\sqrt{a+x^2}} \, dx &=-\operatorname{Subst}\left (\int x^{-1+n} \, dx,x,x-\sqrt{a+x^2}\right )\\ &=-\frac{\left (x-\sqrt{a+x^2}\right )^n}{n}\\ \end{align*}
Mathematica [A] time = 0.0068217, size = 20, normalized size = 1. \[ -\frac{\left (x-\sqrt{a+x^2}\right )^n}{n} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.026, size = 0, normalized size = 0. \begin{align*} \int{ \left ( x-\sqrt{{x}^{2}+a} \right ) ^{n}{\frac{1}{\sqrt{{x}^{2}+a}}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (x - \sqrt{x^{2} + a}\right )}^{n}}{\sqrt{x^{2} + a}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.990437, size = 35, normalized size = 1.75 \begin{align*} -\frac{{\left (x - \sqrt{x^{2} + a}\right )}^{n}}{n} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.81814, size = 36, normalized size = 1.8 \begin{align*} \begin{cases} - \frac{\left (x - \sqrt{a + x^{2}}\right )^{n}}{n} & \text{for}\: n \neq 0 \\\begin{cases} \operatorname{asinh}{\left (x \sqrt{\frac{1}{a}} \right )} & \text{for}\: a > 0 \\\operatorname{acosh}{\left (x \sqrt{- \frac{1}{a}} \right )} & \text{for}\: a < 0 \end{cases} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (x - \sqrt{x^{2} + a}\right )}^{n}}{\sqrt{x^{2} + a}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]