\(\int (x+\sqrt {b+x^2})^a \, dx\) [31]

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

Optimal result

Integrand size = 13, antiderivative size = 52 \[ \int \left (x+\sqrt {b+x^2}\right )^a \, dx=-\frac {b \left (x+\sqrt {b+x^2}\right )^{-1+a}}{2 (1-a)}+\frac {\left (x+\sqrt {b+x^2}\right )^{1+a}}{2 (1+a)} \]

[Out]

-1/2*b*(x+(x^2+b)^(1/2))^(-1+a)/(1-a)+1/2*(x+(x^2+b)^(1/2))^(1+a)/(1+a)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2142, 14} \[ \int \left (x+\sqrt {b+x^2}\right )^a \, dx=\frac {\left (\sqrt {b+x^2}+x\right )^{a+1}}{2 (a+1)}-\frac {b \left (\sqrt {b+x^2}+x\right )^{a-1}}{2 (1-a)} \]

[In]

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

[Out]

-1/2*(b*(x + Sqrt[b + x^2])^(-1 + a))/(1 - a) + (x + Sqrt[b + x^2])^(1 + a)/(2*(1 + a))

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2142

Int[((g_.) + (h_.)*((d_.) + (e_.)*(x_) + (f_.)*Sqrt[(a_) + (c_.)*(x_)^2])^(n_))^(p_.), x_Symbol] :> Dist[1/(2*
e), Subst[Int[(g + h*x^n)^p*((d^2 + a*f^2 - 2*d*x + x^2)/(d - x)^2), x], x, d + e*x + f*Sqrt[a + c*x^2]], x] /
; FreeQ[{a, c, d, e, f, g, h, n}, x] && EqQ[e^2 - c*f^2, 0] && IntegerQ[p]

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

Mathematica [A] (verified)

Time = 0.21 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.88 \[ \int \left (x+\sqrt {b+x^2}\right )^a \, dx=\frac {1}{2} \left (x+\sqrt {b+x^2}\right )^{-1+a} \left (\frac {b}{-1+a}+\frac {\left (x+\sqrt {b+x^2}\right )^2}{1+a}\right ) \]

[In]

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

[Out]

((x + Sqrt[b + x^2])^(-1 + a)*(b/(-1 + a) + (x + Sqrt[b + x^2])^2/(1 + a)))/2

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(119\) vs. \(2(44)=88\).

Time = 0.04 (sec) , antiderivative size = 120, normalized size of antiderivative = 2.31

method result size
meijerg \(\frac {b^{\frac {a}{2}+\frac {1}{2}} a \left (\frac {8 \sqrt {\pi }\, x^{1+a} b^{-\frac {a}{2}-\frac {1}{2}} \left (\frac {a b}{x^{2}}+a -1\right ) {\left (\sqrt {1+\frac {b}{x^{2}}}+1\right )}^{a -1}}{\left (1+a \right ) a \left (2 a -2\right )}+\frac {4 \sqrt {\pi }\, x^{1+a} b^{-\frac {a}{2}-\frac {1}{2}} \sqrt {1+\frac {b}{x^{2}}}\, {\left (\sqrt {1+\frac {b}{x^{2}}}+1\right )}^{a -1}}{\left (1+a \right ) a}\right )}{4 \sqrt {\pi }}\) \(120\)

[In]

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

[Out]

1/4*b^(1/2*a+1/2)/Pi^(1/2)*a*(8*Pi^(1/2)/(1+a)/a*x^(1+a)*b^(-1/2*a-1/2)*(a*b/x^2+a-1)/(2*a-2)*((1+1/x^2*b)^(1/
2)+1)^(a-1)+4*Pi^(1/2)/(1+a)/a*x^(1+a)*b^(-1/2*a-1/2)*(1+1/x^2*b)^(1/2)*((1+1/x^2*b)^(1/2)+1)^(a-1))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.62 \[ \int \left (x+\sqrt {b+x^2}\right )^a \, dx=\frac {{\left (\sqrt {x^{2} + b} a - x\right )} {\left (x + \sqrt {x^{2} + b}\right )}^{a}}{a^{2} - 1} \]

[In]

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

[Out]

(sqrt(x^2 + b)*a - x)*(x + sqrt(x^2 + b))^a/(a^2 - 1)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2236 vs. \(2 (37) = 74\).

Time = 1.27 (sec) , antiderivative size = 2236, normalized size of antiderivative = 43.00 \[ \int \left (x+\sqrt {b+x^2}\right )^a \, dx=\text {Too large to display} \]

[In]

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

[Out]

Piecewise((-a**2*b**4*b**(a/2 + 1/2)*x*sqrt(b/x**2 + 1)*sinh(a*asinh(x/sqrt(b)))*gamma(-a/2)/(2*a**2*b**(9/2)*
gamma(1 - a/2) + 2*a**2*b**(7/2)*x**2*gamma(1 - a/2) - 2*b**(9/2)*gamma(1 - a/2) - 2*b**(7/2)*x**2*gamma(1 - a
/2)) - a**2*b**3*b**(a/2 + 1/2)*x**3*sqrt(b/x**2 + 1)*sinh(a*asinh(x/sqrt(b)))*gamma(-a/2)/(2*a**2*b**(9/2)*ga
mma(1 - a/2) + 2*a**2*b**(7/2)*x**2*gamma(1 - a/2) - 2*b**(9/2)*gamma(1 - a/2) - 2*b**(7/2)*x**2*gamma(1 - a/2
)) + 2*a*b**(9/2)*b**(a/2 + 1/2)*cosh(a*asinh(x/sqrt(b)) + asinh(x/sqrt(b)))*gamma(1 - a/2)/(2*a**2*b**(9/2)*g
amma(1 - a/2) + 2*a**2*b**(7/2)*x**2*gamma(1 - a/2) - 2*b**(9/2)*gamma(1 - a/2) - 2*b**(7/2)*x**2*gamma(1 - a/
2)) - 2*a*b**(9/2)*b**(a/2 + 1/2)*gamma(1 - a/2)/(2*a**2*b**(9/2)*gamma(1 - a/2) + 2*a**2*b**(7/2)*x**2*gamma(
1 - a/2) - 2*b**(9/2)*gamma(1 - a/2) - 2*b**(7/2)*x**2*gamma(1 - a/2)) - 2*a*b**(7/2)*b**(a/2 + 1/2)*x**2*sqrt
(b/x**2 + 1)*sinh(a*asinh(x/sqrt(b)) + asinh(x/sqrt(b)))*gamma(1 - a/2)/(2*a**2*b**(9/2)*gamma(1 - a/2) + 2*a*
*2*b**(7/2)*x**2*gamma(1 - a/2) - 2*b**(9/2)*gamma(1 - a/2) - 2*b**(7/2)*x**2*gamma(1 - a/2)) + 4*a*b**(7/2)*b
**(a/2 + 1/2)*x**2*cosh(a*asinh(x/sqrt(b)) + asinh(x/sqrt(b)))*gamma(1 - a/2)/(2*a**2*b**(9/2)*gamma(1 - a/2)
+ 2*a**2*b**(7/2)*x**2*gamma(1 - a/2) - 2*b**(9/2)*gamma(1 - a/2) - 2*b**(7/2)*x**2*gamma(1 - a/2)) - 2*a*b**(
7/2)*b**(a/2 + 1/2)*x**2*gamma(1 - a/2)/(2*a**2*b**(9/2)*gamma(1 - a/2) + 2*a**2*b**(7/2)*x**2*gamma(1 - a/2)
- 2*b**(9/2)*gamma(1 - a/2) - 2*b**(7/2)*x**2*gamma(1 - a/2)) - 2*a*b**(5/2)*b**(a/2 + 1/2)*x**4*sqrt(b/x**2 +
 1)*sinh(a*asinh(x/sqrt(b)) + asinh(x/sqrt(b)))*gamma(1 - a/2)/(2*a**2*b**(9/2)*gamma(1 - a/2) + 2*a**2*b**(7/
2)*x**2*gamma(1 - a/2) - 2*b**(9/2)*gamma(1 - a/2) - 2*b**(7/2)*x**2*gamma(1 - a/2)) + 2*a*b**(5/2)*b**(a/2 +
1/2)*x**4*cosh(a*asinh(x/sqrt(b)) + asinh(x/sqrt(b)))*gamma(1 - a/2)/(2*a**2*b**(9/2)*gamma(1 - a/2) + 2*a**2*
b**(7/2)*x**2*gamma(1 - a/2) - 2*b**(9/2)*gamma(1 - a/2) - 2*b**(7/2)*x**2*gamma(1 - a/2)) + a*b**4*b**(a/2 +
1/2)*x*cosh(a*asinh(x/sqrt(b)))*gamma(-a/2)/(2*a**2*b**(9/2)*gamma(1 - a/2) + 2*a**2*b**(7/2)*x**2*gamma(1 - a
/2) - 2*b**(9/2)*gamma(1 - a/2) - 2*b**(7/2)*x**2*gamma(1 - a/2)) + a*b**3*b**(a/2 + 1/2)*x**3*cosh(a*asinh(x/
sqrt(b)))*gamma(-a/2)/(2*a**2*b**(9/2)*gamma(1 - a/2) + 2*a**2*b**(7/2)*x**2*gamma(1 - a/2) - 2*b**(9/2)*gamma
(1 - a/2) - 2*b**(7/2)*x**2*gamma(1 - a/2)) - 2*b**(7/2)*b**(a/2 + 1/2)*x**2*sqrt(b/x**2 + 1)*sinh(a*asinh(x/s
qrt(b)) + asinh(x/sqrt(b)))*gamma(1 - a/2)/(2*a**2*b**(9/2)*gamma(1 - a/2) + 2*a**2*b**(7/2)*x**2*gamma(1 - a/
2) - 2*b**(9/2)*gamma(1 - a/2) - 2*b**(7/2)*x**2*gamma(1 - a/2)) + 2*b**(7/2)*b**(a/2 + 1/2)*x**2*cosh(a*asinh
(x/sqrt(b)) + asinh(x/sqrt(b)))*gamma(1 - a/2)/(2*a**2*b**(9/2)*gamma(1 - a/2) + 2*a**2*b**(7/2)*x**2*gamma(1
- a/2) - 2*b**(9/2)*gamma(1 - a/2) - 2*b**(7/2)*x**2*gamma(1 - a/2)) - 2*b**(5/2)*b**(a/2 + 1/2)*x**4*sqrt(b/x
**2 + 1)*sinh(a*asinh(x/sqrt(b)) + asinh(x/sqrt(b)))*gamma(1 - a/2)/(2*a**2*b**(9/2)*gamma(1 - a/2) + 2*a**2*b
**(7/2)*x**2*gamma(1 - a/2) - 2*b**(9/2)*gamma(1 - a/2) - 2*b**(7/2)*x**2*gamma(1 - a/2)) + 2*b**(5/2)*b**(a/2
 + 1/2)*x**4*cosh(a*asinh(x/sqrt(b)) + asinh(x/sqrt(b)))*gamma(1 - a/2)/(2*a**2*b**(9/2)*gamma(1 - a/2) + 2*a*
*2*b**(7/2)*x**2*gamma(1 - a/2) - 2*b**(9/2)*gamma(1 - a/2) - 2*b**(7/2)*x**2*gamma(1 - a/2)), Abs(x**2/b) > 1
), (-a**2*b**(5/2)*b**(a/2 + 1/2)*sqrt(1 + x**2/b)*sinh(a*asinh(x/sqrt(b)))*gamma(-a/2)/(2*a**2*b**(5/2)*gamma
(1 - a/2) - 2*b**(5/2)*gamma(1 - a/2)) + 2*a*b**(5/2)*b**(a/2 + 1/2)*cosh(a*asinh(x/sqrt(b)) + asinh(x/sqrt(b)
))*gamma(1 - a/2)/(2*a**2*b**(5/2)*gamma(1 - a/2) - 2*b**(5/2)*gamma(1 - a/2)) + 2*a*b**(3/2)*b**(a/2 + 1/2)*x
**2*cosh(a*asinh(x/sqrt(b)) + asinh(x/sqrt(b)))*gamma(1 - a/2)/(2*a**2*b**(5/2)*gamma(1 - a/2) - 2*b**(5/2)*ga
mma(1 - a/2)) - 2*a*b**2*b**(a/2 + 1/2)*x*sqrt(1 + x**2/b)*sinh(a*asinh(x/sqrt(b)) + asinh(x/sqrt(b)))*gamma(1
 - a/2)/(2*a**2*b**(5/2)*gamma(1 - a/2) - 2*b**(5/2)*gamma(1 - a/2)) + a*b**2*b**(a/2 + 1/2)*x*cosh(a*asinh(x/
sqrt(b)))*gamma(-a/2)/(2*a**2*b**(5/2)*gamma(1 - a/2) - 2*b**(5/2)*gamma(1 - a/2)) + 2*b**(3/2)*b**(a/2 + 1/2)
*x**2*cosh(a*asinh(x/sqrt(b)) + asinh(x/sqrt(b)))*gamma(1 - a/2)/(2*a**2*b**(5/2)*gamma(1 - a/2) - 2*b**(5/2)*
gamma(1 - a/2)) - 2*b**2*b**(a/2 + 1/2)*x*sqrt(1 + x**2/b)*sinh(a*asinh(x/sqrt(b)) + asinh(x/sqrt(b)))*gamma(1
 - a/2)/(2*a**2*b**(5/2)*gamma(1 - a/2) - 2*b**(5/2)*gamma(1 - a/2)), True))

Maxima [F]

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

[In]

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

[Out]

integrate((x + sqrt(x^2 + b))^a, x)

Giac [F]

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

[In]

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

[Out]

integrate((x + sqrt(x^2 + b))^a, x)

Mupad [F(-1)]

Timed out. \[ \int \left (x+\sqrt {b+x^2}\right )^a \, dx=\int {\left (x+\sqrt {x^2+b}\right )}^a \,d x \]

[In]

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

[Out]

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