### 3.296 $$\int \frac{x}{1-x^2+\sqrt{1-x^2}} \, dx$$

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.04629, antiderivative size = 16, normalized size of antiderivative = 1., 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 = {2155, 31} $-\log \left (\sqrt{1-x^2}+1\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 2155

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]

Rule 31

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

Rubi steps

\begin{align*} \int \frac{x}{1-x^2+\sqrt{1-x^2}} \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1+\sqrt{1-x}-x} \, dx,x,x^2\right )\\ &=-\operatorname{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.0302715, size = 16, normalized size = 1. $-\log \left (\sqrt{1-x^2}+1\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.016, size = 59, normalized size = 3.7 \begin{align*} -\ln \left ( x \right ) +\sqrt{-{x}^{2}+1}-{\it Artanh} \left ({\frac{1}{\sqrt{-{x}^{2}+1}}} \right ) -{\frac{1}{2}\sqrt{- \left ( 1+x \right ) ^{2}+2+2\,x}}-{\frac{1}{2}\sqrt{- \left ( -1+x \right ) ^{2}+2-2\,x}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.928118, size = 19, normalized size = 1.19 \begin{align*} -\log \left (\sqrt{-x^{2} + 1} + 1\right ) \end{align*}

Veriﬁcation 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 = 2.02024, size = 53, normalized size = 3.31 \begin{align*} -\log \left (x\right ) + \log \left (\frac{\sqrt{-x^{2} + 1} - 1}{x}\right ) \end{align*}

Veriﬁcation 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]  time = 2.74743, size = 44, normalized size = 2.75 \begin{align*} \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{align*}

Veriﬁcation 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 = 1.05177, size = 19, normalized size = 1.19 \begin{align*} -\log \left (\sqrt{-x^{2} + 1} + 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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