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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 17 \[ \int \frac {\left (x+\sqrt {a+x^2}\right )^n}{\sqrt {a+x^2}} \, dx=\frac {\left (x+\sqrt {a+x^2}\right )^n}{n} \]

[Out]

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

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {2147, 30} \[ \int \frac {\left (x+\sqrt {a+x^2}\right )^n}{\sqrt {a+x^2}} \, dx=\frac {\left (\sqrt {a+x^2}+x\right )^n}{n} \]

[In]

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

[Out]

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

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2147

Int[((g_) + (i_.)*(x_)^2)^(m_.)*((d_.) + (e_.)*(x_) + (f_.)*Sqrt[(a_) + (c_.)*(x_)^2])^(n_.), x_Symbol] :> Dis
t[(1/(2^(2*m + 1)*e*f^(2*m)))*(i/c)^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])

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int x^{-1+n} \, dx,x,x+\sqrt {a+x^2}\right ) \\ & = \frac {\left (x+\sqrt {a+x^2}\right )^n}{n} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00 \[ \int \frac {\left (x+\sqrt {a+x^2}\right )^n}{\sqrt {a+x^2}} \, dx=\frac {\left (x+\sqrt {a+x^2}\right )^n}{n} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.85 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.94

method result size
derivativedivides \(\frac {\left (x +\sqrt {x^{2}+a}\right )^{n}}{n}\) \(16\)
default \(\frac {\left (x +\sqrt {x^{2}+a}\right )^{n}}{n}\) \(16\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.88 \[ \int \frac {\left (x+\sqrt {a+x^2}\right )^n}{\sqrt {a+x^2}} \, dx=\frac {{\left (x + \sqrt {x^{2} + a}\right )}^{n}}{n} \]

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 311 vs. \(2 (12) = 24\).

Time = 1.51 (sec) , antiderivative size = 311, normalized size of antiderivative = 18.29 \[ \int \frac {\left (x+\sqrt {a+x^2}\right )^n}{\sqrt {a+x^2}} \, dx=\begin {cases} \frac {\sqrt {a} a^{\frac {n}{2}} \sinh {\left (n \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} - \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} \right )}}{n x \sqrt {\frac {a}{x^{2}} + 1}} - \frac {2 a^{\frac {n}{2}} \cosh {\left (n \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} \right )} \Gamma \left (1 - \frac {n}{2}\right )}{n^{2} \Gamma \left (- \frac {n}{2}\right )} + \frac {a^{\frac {n}{2}} x \cosh {\left (n \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} - \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} \right )}}{\sqrt {a} n} + \frac {a^{\frac {n}{2}} x \sinh {\left (n \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} - \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} \right )}}{\sqrt {a} n \sqrt {\frac {a}{x^{2}} + 1}} & \text {for}\: \left |{\frac {x^{2}}{a}}\right | > 1 \\\frac {a^{\frac {n}{2}} \sinh {\left (n \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} - \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} \right )}}{n \sqrt {1 + \frac {x^{2}}{a}}} - \frac {2 a^{\frac {n}{2}} \cosh {\left (n \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} \right )} \Gamma \left (1 - \frac {n}{2}\right )}{n^{2} \Gamma \left (- \frac {n}{2}\right )} + \frac {a^{\frac {n}{2}} x^{2} \sinh {\left (n \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} - \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} \right )}}{a n \sqrt {1 + \frac {x^{2}}{a}}} + \frac {a^{\frac {n}{2}} x \cosh {\left (n \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} - \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} \right )}}{\sqrt {a} n} & \text {otherwise} \end {cases} \]

[In]

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

[Out]

Piecewise((sqrt(a)*a**(n/2)*sinh(n*asinh(x/sqrt(a)) - asinh(x/sqrt(a)))/(n*x*sqrt(a/x**2 + 1)) - 2*a**(n/2)*co
sh(n*asinh(x/sqrt(a)))*gamma(1 - n/2)/(n**2*gamma(-n/2)) + a**(n/2)*x*cosh(n*asinh(x/sqrt(a)) - asinh(x/sqrt(a
)))/(sqrt(a)*n) + a**(n/2)*x*sinh(n*asinh(x/sqrt(a)) - asinh(x/sqrt(a)))/(sqrt(a)*n*sqrt(a/x**2 + 1)), Abs(x**
2/a) > 1), (a**(n/2)*sinh(n*asinh(x/sqrt(a)) - asinh(x/sqrt(a)))/(n*sqrt(1 + x**2/a)) - 2*a**(n/2)*cosh(n*asin
h(x/sqrt(a)))*gamma(1 - n/2)/(n**2*gamma(-n/2)) + a**(n/2)*x**2*sinh(n*asinh(x/sqrt(a)) - asinh(x/sqrt(a)))/(a
*n*sqrt(1 + x**2/a)) + a**(n/2)*x*cosh(n*asinh(x/sqrt(a)) - asinh(x/sqrt(a)))/(sqrt(a)*n), True))

Maxima [F]

\[ \int \frac {\left (x+\sqrt {a+x^2}\right )^n}{\sqrt {a+x^2}} \, dx=\int { \frac {{\left (x + \sqrt {x^{2} + a}\right )}^{n}}{\sqrt {x^{2} + a}} \,d x } \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.88 \[ \int \frac {\left (x+\sqrt {a+x^2}\right )^n}{\sqrt {a+x^2}} \, dx=\frac {{\left (x + \sqrt {x^{2} + a}\right )}^{n}}{n} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 16.97 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.88 \[ \int \frac {\left (x+\sqrt {a+x^2}\right )^n}{\sqrt {a+x^2}} \, dx=\frac {{\left (x+\sqrt {x^2+a}\right )}^n}{n} \]

[In]

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

[Out]

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