3.967 \(\int \frac{x}{x-\sqrt{1+x^2}} \, dx\)

Optimal. Leaf size=21 \[ -\frac{x^3}{3}-\frac{1}{3} \left (x^2+1\right )^{3/2} \]

[Out]

-x^3/3 - (1 + x^2)^(3/2)/3

________________________________________________________________________________________

Rubi [A]  time = 0.0230596, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.176, Rules used = {2106, 30, 261} \[ -\frac{x^3}{3}-\frac{1}{3} \left (x^2+1\right )^{3/2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-x^3/3 - (1 + x^2)^(3/2)/3

Rule 2106

Int[(u_.)/((d_.)*(x_)^(n_.) + (c_.)*Sqrt[(a_.) + (b_.)*(x_)^(p_.)]), x_Symbol] :> -Dist[b/(a*d), Int[u*x^n, x]
, x] + Dist[1/(a*c), Int[u*Sqrt[a + b*x^(2*n)], x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[p, 2*n] && EqQ[b*c^
2 - d^2, 0]

Rule 30

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

Rule 261

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a + b*x^n)^(p + 1)/(b*n*(p + 1)), x] /; FreeQ
[{a, b, m, n, p}, x] && EqQ[m, n - 1] && NeQ[p, -1]

Rubi steps

\begin{align*} \int \frac{x}{x-\sqrt{1+x^2}} \, dx &=-\int x^2 \, dx-\int x \sqrt{1+x^2} \, dx\\ &=-\frac{x^3}{3}-\frac{1}{3} \left (1+x^2\right )^{3/2}\\ \end{align*}

Mathematica [A]  time = 0.0238108, size = 21, normalized size = 1. \[ -\frac{x^3}{3}-\frac{1}{3} \left (x^2+1\right )^{3/2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-x^3/3 - (1 + x^2)^(3/2)/3

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 16, normalized size = 0.8 \begin{align*} -{\frac{{x}^{3}}{3}}-{\frac{1}{3} \left ({x}^{2}+1 \right ) ^{{\frac{3}{2}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/3*x^3-1/3*(x^2+1)^(3/2)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x}{x - \sqrt{x^{2} + 1}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(x/(x - sqrt(x^2 + 1)), x)

________________________________________________________________________________________

Fricas [A]  time = 1.4724, size = 43, normalized size = 2.05 \begin{align*} -\frac{1}{3} \, x^{3} - \frac{1}{3} \,{\left (x^{2} + 1\right )}^{\frac{3}{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/3*x^3 - 1/3*(x^2 + 1)^(3/2)

________________________________________________________________________________________

Sympy [B]  time = 0.359005, size = 56, normalized size = 2.67 \begin{align*} \frac{2 x^{2}}{3 x - 3 \sqrt{x^{2} + 1}} - \frac{x \sqrt{x^{2} + 1}}{3 x - 3 \sqrt{x^{2} + 1}} + \frac{1}{3 x - 3 \sqrt{x^{2} + 1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x**2/(3*x - 3*sqrt(x**2 + 1)) - x*sqrt(x**2 + 1)/(3*x - 3*sqrt(x**2 + 1)) + 1/(3*x - 3*sqrt(x**2 + 1))

________________________________________________________________________________________

Giac [A]  time = 1.20324, size = 20, normalized size = 0.95 \begin{align*} -\frac{1}{3} \, x^{3} - \frac{1}{3} \,{\left (x^{2} + 1\right )}^{\frac{3}{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/3*x^3 - 1/3*(x^2 + 1)^(3/2)