3.1.20 \(\int \frac {(x-\sqrt {a+x^2})^b}{\sqrt {a+x^2}} \, dx\) [20]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {2147, 30} \begin {gather*} -\frac {\left (x-\sqrt {a+x^2}\right )^b}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Mathics [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
time = 2.56, size = 52, normalized size = 2.60 \begin {gather*} \text {Piecewise}\left [\left \{\left \{-\frac {{\left (x-\sqrt {a+x^2}\right )}^b}{b},b\text {!=}0\right \}\right \},\text {Piecewise}\left [\left \{\left \{\text {ArcSinh}\left [x \sqrt {\frac {1}{a}}\right ],a>0\right \},\left \{\text {ArcCosh}\left [x \sqrt {-\frac {1}{a}}\right ],a<0\right \}\right \}\right ]\right ] \end {gather*}

Warning: Unable to verify antiderivative.

[In]

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

[Out]

Piecewise[{{-(x - Sqrt[a + x ^ 2]) ^ b / b, b != 0}}, Piecewise[{{ArcSinh[x Sqrt[1 / a]], a > 0}, {ArcCosh[x S
qrt[-1 / a]], a < 0}}]]

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

int((x-(x^2+a)^(1/2))^b/(x^2+a)^(1/2),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^2+a)^(1/2),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.76, size = 36, normalized size = 1.80 \begin {gather*} \begin {cases} - \frac {\left (x - \sqrt {a + x^{2}}\right )^{b}}{b} & \text {for}\: b \neq 0 \\\begin {cases} \operatorname {asinh}{\left (x \sqrt {\frac {1}{a}} \right )} & \text {for}\: a > 0 \\\operatorname {acosh}{\left (x \sqrt {- \frac {1}{a}} \right )} & \text {for}\: a < 0 \end {cases} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((-(x - sqrt(a + x**2))**b/b, Ne(b, 0)), (Piecewise((asinh(x*sqrt(1/a)), a > 0), (acosh(x*sqrt(-1/a))
, a < 0)), True))

________________________________________________________________________________________

Giac [A]
time = 0.00, size = 18, normalized size = 0.90 \begin {gather*} -\frac {\left (x-\sqrt {a+x^{2}}\right )^{b}}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.30, size = 18, normalized size = 0.90 \begin {gather*} -\frac {{\left (x-\sqrt {x^2+a}\right )}^b}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________