3.11.22 \(\int \frac {x \sqrt {1-x^2}}{x-x^3+\sqrt {1-x^2}} \, dx\) [1022]

3.11.22.1 Optimal result
3.11.22.2 Mathematica [C] (verified)
3.11.22.3 Rubi [C] (verified)
3.11.22.4 Maple [C] (verified)
3.11.22.5 Fricas [A] (verification not implemented)
3.11.22.6 Sympy [F]
3.11.22.7 Maxima [F]
3.11.22.8 Giac [B] (verification not implemented)
3.11.22.9 Mupad [B] (verification not implemented)

3.11.22.1 Optimal result

Integrand size = 33, antiderivative size = 42 \[ \int \frac {x \sqrt {1-x^2}}{x-x^3+\sqrt {1-x^2}} \, dx=\arcsin (x)-\frac {\arctan \left (\frac {1+4 x \sqrt {1-x^2}}{\sqrt {3} \left (1-2 x^2\right )}\right )}{\sqrt {3}} \]

output
arcsin(x)-1/3*arctan(1/3*(1+4*x*(-x^2+1)^(1/2))*3^(1/2)/(-2*x^2+1))*3^(1/2 
)
 
3.11.22.2 Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.

Time = 0.07 (sec) , antiderivative size = 129, normalized size of antiderivative = 3.07 \[ \int \frac {x \sqrt {1-x^2}}{x-x^3+\sqrt {1-x^2}} \, dx=-2 \arctan \left (\frac {\sqrt {1-x^2}}{1+x}\right )+\text {RootSum}\left [1+2 \text {$\#$1}+2 \text {$\#$1}^2-2 \text {$\#$1}^3+\text {$\#$1}^4\&,\frac {-\log (-1+x)+\log \left (\sqrt {1-x^2}+\text {$\#$1}-x \text {$\#$1}\right )-\log (-1+x) \text {$\#$1}^2+\log \left (\sqrt {1-x^2}+\text {$\#$1}-x \text {$\#$1}\right ) \text {$\#$1}^2}{1+2 \text {$\#$1}-3 \text {$\#$1}^2+2 \text {$\#$1}^3}\&\right ] \]

input
Integrate[(x*Sqrt[1 - x^2])/(x - x^3 + Sqrt[1 - x^2]),x]
 
output
-2*ArcTan[Sqrt[1 - x^2]/(1 + x)] + RootSum[1 + 2*#1 + 2*#1^2 - 2*#1^3 + #1 
^4 & , (-Log[-1 + x] + Log[Sqrt[1 - x^2] + #1 - x*#1] - Log[-1 + x]*#1^2 + 
 Log[Sqrt[1 - x^2] + #1 - x*#1]*#1^2)/(1 + 2*#1 - 3*#1^2 + 2*#1^3) & ]
 
3.11.22.3 Rubi [C] (verified)

Result contains complex when optimal does not.

Time = 0.56 (sec) , antiderivative size = 149, normalized size of antiderivative = 3.55, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.061, Rules used = {7293, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

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

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (-\frac {\sqrt {1-x^2} x^2}{x^4-x^2+1}+\frac {\left (1-x^2\right ) x^3}{x^4-x^2+1}+\frac {x-1}{2}+\frac {x+1}{2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \arcsin (x)-\frac {\arctan \left (\frac {1-2 x^2}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {\arctan \left (\frac {x}{\sqrt {-\frac {-\sqrt {3}+i}{\sqrt {3}+i}} \sqrt {1-x^2}}\right )}{\sqrt {3}}-\frac {\arctan \left (\frac {\sqrt {-\frac {-\sqrt {3}+i}{\sqrt {3}+i}} x}{\sqrt {1-x^2}}\right )}{\sqrt {3}}-\frac {x^2}{2}+\frac {1}{4} (1-x)^2+\frac {1}{4} (x+1)^2\)

input
Int[(x*Sqrt[1 - x^2])/(x - x^3 + Sqrt[1 - x^2]),x]
 
output
(1 - x)^2/4 - x^2/2 + (1 + x)^2/4 + ArcSin[x] - ArcTan[(1 - 2*x^2)/Sqrt[3] 
]/Sqrt[3] - ArcTan[x/(Sqrt[-((I - Sqrt[3])/(I + Sqrt[3]))]*Sqrt[1 - x^2])] 
/Sqrt[3] - ArcTan[(Sqrt[-((I - Sqrt[3])/(I + Sqrt[3]))]*x)/Sqrt[1 - x^2]]/ 
Sqrt[3]
 

3.11.22.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
3.11.22.4 Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 1.07 (sec) , antiderivative size = 89, normalized size of antiderivative = 2.12

method result size
trager \(\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \sqrt {-x^{2}+1}+x \right )+\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+3\right ) \ln \left (\frac {2 \operatorname {RootOf}\left (\textit {\_Z}^{2}+3\right ) x^{2}+3 x \sqrt {-x^{2}+1}-\operatorname {RootOf}\left (\textit {\_Z}^{2}+3\right )}{\operatorname {RootOf}\left (\textit {\_Z}^{2}+3\right ) x^{2}-x^{2}+2}\right )}{3}\) \(89\)
default \(\frac {\sqrt {3}\, \arctan \left (\frac {\left (2 x^{2}-1\right ) \sqrt {3}}{3}\right )}{3}+\left (\frac {1}{4}+\frac {i \sqrt {3}}{12}\right ) \ln \left (\frac {\left (\sqrt {-x^{2}+1}-1\right )^{2}}{x^{2}}+\frac {\left (-1+i \sqrt {3}\right ) \left (\sqrt {-x^{2}+1}-1\right )}{x}-1\right )+\left (-\frac {i \sqrt {3}}{12}+\frac {1}{4}\right ) \ln \left (\frac {\left (\sqrt {-x^{2}+1}-1\right )^{2}}{x^{2}}+\frac {\left (-1-i \sqrt {3}\right ) \left (\sqrt {-x^{2}+1}-1\right )}{x}-1\right )+\left (-\frac {1}{4}+\frac {i \sqrt {3}}{12}\right ) \ln \left (\frac {\left (\sqrt {-x^{2}+1}-1\right )^{2}}{x^{2}}+\frac {\left (1+i \sqrt {3}\right ) \left (\sqrt {-x^{2}+1}-1\right )}{x}-1\right )+\left (-\frac {1}{4}-\frac {i \sqrt {3}}{12}\right ) \ln \left (\frac {\left (\sqrt {-x^{2}+1}-1\right )^{2}}{x^{2}}+\frac {\left (1-i \sqrt {3}\right ) \left (\sqrt {-x^{2}+1}-1\right )}{x}-1\right )-\left (\frac {1}{4}+\frac {i \sqrt {3}}{12}\right ) \ln \left (\frac {\left (\sqrt {-x^{2}+1}-1\right )^{2}}{x^{2}}+\frac {\left (-1-i \sqrt {3}\right ) \left (\sqrt {-x^{2}+1}-1\right )}{x}-1\right )-\left (-\frac {i \sqrt {3}}{12}+\frac {1}{4}\right ) \ln \left (\frac {\left (\sqrt {-x^{2}+1}-1\right )^{2}}{x^{2}}+\frac {\left (-1+i \sqrt {3}\right ) \left (\sqrt {-x^{2}+1}-1\right )}{x}-1\right )+\left (\frac {1}{4}+\frac {i \sqrt {3}}{12}\right ) \ln \left (\frac {\left (\sqrt {-x^{2}+1}-1\right )^{2}}{x^{2}}+\frac {\left (1+i \sqrt {3}\right ) \left (\sqrt {-x^{2}+1}-1\right )}{x}-1\right )+\left (-\frac {i \sqrt {3}}{12}+\frac {1}{4}\right ) \ln \left (\frac {\left (\sqrt {-x^{2}+1}-1\right )^{2}}{x^{2}}+\frac {\left (1-i \sqrt {3}\right ) \left (\sqrt {-x^{2}+1}-1\right )}{x}-1\right )-2 \arctan \left (\frac {\sqrt {-x^{2}+1}-1}{x}\right )\) \(456\)

input
int(x*(-x^2+1)^(1/2)/(x-x^3+(-x^2+1)^(1/2)),x,method=_RETURNVERBOSE)
 
output
RootOf(_Z^2+1)*ln(RootOf(_Z^2+1)*(-x^2+1)^(1/2)+x)+1/3*RootOf(_Z^2+3)*ln(( 
2*RootOf(_Z^2+3)*x^2+3*x*(-x^2+1)^(1/2)-RootOf(_Z^2+3))/(RootOf(_Z^2+3)*x^ 
2-x^2+2))
 
3.11.22.5 Fricas [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.74 \[ \int \frac {x \sqrt {1-x^2}}{x-x^3+\sqrt {1-x^2}} \, dx=\frac {1}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x^{2} - 1\right )}\right ) + \frac {1}{3} \, \sqrt {3} \arctan \left (\frac {\sqrt {3} {\left (2 \, x^{2} - 1\right )} \sqrt {-x^{2} + 1}}{3 \, {\left (x^{3} - x\right )}}\right ) - 2 \, \arctan \left (\frac {\sqrt {-x^{2} + 1} - 1}{x}\right ) \]

input
integrate(x*(-x^2+1)^(1/2)/(x-x^3+(-x^2+1)^(1/2)),x, algorithm="fricas")
 
output
1/3*sqrt(3)*arctan(1/3*sqrt(3)*(2*x^2 - 1)) + 1/3*sqrt(3)*arctan(1/3*sqrt( 
3)*(2*x^2 - 1)*sqrt(-x^2 + 1)/(x^3 - x)) - 2*arctan((sqrt(-x^2 + 1) - 1)/x 
)
 
3.11.22.6 Sympy [F]

\[ \int \frac {x \sqrt {1-x^2}}{x-x^3+\sqrt {1-x^2}} \, dx=- \int \frac {x \sqrt {1 - x^{2}}}{x^{3} - x - \sqrt {1 - x^{2}}}\, dx \]

input
integrate(x*(-x**2+1)**(1/2)/(x-x**3+(-x**2+1)**(1/2)),x)
 
output
-Integral(x*sqrt(1 - x**2)/(x**3 - x - sqrt(1 - x**2)), x)
 
3.11.22.7 Maxima [F]

\[ \int \frac {x \sqrt {1-x^2}}{x-x^3+\sqrt {1-x^2}} \, dx=\int { -\frac {\sqrt {-x^{2} + 1} x}{x^{3} - x - \sqrt {-x^{2} + 1}} \,d x } \]

input
integrate(x*(-x^2+1)^(1/2)/(x-x^3+(-x^2+1)^(1/2)),x, algorithm="maxima")
 
output
1/2*x^2 + integrate(-(x^4 - x^2)/(x^3 - x - sqrt(x + 1)*sqrt(-x + 1)), x)
 
3.11.22.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 193 vs. \(2 (37) = 74\).

Time = 0.35 (sec) , antiderivative size = 193, normalized size of antiderivative = 4.60 \[ \int \frac {x \sqrt {1-x^2}}{x-x^3+\sqrt {1-x^2}} \, dx=\frac {1}{2} \, \pi \mathrm {sgn}\left (x\right ) - \frac {1}{6} \, \sqrt {3} {\left (\pi \mathrm {sgn}\left (x\right ) + 2 \, \arctan \left (-\frac {\sqrt {3} x {\left (\frac {\sqrt {-x^{2} + 1} - 1}{x} + \frac {{\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} - 1\right )}}{3 \, {\left (\sqrt {-x^{2} + 1} - 1\right )}}\right )\right )} - \frac {1}{6} \, \sqrt {3} {\left (\pi \mathrm {sgn}\left (x\right ) + 2 \, \arctan \left (\frac {\sqrt {3} x {\left (\frac {\sqrt {-x^{2} + 1} - 1}{x} - \frac {{\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} + 1\right )}}{3 \, {\left (\sqrt {-x^{2} + 1} - 1\right )}}\right )\right )} + \frac {1}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x^{2} - 1\right )}\right ) + \arctan \left (-\frac {x {\left (\frac {{\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} - 1\right )}}{2 \, {\left (\sqrt {-x^{2} + 1} - 1\right )}}\right ) \]

input
integrate(x*(-x^2+1)^(1/2)/(x-x^3+(-x^2+1)^(1/2)),x, algorithm="giac")
 
output
1/2*pi*sgn(x) - 1/6*sqrt(3)*(pi*sgn(x) + 2*arctan(-1/3*sqrt(3)*x*((sqrt(-x 
^2 + 1) - 1)/x + (sqrt(-x^2 + 1) - 1)^2/x^2 - 1)/(sqrt(-x^2 + 1) - 1))) - 
1/6*sqrt(3)*(pi*sgn(x) + 2*arctan(1/3*sqrt(3)*x*((sqrt(-x^2 + 1) - 1)/x - 
(sqrt(-x^2 + 1) - 1)^2/x^2 + 1)/(sqrt(-x^2 + 1) - 1))) + 1/3*sqrt(3)*arcta 
n(1/3*sqrt(3)*(2*x^2 - 1)) + arctan(-1/2*x*((sqrt(-x^2 + 1) - 1)^2/x^2 - 1 
)/(sqrt(-x^2 + 1) - 1))
 
3.11.22.9 Mupad [B] (verification not implemented)

Time = 0.51 (sec) , antiderivative size = 549, normalized size of antiderivative = 13.07 \[ \int \frac {x \sqrt {1-x^2}}{x-x^3+\sqrt {1-x^2}} \, dx=\mathrm {asin}\left (x\right )-\frac {\ln \left (\frac {\frac {\left (x\,\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )-1\right )\,1{}\mathrm {i}}{\sqrt {1-{\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}^2}}-\sqrt {1-x^2}\,1{}\mathrm {i}}{\frac {\sqrt {3}}{2}-x+\frac {1}{2}{}\mathrm {i}}\right )}{\sqrt {1-{\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}^2}\,\left (\sqrt {3}-4\,{\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}^3+1{}\mathrm {i}\right )}+\frac {\ln \left (\frac {\frac {\left (x\,\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )-1\right )\,1{}\mathrm {i}}{\sqrt {1-{\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}^2}}-\sqrt {1-x^2}\,1{}\mathrm {i}}{x-\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}}\right )}{\sqrt {1-{\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}^2}\,\left (-\sqrt {3}+4\,{\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}^3+1{}\mathrm {i}\right )}-\frac {\ln \left (\frac {\frac {\left (x\,\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )+1\right )\,1{}\mathrm {i}}{\sqrt {1-{\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}^2}}+\sqrt {1-x^2}\,1{}\mathrm {i}}{x+\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}}\right )}{\sqrt {1-{\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}^2}\,\left (-\sqrt {3}+4\,{\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}^3+1{}\mathrm {i}\right )}-\frac {\ln \left (x-\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )\,\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}{\sqrt {3}-4\,{\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}^3+1{}\mathrm {i}}-\frac {\ln \left (x+\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )\,\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}{\sqrt {3}-4\,{\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}^3+1{}\mathrm {i}}+\frac {\ln \left (\frac {\frac {\left (x\,\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )+1\right )\,1{}\mathrm {i}}{\sqrt {1-{\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}^2}}+\sqrt {1-x^2}\,1{}\mathrm {i}}{x+\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}}\right )}{\sqrt {1-{\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}^2}\,\left (\sqrt {3}-4\,{\left (\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )}^3+1{}\mathrm {i}\right )}+\frac {\ln \left (x-\frac {\sqrt {3}}{2}+\frac {1}{2}{}\mathrm {i}\right )\,\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}{-\sqrt {3}+4\,{\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}^3+1{}\mathrm {i}}+\frac {\ln \left (x+\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )\,\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}{-\sqrt {3}+4\,{\left (\frac {\sqrt {3}}{2}-\frac {1}{2}{}\mathrm {i}\right )}^3+1{}\mathrm {i}} \]

input
int((x*(1 - x^2)^(1/2))/(x - x^3 + (1 - x^2)^(1/2)),x)
 
output
asin(x) - log((((x*(3^(1/2)/2 + 1i/2) - 1)*1i)/(1 - (3^(1/2)/2 + 1i/2)^2)^ 
(1/2) - (1 - x^2)^(1/2)*1i)/(3^(1/2)/2 - x + 1i/2))/((1 - (3^(1/2)/2 + 1i/ 
2)^2)^(1/2)*(3^(1/2) - 4*(3^(1/2)/2 + 1i/2)^3 + 1i)) + log((((x*(3^(1/2)/2 
 - 1i/2) - 1)*1i)/(1 - (3^(1/2)/2 - 1i/2)^2)^(1/2) - (1 - x^2)^(1/2)*1i)/( 
x - 3^(1/2)/2 + 1i/2))/((1 - (3^(1/2)/2 - 1i/2)^2)^(1/2)*(4*(3^(1/2)/2 - 1 
i/2)^3 - 3^(1/2) + 1i)) - log((((x*(3^(1/2)/2 - 1i/2) + 1)*1i)/(1 - (3^(1/ 
2)/2 - 1i/2)^2)^(1/2) + (1 - x^2)^(1/2)*1i)/(x + 3^(1/2)/2 - 1i/2))/((1 - 
(3^(1/2)/2 - 1i/2)^2)^(1/2)*(4*(3^(1/2)/2 - 1i/2)^3 - 3^(1/2) + 1i)) - (lo 
g(x - 3^(1/2)/2 - 1i/2)*(3^(1/2)/2 + 1i/2))/(3^(1/2) - 4*(3^(1/2)/2 + 1i/2 
)^3 + 1i) - (log(x + 3^(1/2)/2 + 1i/2)*(3^(1/2)/2 + 1i/2))/(3^(1/2) - 4*(3 
^(1/2)/2 + 1i/2)^3 + 1i) + log((((x*(3^(1/2)/2 + 1i/2) + 1)*1i)/(1 - (3^(1 
/2)/2 + 1i/2)^2)^(1/2) + (1 - x^2)^(1/2)*1i)/(x + 3^(1/2)/2 + 1i/2))/((1 - 
 (3^(1/2)/2 + 1i/2)^2)^(1/2)*(3^(1/2) - 4*(3^(1/2)/2 + 1i/2)^3 + 1i)) + (l 
og(x - 3^(1/2)/2 + 1i/2)*(3^(1/2)/2 - 1i/2))/(4*(3^(1/2)/2 - 1i/2)^3 - 3^( 
1/2) + 1i) + (log(x + 3^(1/2)/2 - 1i/2)*(3^(1/2)/2 - 1i/2))/(4*(3^(1/2)/2 
- 1i/2)^3 - 3^(1/2) + 1i)