3.2.8 \(\int \frac {-1+x^2}{(1+x^2)^{3/2}} \, dx\) [108]

Optimal. Leaf size=15 \[ -\frac {2 x}{\sqrt {1+x^2}}+\sinh ^{-1}(x) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {393, 221} \begin {gather*} \sinh ^{-1}(x)-\frac {2 x}{\sqrt {x^2+1}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 221

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[Rt[b, 2]*(x/Sqrt[a])]/Rt[b, 2], x] /; FreeQ[{a, b},
 x] && GtQ[a, 0] && PosQ[b]

Rule 393

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(-(b*c - a*d))*x*((a + b*x^n)^(p
 + 1)/(a*b*n*(p + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x]
 /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 25, normalized size = 1.67 \begin {gather*} -\frac {2 x}{\sqrt {1+x^2}}+\tanh ^{-1}\left (\frac {x}{\sqrt {1+x^2}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 14, normalized size = 0.93

method result size
default \(\arcsinh \left (x \right )-\frac {2 x}{\sqrt {x^{2}+1}}\) \(14\)
risch \(\arcsinh \left (x \right )-\frac {2 x}{\sqrt {x^{2}+1}}\) \(14\)
trager \(-\frac {2 x}{\sqrt {x^{2}+1}}+\ln \left (\sqrt {x^{2}+1}+x \right )\) \(22\)
meijerg \(-\frac {x}{\sqrt {x^{2}+1}}+\frac {-\frac {\sqrt {\pi }\, x}{\sqrt {x^{2}+1}}+\sqrt {\pi }\, \arcsinh \left (x \right )}{\sqrt {\pi }}\) \(36\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2-1)/(x^2+1)^(3/2),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 13, normalized size = 0.87 \begin {gather*} -\frac {2 \, x}{\sqrt {x^{2} + 1}} + \operatorname {arsinh}\left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*x/sqrt(x^2 + 1) + arcsinh(x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 44 vs. \(2 (13) = 26\).
time = 0.87, size = 44, normalized size = 2.93 \begin {gather*} -\frac {2 \, x^{2} + {\left (x^{2} + 1\right )} \log \left (-x + \sqrt {x^{2} + 1}\right ) + 2 \, \sqrt {x^{2} + 1} x + 2}{x^{2} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(2*x^2 + (x^2 + 1)*log(-x + sqrt(x^2 + 1)) + 2*sqrt(x^2 + 1)*x + 2)/(x^2 + 1)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 31 vs. \(2 (14) = 28\).
time = 2.34, size = 31, normalized size = 2.07 \begin {gather*} \frac {x^{2} \operatorname {asinh}{\left (x \right )}}{x^{2} + 1} - \frac {2 x}{\sqrt {x^{2} + 1}} + \frac {\operatorname {asinh}{\left (x \right )}}{x^{2} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.58, size = 25, normalized size = 1.67 \begin {gather*} -\frac {2 \, x}{\sqrt {x^{2} + 1}} - \log \left (-x + \sqrt {x^{2} + 1}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*x/sqrt(x^2 + 1) - log(-x + sqrt(x^2 + 1))

________________________________________________________________________________________

Mupad [B]
time = 0.04, size = 27, normalized size = 1.80 \begin {gather*} \frac {\mathrm {asinh}\left (x\right )+x^2\,\mathrm {asinh}\left (x\right )-2\,x\,\sqrt {x^2+1}}{x^2+1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________