Optimal. Leaf size=75 \[ -\frac {a^2 \left (\sqrt {a+x^2}+x\right )^{n-2}}{4 (2-n)}+\frac {a \left (\sqrt {a+x^2}+x\right )^n}{2 n}+\frac {\left (\sqrt {a+x^2}+x\right )^{n+2}}{4 (n+2)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {2122, 270} \[ -\frac {a^2 \left (\sqrt {a+x^2}+x\right )^{n-2}}{4 (2-n)}+\frac {a \left (\sqrt {a+x^2}+x\right )^n}{2 n}+\frac {\left (\sqrt {a+x^2}+x\right )^{n+2}}{4 (n+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 270
Rule 2122
Rubi steps
\begin {align*} \int \sqrt {a+x^2} \left (x+\sqrt {a+x^2}\right )^n \, dx &=\frac {1}{4} \operatorname {Subst}\left (\int x^{-3+n} \left (a+x^2\right )^2 \, dx,x,x+\sqrt {a+x^2}\right )\\ &=\frac {1}{4} \operatorname {Subst}\left (\int \left (a^2 x^{-3+n}+2 a x^{-1+n}+x^{1+n}\right ) \, dx,x,x+\sqrt {a+x^2}\right )\\ &=-\frac {a^2 \left (x+\sqrt {a+x^2}\right )^{-2+n}}{4 (2-n)}+\frac {a \left (x+\sqrt {a+x^2}\right )^n}{2 n}+\frac {\left (x+\sqrt {a+x^2}\right )^{2+n}}{4 (2+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 65, normalized size = 0.87 \[ \frac {1}{4} \left (\sqrt {a+x^2}+x\right )^n \left (\frac {a^2}{(n-2) \left (\sqrt {a+x^2}+x\right )^2}+\frac {\left (\sqrt {a+x^2}+x\right )^2}{n+2}+\frac {2 a}{n}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 48, normalized size = 0.64 \[ \frac {{\left (n^{2} x^{2} + a n^{2} - 2 \, \sqrt {x^{2} + a} n x - 2 \, a\right )} {\left (x + \sqrt {x^{2} + a}\right )}^{n}}{n^{3} - 4 \, n} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {x^{2} + a} {\left (x + \sqrt {x^{2} + a}\right )}^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.05, size = 0, normalized size = 0.00 \[ \int \sqrt {x^{2}+a}\, \left (x +\sqrt {x^{2}+a}\right )^{n}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {x^{2} + a} {\left (x + \sqrt {x^{2} + a}\right )}^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \sqrt {x^2+a}\,{\left (x+\sqrt {x^2+a}\right )}^n \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a + x^{2}} \left (x + \sqrt {a + x^{2}}\right )^{n}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________