Optimal. Leaf size=116 \[ -\frac{a^3 \left (x-\sqrt{a+x^2}\right )^{n-3}}{8 (3-n)}-\frac{3 a^2 \left (x-\sqrt{a+x^2}\right )^{n-1}}{8 (1-n)}+\frac{3 a \left (x-\sqrt{a+x^2}\right )^{n+1}}{8 (n+1)}+\frac{\left (x-\sqrt{a+x^2}\right )^{n+3}}{8 (n+3)} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.125904, antiderivative size = 116, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095 \[ -\frac{a^3 \left (x-\sqrt{a+x^2}\right )^{n-3}}{8 (3-n)}-\frac{3 a^2 \left (x-\sqrt{a+x^2}\right )^{n-1}}{8 (1-n)}+\frac{3 a \left (x-\sqrt{a+x^2}\right )^{n+1}}{8 (n+1)}+\frac{\left (x-\sqrt{a+x^2}\right )^{n+3}}{8 (n+3)} \]
Antiderivative was successfully verified.
[In] Int[(a + x^2)*(x - Sqrt[a + x^2])^n,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [F] time = 0., size = 0, normalized size = 0. \[ \frac{\int ^{x - \sqrt{a + x^{2}}} \frac{x^{n} \left (a + x^{2}\right )^{3}}{x^{4}}\, dx}{8} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((x**2+a)*(x-(x**2+a)**(1/2))**n,x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.370003, size = 211, normalized size = 1.82 \[ \frac{\left (x-\sqrt{a+x^2}\right )^{n-2} \left (a^3 \left (n \left (n^2-7\right ) \sqrt{a+x^2}-3 \left (n^3-n^2-7 n+3\right ) x\right )+a^2 (n-3) x^2 \left (3 \left (2 n^2+3 n-3\right ) \sqrt{a+x^2}-2 \left (5 n^2+6 n-8\right ) x\right )+a \left (n^2-4 n+3\right ) x^4 \left (3 (3 n+5) \sqrt{a+x^2}-(11 n+17) x\right )+4 \left (n^3-3 n^2-n+3\right ) x^6 \left (\sqrt{a+x^2}-x\right )\right )}{(n-3) (n-1) (n+1) (n+3) \left (x \left (\sqrt{a+x^2}-x\right )-a\right )} \]
Antiderivative was successfully verified.
[In] Integrate[(a + x^2)*(x - Sqrt[a + x^2])^n,x]
[Out]
_______________________________________________________________________________________
Maple [F] time = 0.024, size = 0, normalized size = 0. \[ \int \left ({x}^{2}+a \right ) \left ( x-\sqrt{{x}^{2}+a} \right ) ^{n}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((x^2+a)*(x-(x^2+a)^(1/2))^n,x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ \int{\left (x^{2} + a\right )}{\left (x - \sqrt{x^{2} + a}\right )}^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((x^2 + a)*(x - sqrt(x^2 + a))^n,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.334651, size = 107, normalized size = 0.92 \[ -\frac{{\left (3 \,{\left (n^{2} - 1\right )} x^{3} + 3 \,{\left (a n^{2} - 3 \, a\right )} x +{\left (a n^{3} +{\left (n^{3} - n\right )} x^{2} - 7 \, a n\right )} \sqrt{x^{2} + a}\right )}{\left (x - \sqrt{x^{2} + a}\right )}^{n}}{n^{4} - 10 \, n^{2} + 9} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((x^2 + a)*(x - sqrt(x^2 + a))^n,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \[ \int \left (a + x^{2}\right ) \left (x - \sqrt{a + x^{2}}\right )^{n}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((x**2+a)*(x-(x**2+a)**(1/2))**n,x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [F] time = 0., size = 0, normalized size = 0. \[ \int{\left (x^{2} + a\right )}{\left (x - \sqrt{x^{2} + a}\right )}^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((x^2 + a)*(x - sqrt(x^2 + a))^n,x, algorithm="giac")
[Out]