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

Optimal. Leaf size=4 \[ x+\sin ^{-1}(x) \]

[Out]

x + ArcSin[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0428694, antiderivative size = 4, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.136, Rules used = {2156, 8, 216} \[ x+\sin ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

x + ArcSin[x]

Rule 2156

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

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 216

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

Rubi steps

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

Mathematica [A]  time = 0.0588855, size = 4, normalized size = 1. \[ x+\sin ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

x + ArcSin[x]

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 1.43393, size = 51, normalized size = 12.75 \begin{align*} x - 2 \, \arctan \left (\frac{\sqrt{-x^{2} + 1} - 1}{x}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(x**2/(x**2 + sqrt(1 - x**2) - 1), x)

________________________________________________________________________________________

Giac [A]  time = 1.21582, size = 5, normalized size = 1.25 \begin{align*} x + \arcsin \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + arcsin(x)