3.497 \(\int \sqrt{a+x^2} (x+\sqrt{a+x^2})^n \, dx\)

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]

-(a^2*(x + Sqrt[a + x^2])^(-2 + n))/(4*(2 - n)) + (a*(x + Sqrt[a + x^2])^n)/(2*n) + (x + Sqrt[a + x^2])^(2 + n
)/(4*(2 + n))

________________________________________________________________________________________

Rubi [A]  time = 0.0755965, antiderivative size = 75, normalized size of antiderivative = 1., 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]

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

[Out]

-(a^2*(x + Sqrt[a + x^2])^(-2 + n))/(4*(2 - n)) + (a*(x + Sqrt[a + x^2])^n)/(2*n) + (x + Sqrt[a + x^2])^(2 + n
)/(4*(2 + n))

Rule 2122

Int[((g_) + (i_.)*(x_)^2)^(m_.)*((d_.) + (e_.)*(x_) + (f_.)*Sqrt[(a_) + (c_.)*(x_)^2])^(n_.), x_Symbol] :> Dis
t[(1*(i/c)^m)/(2^(2*m + 1)*e*f^(2*m)), Subst[Int[(x^n*(d^2 + a*f^2 - 2*d*x + x^2)^(2*m + 1))/(-d + x)^(2*(m +
1)), x], x, d + e*x + f*Sqrt[a + c*x^2]], x] /; FreeQ[{a, c, d, e, f, g, i, n}, x] && EqQ[e^2 - c*f^2, 0] && E
qQ[c*g - a*i, 0] && IntegerQ[2*m] && (IntegerQ[m] || GtQ[i/c, 0])

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

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.0705863, 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]

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

[Out]

((x + Sqrt[a + x^2])^n*((2*a)/n + a^2/((-2 + n)*(x + Sqrt[a + x^2])^2) + (x + Sqrt[a + x^2])^2/(2 + n)))/4

________________________________________________________________________________________

Maple [F]  time = 0.014, size = 0, normalized size = 0. \begin{align*} \int \sqrt{{x}^{2}+a} \left ( x+\sqrt{{x}^{2}+a} \right ) ^{n}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{x^{2} + a}{\left (x + \sqrt{x^{2} + a}\right )}^{n}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+a)^(1/2)*(x+(x^2+a)^(1/2))^n,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.55937, size = 109, normalized size = 1.45 \begin{align*} \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} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+a)^(1/2)*(x+(x^2+a)^(1/2))^n,x, algorithm="fricas")

[Out]

(n^2*x^2 + a*n^2 - 2*sqrt(x^2 + a)*n*x - 2*a)*(x + sqrt(x^2 + a))^n/(n^3 - 4*n)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a + x^{2}} \left (x + \sqrt{a + x^{2}}\right )^{n}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(sqrt(a + x**2)*(x + sqrt(a + x**2))**n, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{x^{2} + a}{\left (x + \sqrt{x^{2} + a}\right )}^{n}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+a)^(1/2)*(x+(x^2+a)^(1/2))^n,x, algorithm="giac")

[Out]

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