3.325 \(\int \left (a+x^2\right ) \left (x+\sqrt{a+x^2}\right )^n \, dx\)

Optimal. Leaf size=108 \[ -\frac{a^3 \left (\sqrt{a+x^2}+x\right )^{n-3}}{8 (3-n)}-\frac{3 a^2 \left (\sqrt{a+x^2}+x\right )^{n-1}}{8 (1-n)}+\frac{3 a \left (\sqrt{a+x^2}+x\right )^{n+1}}{8 (n+1)}+\frac{\left (\sqrt{a+x^2}+x\right )^{n+3}}{8 (n+3)} \]

[Out]

-(a^3*(x + Sqrt[a + x^2])^(-3 + n))/(8*(3 - n)) - (3*a^2*(x + Sqrt[a + x^2])^(-1
 + n))/(8*(1 - n)) + (3*a*(x + Sqrt[a + x^2])^(1 + n))/(8*(1 + n)) + (x + Sqrt[a
 + x^2])^(3 + n)/(8*(3 + n))

_______________________________________________________________________________________

Rubi [A]  time = 0.124702, antiderivative size = 108, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105 \[ -\frac{a^3 \left (\sqrt{a+x^2}+x\right )^{n-3}}{8 (3-n)}-\frac{3 a^2 \left (\sqrt{a+x^2}+x\right )^{n-1}}{8 (1-n)}+\frac{3 a \left (\sqrt{a+x^2}+x\right )^{n+1}}{8 (n+1)}+\frac{\left (\sqrt{a+x^2}+x\right )^{n+3}}{8 (n+3)} \]

Antiderivative was successfully verified.

[In]  Int[(a + x^2)*(x + Sqrt[a + x^2])^n,x]

[Out]

-(a^3*(x + Sqrt[a + x^2])^(-3 + n))/(8*(3 - n)) - (3*a^2*(x + Sqrt[a + x^2])^(-1
 + n))/(8*(1 - n)) + (3*a*(x + Sqrt[a + x^2])^(1 + n))/(8*(1 + n)) + (x + Sqrt[a
 + x^2])^(3 + n)/(8*(3 + n))

_______________________________________________________________________________________

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]

Integral(x**n*(a + x**2)**3/x**4, (x, x + sqrt(a + x**2)))/8

_______________________________________________________________________________________

Mathematica [A]  time = 0.359624, size = 202, normalized size = 1.87 \[ \frac{\left (\sqrt{a+x^2}+x\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]

((x + Sqrt[a + x^2])^(-2 + n)*(4*(3 - n - 3*n^2 + n^3)*x^6*(x + Sqrt[a + x^2]) +
 a*(3 - 4*n + n^2)*x^4*((17 + 11*n)*x + 3*(5 + 3*n)*Sqrt[a + x^2]) + a^3*(3*(3 -
 7*n - n^2 + n^3)*x + n*(-7 + n^2)*Sqrt[a + x^2]) + a^2*(-3 + n)*x^2*(2*(-8 + 6*
n + 5*n^2)*x + 3*(-3 + 3*n + 2*n^2)*Sqrt[a + x^2])))/((-3 + n)*(-1 + n)*(1 + n)*
(3 + n)*(a + x*(x + Sqrt[a + x^2])))

_______________________________________________________________________________________

Maple [C]  time = 0.015, size = 167, normalized size = 1.6 \[{\frac{{2}^{n}{x}^{3+n}}{3+n}{\mbox{$_3$F$_2$}(-{\frac{n}{2}},-{\frac{3}{2}}-{\frac{n}{2}},{\frac{1}{2}}-{\frac{n}{2}};\,1-n,-{\frac{1}{2}}-{\frac{n}{2}};\,-{\frac{a}{{x}^{2}}})}}+{\frac{n}{4\,\sqrt{\pi }}{a}^{{\frac{3}{2}}+{\frac{n}{2}}} \left ( 8\,{\frac{\sqrt{\pi }{x}^{1+n}{a}^{-1/2-n/2}}{ \left ( 1+n \right ) n \left ( -2+2\,n \right ) } \left ({\frac{an}{{x}^{2}}}+n-1 \right ) \left ( \sqrt{{\frac{a}{{x}^{2}}}+1}+1 \right ) ^{-1+n}}+4\,{\frac{\sqrt{\pi }{x}^{1+n}{a}^{-1/2-n/2}}{ \left ( 1+n \right ) n}\sqrt{{\frac{a}{{x}^{2}}}+1} \left ( \sqrt{{\frac{a}{{x}^{2}}}+1}+1 \right ) ^{-1+n}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((x^2+a)*(x+(x^2+a)^(1/2))^n,x)

[Out]

2^n/(3+n)*x^(3+n)*hypergeom([-1/2*n,-3/2-1/2*n,1/2-1/2*n],[1-n,-1/2-1/2*n],-a/x^
2)+1/4*a^(3/2+1/2*n)/Pi^(1/2)*n*(8*Pi^(1/2)/(1+n)/n*x^(1+n)*a^(-1/2-1/2*n)*(a/x^
2*n+n-1)/(-2+2*n)*((a/x^2+1)^(1/2)+1)^(-1+n)+4*Pi^(1/2)/(1+n)/n*x^(1+n)*a^(-1/2-
1/2*n)*(a/x^2+1)^(1/2)*((a/x^2+1)^(1/2)+1)^(-1+n))

_______________________________________________________________________________________

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]

integrate((x^2 + a)*(x + sqrt(x^2 + a))^n, x)

_______________________________________________________________________________________

Fricas [A]  time = 0.319104, size = 105, normalized size = 0.97 \[ -\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]

-(3*(n^2 - 1)*x^3 + 3*(a*n^2 - 3*a)*x - (a*n^3 + (n^3 - n)*x^2 - 7*a*n)*sqrt(x^2
 + a))*(x + sqrt(x^2 + a))^n/(n^4 - 10*n^2 + 9)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x**2+a)*(x+(x**2+a)**(1/2))**n,x)

[Out]

Timed 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]

integrate((x^2 + a)*(x + sqrt(x^2 + a))^n, x)