\(\int -\frac {\sqrt {1-x} \sqrt {x}}{\sqrt {-x} \sqrt {-x (1+x)}} \, dx\) [535]

Optimal result
Mathematica [C] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F(-1)]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 33, antiderivative size = 21 \[ \int -\frac {\sqrt {1-x} \sqrt {x}}{\sqrt {-x} \sqrt {-x (1+x)}} \, dx=-2 E\left (\left .\arcsin \left (\sqrt {x}\right )\right |-1\right )+4 \operatorname {EllipticF}\left (\arcsin \left (\sqrt {x}\right ),-1\right ) \] Output:

-2*EllipticE(x^(1/2),I)+4*EllipticF(x^(1/2),I)
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.

Time = 0.79 (sec) , antiderivative size = 73, normalized size of antiderivative = 3.48 \[ \int -\frac {\sqrt {1-x} \sqrt {x}}{\sqrt {-x} \sqrt {-x (1+x)}} \, dx=\frac {2 (-x)^{3/2} \sqrt {1-x^2} \left (-3 \operatorname {Hypergeometric2F1}\left (\frac {1}{4},\frac {1}{2},\frac {5}{4},x^2\right )+x \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3}{4},\frac {7}{4},x^2\right )\right )}{3 \sqrt {-((-1+x) x)} \sqrt {-x (1+x)}} \] Input:

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

Output:

(2*(-x)^(3/2)*Sqrt[1 - x^2]*(-3*Hypergeometric2F1[1/4, 1/2, 5/4, x^2] + x* 
Hypergeometric2F1[1/2, 3/4, 7/4, x^2]))/(3*Sqrt[-((-1 + x)*x)]*Sqrt[-(x*(1 
 + x))])
 

Rubi [A] (verified)

Time = 0.30 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.14, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {25, 30, 2048, 1168, 120}

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 {\sqrt {1-x} \sqrt {x}}{\sqrt {-x} \sqrt {-x (x+1)}} \, dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \frac {\sqrt {1-x} \sqrt {x}}{\sqrt {-x} \sqrt {-x (x+1)}}dx\)

\(\Big \downarrow \) 30

\(\displaystyle -\frac {\sqrt {x} \int \frac {\sqrt {1-x}}{\sqrt {-x (x+1)}}dx}{\sqrt {-x}}\)

\(\Big \downarrow \) 2048

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

\(\Big \downarrow \) 1168

\(\displaystyle -\frac {\sqrt {x} \int \frac {\sqrt {1-x}}{\sqrt {-x} \sqrt {x+1}}dx}{\sqrt {-x}}\)

\(\Big \downarrow \) 120

\(\displaystyle \frac {2 \sqrt {x} E\left (\left .\arcsin \left (\sqrt {-x}\right )\right |-1\right )}{\sqrt {-x}}\)

Input:

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

Output:

(2*Sqrt[x]*EllipticE[ArcSin[Sqrt[-x]], -1])/Sqrt[-x]
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 30
Int[(u_.)*((a_.)*(x_))^(m_.)*((b_.)*(x_)^(i_.))^(p_), x_Symbol] :> Simp[b^I 
ntPart[p]*((b*x^i)^FracPart[p]/(a^(i*IntPart[p])*(a*x)^(i*FracPart[p]))) 
Int[u*(a*x)^(m + i*p), x], x] /; FreeQ[{a, b, i, m, p}, x] && IntegerQ[i] & 
&  !IntegerQ[p]
 

rule 120
Int[Sqrt[(e_) + (f_.)*(x_)]/(Sqrt[(b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_] 
 :> Simp[2*(Sqrt[e]/b)*Rt[-b/d, 2]*EllipticE[ArcSin[Sqrt[b*x]/(Sqrt[c]*Rt[- 
b/d, 2])], c*(f/(d*e))], x] /; FreeQ[{b, c, d, e, f}, x] && GtQ[c, 0] && Gt 
Q[e, 0] &&  !LtQ[-b/d, 0]
 

rule 1168
Int[((d_.) + (e_.)*(x_))^(m_)/Sqrt[(b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> 
 Int[(d + e*x)^m/(Sqrt[b*x]*Sqrt[1 + (c/b)*x]), x] /; FreeQ[{b, c, d, e}, x 
] && NeQ[c*d - b*e, 0] && EqQ[m^2, 1/4] && LtQ[c, 0] && RationalQ[b]
 

rule 2048
Int[(u_.)*((e_.)*((a_.) + (b_.)*(x_)^(n_.))*((c_) + (d_.)*(x_)^(n_.)))^(p_) 
, x_Symbol] :> Int[u*(a*c*e + (b*c + a*d)*e*x^n + b*d*e*x^(2*n))^p, x] /; F 
reeQ[{a, b, c, d, e, n, p}, x]
 
Maple [A] (verified)

Time = 0.27 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.57

method result size
default \(-\frac {2 \operatorname {EllipticE}\left (\sqrt {x +1}, \frac {\sqrt {2}}{2}\right ) \sqrt {2}\, \sqrt {x +1}\, \sqrt {x}}{\sqrt {-x \left (x +1\right )}}\) \(33\)

Input:

int(-(1-x)^(1/2)*x^(1/2)/(-x)^(1/2)/(-x*(x+1))^(1/2),x,method=_RETURNVERBO 
SE)
 

Output:

-2*EllipticE((x+1)^(1/2),1/2*2^(1/2))*2^(1/2)*(x+1)^(1/2)*x^(1/2)/(-x*(x+1 
))^(1/2)
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.76 \[ \int -\frac {\sqrt {1-x} \sqrt {x}}{\sqrt {-x} \sqrt {-x (1+x)}} \, dx=2 i \, {\rm weierstrassPInverse}\left (4, 0, x\right ) + 2 i \, {\rm weierstrassZeta}\left (4, 0, {\rm weierstrassPInverse}\left (4, 0, x\right )\right ) \] Input:

integrate(-(1-x)^(1/2)*x^(1/2)/(-x)^(1/2)/(-x*(1+x))^(1/2),x, algorithm="f 
ricas")
 

Output:

2*I*weierstrassPInverse(4, 0, x) + 2*I*weierstrassZeta(4, 0, weierstrassPI 
nverse(4, 0, x))
 

Sympy [F(-1)]

Timed out. \[ \int -\frac {\sqrt {1-x} \sqrt {x}}{\sqrt {-x} \sqrt {-x (1+x)}} \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Maxima [F]

\[ \int -\frac {\sqrt {1-x} \sqrt {x}}{\sqrt {-x} \sqrt {-x (1+x)}} \, dx=\int { -\frac {\sqrt {x} \sqrt {-x + 1}}{\sqrt {-{\left (x + 1\right )} x} \sqrt {-x}} \,d x } \] Input:

integrate(-(1-x)^(1/2)*x^(1/2)/(-x)^(1/2)/(-x*(1+x))^(1/2),x, algorithm="m 
axima")
 

Output:

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

Giac [F]

\[ \int -\frac {\sqrt {1-x} \sqrt {x}}{\sqrt {-x} \sqrt {-x (1+x)}} \, dx=\int { -\frac {\sqrt {x} \sqrt {-x + 1}}{\sqrt {-{\left (x + 1\right )} x} \sqrt {-x}} \,d x } \] Input:

integrate(-(1-x)^(1/2)*x^(1/2)/(-x)^(1/2)/(-x*(1+x))^(1/2),x, algorithm="g 
iac")
 

Output:

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

Mupad [F(-1)]

Timed out. \[ \int -\frac {\sqrt {1-x} \sqrt {x}}{\sqrt {-x} \sqrt {-x (1+x)}} \, dx=-\int \frac {\sqrt {x}\,\sqrt {1-x}}{\sqrt {-x}\,\sqrt {-x^2-x}} \,d x \] Input:

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

Output:

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

Reduce [F]

\[ \int -\frac {\sqrt {1-x} \sqrt {x}}{\sqrt {-x} \sqrt {-x (1+x)}} \, dx=\int \frac {\sqrt {x}\, \sqrt {x +1}\, \sqrt {1-x}}{x^{2}+x}d x \] Input:

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

Output:

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