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

Optimal. Leaf size=56 \[ -\frac {a \left (x-\sqrt {a+x^2}\right )^{-1+b}}{2 (1-b)}+\frac {\left (x-\sqrt {a+x^2}\right )^{1+b}}{2 (1+b)} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2142, 14} \begin {gather*} \frac {\left (x-\sqrt {a+x^2}\right )^{b+1}}{2 (b+1)}-\frac {a \left (x-\sqrt {a+x^2}\right )^{b-1}}{2 (1-b)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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*} \int \left (x-\sqrt {a+x^2}\right )^b \, dx &=\frac {1}{2} \text {Subst}\left (\int x^{-2+b} \left (a+x^2\right ) \, dx,x,x-\sqrt {a+x^2}\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \left (a x^{-2+b}+x^b\right ) \, dx,x,x-\sqrt {a+x^2}\right )\\ &=-\frac {a \left (x-\sqrt {a+x^2}\right )^{-1+b}}{2 (1-b)}+\frac {\left (x-\sqrt {a+x^2}\right )^{1+b}}{2 (1+b)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.14, size = 50, normalized size = 0.89 \begin {gather*} \frac {1}{2} \left (x-\sqrt {a+x^2}\right )^{-1+b} \left (\frac {a}{-1+b}+\frac {\left (x-\sqrt {a+x^2}\right )^2}{1+b}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Mathics [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {cought exception: maximum recursion depth exceeded} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

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

[Out]

cought exception: maximum recursion depth exceeded

________________________________________________________________________________________

Maple [F]
time = 0.02, size = 0, normalized size = 0.00 \[\int \left (x -\sqrt {x^{2}+a}\right )^{b}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.32, size = 33, normalized size = 0.59 \begin {gather*} -\frac {{\left (\sqrt {x^{2} + a} b + x\right )} {\left (x - \sqrt {x^{2} + a}\right )}^{b}}{b^{2} - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral((x - sqrt(a + x**2))**b, x)

________________________________________________________________________________________

Giac [F] N/A
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x-(x^2+a)^(1/2))^b,x)

[Out]

Could not integrate

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int {\left (x-\sqrt {x^2+a}\right )}^b \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________