Optimal. Leaf size=201 \[ \frac {a^6 \left (x-\sqrt {a+x^2}\right )^{-6+n}}{64 (6-n)}+\frac {3 a^5 \left (x-\sqrt {a+x^2}\right )^{-4+n}}{32 (4-n)}+\frac {15 a^4 \left (x-\sqrt {a+x^2}\right )^{-2+n}}{64 (2-n)}-\frac {5 a^3 \left (x-\sqrt {a+x^2}\right )^n}{16 n}-\frac {15 a^2 \left (x-\sqrt {a+x^2}\right )^{2+n}}{64 (2+n)}-\frac {3 a \left (x-\sqrt {a+x^2}\right )^{4+n}}{32 (4+n)}-\frac {\left (x-\sqrt {a+x^2}\right )^{6+n}}{64 (6+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 201, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {2147, 276}
\begin {gather*} \frac {a^6 \left (x-\sqrt {a+x^2}\right )^{n-6}}{64 (6-n)}+\frac {3 a^5 \left (x-\sqrt {a+x^2}\right )^{n-4}}{32 (4-n)}+\frac {15 a^4 \left (x-\sqrt {a+x^2}\right )^{n-2}}{64 (2-n)}-\frac {5 a^3 \left (x-\sqrt {a+x^2}\right )^n}{16 n}-\frac {15 a^2 \left (x-\sqrt {a+x^2}\right )^{n+2}}{64 (n+2)}-\frac {3 a \left (x-\sqrt {a+x^2}\right )^{n+4}}{32 (n+4)}-\frac {\left (x-\sqrt {a+x^2}\right )^{n+6}}{64 (n+6)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 276
Rule 2147
Rubi steps
\begin {align*} \int \left (a+x^2\right )^{5/2} \left (x-\sqrt {a+x^2}\right )^n \, dx &=-\left (\frac {1}{64} \text {Subst}\left (\int x^{-7+n} \left (a+x^2\right )^6 \, dx,x,x-\sqrt {a+x^2}\right )\right )\\ &=-\left (\frac {1}{64} \text {Subst}\left (\int \left (a^6 x^{-7+n}+6 a^5 x^{-5+n}+15 a^4 x^{-3+n}+20 a^3 x^{-1+n}+15 a^2 x^{1+n}+6 a x^{3+n}+x^{5+n}\right ) \, dx,x,x-\sqrt {a+x^2}\right )\right )\\ &=\frac {a^6 \left (x-\sqrt {a+x^2}\right )^{-6+n}}{64 (6-n)}+\frac {3 a^5 \left (x-\sqrt {a+x^2}\right )^{-4+n}}{32 (4-n)}+\frac {15 a^4 \left (x-\sqrt {a+x^2}\right )^{-2+n}}{64 (2-n)}-\frac {5 a^3 \left (x-\sqrt {a+x^2}\right )^n}{16 n}-\frac {15 a^2 \left (x-\sqrt {a+x^2}\right )^{2+n}}{64 (2+n)}-\frac {3 a \left (x-\sqrt {a+x^2}\right )^{4+n}}{32 (4+n)}-\frac {\left (x-\sqrt {a+x^2}\right )^{6+n}}{64 (6+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.45, size = 173, normalized size = 0.86 \begin {gather*} \frac {1}{64} \left (x-\sqrt {a+x^2}\right )^n \left (-\frac {20 a^3}{n}-\frac {a^6}{(-6+n) \left (x-\sqrt {a+x^2}\right )^6}-\frac {6 a^5}{(-4+n) \left (x-\sqrt {a+x^2}\right )^4}-\frac {15 a^4}{(-2+n) \left (x-\sqrt {a+x^2}\right )^2}-\frac {15 a^2 \left (x-\sqrt {a+x^2}\right )^2}{2+n}-\frac {6 a \left (x-\sqrt {a+x^2}\right )^4}{4+n}-\frac {\left (x-\sqrt {a+x^2}\right )^6}{6+n}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.04, size = 0, normalized size = 0.00 \[\int \left (x^{2}+a \right )^{\frac {5}{2}} \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 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 204, normalized size = 1.01 \begin {gather*} -\frac {{\left (a^{3} n^{6} - 50 \, a^{3} n^{4} + {\left (n^{6} - 20 \, n^{4} + 64 \, n^{2}\right )} x^{6} + 544 \, a^{3} n^{2} + 3 \, {\left (a n^{6} - 30 \, a n^{4} + 104 \, a n^{2}\right )} x^{4} - 720 \, a^{3} + 3 \, {\left (a^{2} n^{6} - 40 \, a^{2} n^{4} + 264 \, a^{2} n^{2}\right )} x^{2} + 6 \, {\left ({\left (n^{5} - 20 \, n^{3} + 64 \, n\right )} x^{5} + 2 \, {\left (a n^{5} - 30 \, a n^{3} + 104 \, a n\right )} x^{3} + {\left (a^{2} n^{5} - 40 \, a^{2} n^{3} + 264 \, a^{2} n\right )} x\right )} \sqrt {x^{2} + a}\right )} {\left (x - \sqrt {x^{2} + a}\right )}^{n}}{n^{7} - 56 \, n^{5} + 784 \, n^{3} - 2304 \, n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \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*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\left (x-\sqrt {x^2+a}\right )}^n\,{\left (x^2+a\right )}^{5/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________