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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.06, 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 = {2122, 30} \[ -\frac {\left (x-\sqrt {a+x^2}\right )^n}{n} \]

Antiderivative was successfully verified.

[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 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])

Rubi steps

\begin {align*} \int \frac {\left (x-\sqrt {a+x^2}\right )^n}{\sqrt {a+x^2}} \, dx &=-\operatorname {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]  time = 0.01, size = 20, normalized size = 1.00 \[ -\frac {\left (x-\sqrt {a+x^2}\right )^n}{n} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 18, normalized size = 0.90 \[ -\frac {{\left (x - \sqrt {x^{2} + a}\right )}^{n}}{n} \]

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (x - \sqrt {x^{2} + a}\right )}^{n}}{\sqrt {x^{2} + a}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (x - \sqrt {x^{2} + a}\right )}^{n}}{\sqrt {x^{2} + a}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

mupad [B]  time = 3.19, size = 18, normalized size = 0.90 \[ -\frac {{\left (x-\sqrt {x^2+a}\right )}^n}{n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 1.57, size = 36, normalized size = 1.80 \[ \begin {cases} - \frac {\left (x - \sqrt {a + x^{2}}\right )^{n}}{n} & \text {for}\: n \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} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________