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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0679521, antiderivative size = 59, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {2122, 364} \[ \frac{2 \left (\sqrt{a+x^2}+x\right )^{n+1} \, _2F_1\left (1,\frac{n+1}{2};\frac{n+3}{2};-\frac{\left (x+\sqrt{x^2+a}\right )^2}{a}\right )}{a (n+1)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(2*(x + Sqrt[a + x^2])^(1 + n)*Hypergeometric2F1[1, (1 + n)/2, (3 + n)/2, -((x + Sqrt[a + x^2])^2/a)])/(a*(1 +
 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 364

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a^p*(c*x)^(m + 1)*Hypergeometric2F1[-
p, (m + 1)/n, (m + 1)/n + 1, -((b*x^n)/a)])/(c*(m + 1)), x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rubi steps

\begin{align*} \int \frac{\left (x+\sqrt{a+x^2}\right )^n}{a+x^2} \, dx &=2 \operatorname{Subst}\left (\int \frac{x^n}{a+x^2} \, dx,x,x+\sqrt{a+x^2}\right )\\ &=\frac{2 \left (x+\sqrt{a+x^2}\right )^{1+n} \, _2F_1\left (1,\frac{1+n}{2};\frac{3+n}{2};-\frac{\left (x+\sqrt{a+x^2}\right )^2}{a}\right )}{a (1+n)}\\ \end{align*}

Mathematica [A]  time = 0.0249493, size = 61, normalized size = 1.03 \[ \frac{2 \left (\sqrt{a+x^2}+x\right )^{n+1} \, _2F_1\left (1,\frac{n+1}{2};\frac{n+1}{2}+1;-\frac{\left (x+\sqrt{x^2+a}\right )^2}{a}\right )}{a (n+1)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(2*(x + Sqrt[a + x^2])^(1 + n)*Hypergeometric2F1[1, (1 + n)/2, 1 + (1 + n)/2, -((x + Sqrt[a + x^2])^2/a)])/(a*
(1 + n))

________________________________________________________________________________________

Maple [F]  time = 0.019, size = 0, normalized size = 0. \begin{align*} \int{\frac{1}{{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+(x^2+a)^(1/2))^n/(x^2+a),x)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integral((x + sqrt(x^2 + a))^n/(x^2 + a), x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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