3.3.96 \(\int \frac {x}{1-x^2+\sqrt {1-x^2}} \, dx\) [296]

Optimal. Leaf size=16 \[ -\log \left (1+\sqrt {1-x^2}\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {2186, 31} \begin {gather*} -\log \left (\sqrt {1-x^2}+1\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-Log[1 + Sqrt[1 - x^2]]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2186

Int[(x_)^(m_.)/((c_) + (d_.)*(x_)^(n_) + (e_.)*Sqrt[(a_) + (b_.)*(x_)^(n_)]), x_Symbol] :> Dist[1/n, Subst[Int
[x^((m + 1)/n - 1)/(c + d*x + e*Sqrt[a + b*x]), x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && EqQ[b*c
- a*d, 0] && IntegerQ[(m + 1)/n]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 16, normalized size = 1.00 \begin {gather*} -\log \left (1+\sqrt {1-x^2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-Log[1 + Sqrt[1 - x^2]]

________________________________________________________________________________________

Mathics [B] Leaf count is larger than twice the leaf count of optimal. \(54\) vs. \(2(16)=32\).
time = 4.27, size = 44, normalized size = 2.75 \begin {gather*} -\frac {\text {Log}\left [-1+x^2-\sqrt {1-x^2}\right ]}{2}-\frac {\text {Log}\left [1+\sqrt {1-x^2}\right ]}{2}+\frac {\text {Log}\left [1-x^2\right ]}{4} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-Log[-1 + x ^ 2 - Sqrt[1 - x ^ 2]] / 2 - Log[1 + Sqrt[1 - x ^ 2]] / 2 + Log[1 - x ^ 2] / 4

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(58\) vs. \(2(14)=28\).
time = 0.04, size = 59, normalized size = 3.69

method result size
trager \(-\ln \left (1+\sqrt {-x^{2}+1}\right )\) \(15\)
default \(-\ln \left (x \right )-\frac {\sqrt {-\left (1+x \right )^{2}+2 x +2}}{2}-\frac {\sqrt {-\left (-1+x \right )^{2}+2-2 x}}{2}+\sqrt {-x^{2}+1}-\arctanh \left (\frac {1}{\sqrt {-x^{2}+1}}\right )\) \(59\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-ln(x)-1/2*(-(1+x)^2+2*x+2)^(1/2)-1/2*(-(-1+x)^2+2-2*x)^(1/2)+(-x^2+1)^(1/2)-arctanh(1/(-x^2+1)^(1/2))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 14, normalized size = 0.88 \begin {gather*} -\log \left (\sqrt {-x^{2} + 1} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 21, normalized size = 1.31 \begin {gather*} -\log \left (x\right ) + \log \left (\frac {\sqrt {-x^{2} + 1} - 1}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.00, size = 14, normalized size = 0.88 \begin {gather*} -\ln \left (\sqrt {-x^{2}+1}+1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.13, size = 21, normalized size = 1.31 \begin {gather*} \ln \left (\sqrt {\frac {1}{x^2}-1}-\sqrt {\frac {1}{x^2}}\right )-\ln \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log((1/x^2 - 1)^(1/2) - (1/x^2)^(1/2)) - log(x)

________________________________________________________________________________________