3.614 \(\int \sqrt{(2-x) x \left (4-2 x+x^2\right )} \, dx\)

Optimal. Leaf size=62 \[ \frac{1}{3} \sqrt{-(x-1)^4-2 (x-1)^2+3} (x-1)-\frac{4 F\left (\sin ^{-1}(1-x)|-\frac{1}{3}\right )}{\sqrt{3}}+\frac{2 E\left (\sin ^{-1}(1-x)|-\frac{1}{3}\right )}{\sqrt{3}} \]

[Out]

(Sqrt[3 - 2*(-1 + x)^2 - (-1 + x)^4]*(-1 + x))/3 + (2*EllipticE[ArcSin[1 - x], -
1/3])/Sqrt[3] - (4*EllipticF[ArcSin[1 - x], -1/3])/Sqrt[3]

_______________________________________________________________________________________

Rubi [A]  time = 0.150525, antiderivative size = 62, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.316 \[ -\frac{1}{3} \sqrt{-(1-x)^4-2 (1-x)^2+3} (1-x)-\frac{4 F\left (\sin ^{-1}(1-x)|-\frac{1}{3}\right )}{\sqrt{3}}+\frac{2 E\left (\sin ^{-1}(1-x)|-\frac{1}{3}\right )}{\sqrt{3}} \]

Antiderivative was successfully verified.

[In]  Int[Sqrt[(2 - x)*x*(4 - 2*x + x^2)],x]

[Out]

-(Sqrt[3 - 2*(1 - x)^2 - (1 - x)^4]*(1 - x))/3 + (2*EllipticE[ArcSin[1 - x], -1/
3])/Sqrt[3] - (4*EllipticF[ArcSin[1 - x], -1/3])/Sqrt[3]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 12.434, size = 58, normalized size = 0.94 \[ \frac{\left (x - 1\right ) \sqrt{- \left (x - 1\right )^{4} - 2 \left (x - 1\right )^{2} + 3}}{3} - \frac{2 \sqrt{3} E\left (\operatorname{asin}{\left (x - 1 \right )}\middle | - \frac{1}{3}\right )}{3} + \frac{4 \sqrt{3} F\left (\operatorname{asin}{\left (x - 1 \right )}\middle | - \frac{1}{3}\right )}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(((2-x)*x*(x**2-2*x+4))**(1/2),x)

[Out]

(x - 1)*sqrt(-(x - 1)**4 - 2*(x - 1)**2 + 3)/3 - 2*sqrt(3)*elliptic_e(asin(x - 1
), -1/3)/3 + 4*sqrt(3)*elliptic_f(asin(x - 1), -1/3)/3

_______________________________________________________________________________________

Mathematica [C]  time = 0.939238, size = 256, normalized size = 4.13 \[ \frac{\sqrt{-x \left (x^3-4 x^2+8 x-8\right )} \left (\sqrt{\frac{x^2-2 x+4}{x^2}} \left (x^3-3 x^2+4 x-4\right )+8 i \sqrt{2} \sqrt{-\frac{i (x-2)}{\left (\sqrt{3}-i\right ) x}} F\left (\sin ^{-1}\left (\frac{\sqrt{\sqrt{3}+i-\frac{4 i}{x}}}{\sqrt{2} \sqrt [4]{3}}\right )|\frac{2 \sqrt{3}}{-i+\sqrt{3}}\right )+2 \sqrt{2} \left (\sqrt{3}-i\right ) \sqrt{-\frac{i (x-2)}{\left (\sqrt{3}-i\right ) x}} E\left (\sin ^{-1}\left (\frac{\sqrt{\sqrt{3}+i-\frac{4 i}{x}}}{\sqrt{2} \sqrt [4]{3}}\right )|\frac{2 \sqrt{3}}{-i+\sqrt{3}}\right )\right )}{3 (x-2) x \sqrt{\frac{x^2-2 x+4}{x^2}}} \]

Warning: Unable to verify antiderivative.

[In]  Integrate[Sqrt[(2 - x)*x*(4 - 2*x + x^2)],x]

[Out]

(Sqrt[-(x*(-8 + 8*x - 4*x^2 + x^3))]*(Sqrt[(4 - 2*x + x^2)/x^2]*(-4 + 4*x - 3*x^
2 + x^3) + 2*Sqrt[2]*(-I + Sqrt[3])*Sqrt[((-I)*(-2 + x))/((-I + Sqrt[3])*x)]*Ell
ipticE[ArcSin[Sqrt[I + Sqrt[3] - (4*I)/x]/(Sqrt[2]*3^(1/4))], (2*Sqrt[3])/(-I +
Sqrt[3])] + (8*I)*Sqrt[2]*Sqrt[((-I)*(-2 + x))/((-I + Sqrt[3])*x)]*EllipticF[Arc
Sin[Sqrt[I + Sqrt[3] - (4*I)/x]/(Sqrt[2]*3^(1/4))], (2*Sqrt[3])/(-I + Sqrt[3])])
)/(3*(-2 + x)*x*Sqrt[(4 - 2*x + x^2)/x^2])

_______________________________________________________________________________________

Maple [B]  time = 0.039, size = 946, normalized size = 15.3 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(((2-x)*x*(x^2-2*x+4))^(1/2),x)

[Out]

1/3*x*(-x^4+4*x^3-8*x^2+8*x)^(1/2)-1/3*(-x^4+4*x^3-8*x^2+8*x)^(1/2)+8/3*(-1+I*3^
(1/2))*((-I*3^(1/2)-1)*x/(1-I*3^(1/2))/(x-2))^(1/2)*(x-2)^2*((x-I*3^(1/2)-1)/(I*
3^(1/2)+1)/(x-2))^(1/2)*((x-1+I*3^(1/2))/(1-I*3^(1/2))/(x-2))^(1/2)/(-I*3^(1/2)-
1)/(-x*(x-2)*(x-I*3^(1/2)-1)*(x-1+I*3^(1/2)))^(1/2)*EllipticF(((-I*3^(1/2)-1)*x/
(1-I*3^(1/2))/(x-2))^(1/2),((1-I*3^(1/2))*(-1+I*3^(1/2))/(-I*3^(1/2)-1)/(I*3^(1/
2)+1))^(1/2))+8/3*(-1+I*3^(1/2))*((-I*3^(1/2)-1)*x/(1-I*3^(1/2))/(x-2))^(1/2)*(x
-2)^2*((x-I*3^(1/2)-1)/(I*3^(1/2)+1)/(x-2))^(1/2)*((x-1+I*3^(1/2))/(1-I*3^(1/2))
/(x-2))^(1/2)/(-I*3^(1/2)-1)/(-x*(x-2)*(x-I*3^(1/2)-1)*(x-1+I*3^(1/2)))^(1/2)*(2
*EllipticF(((-I*3^(1/2)-1)*x/(1-I*3^(1/2))/(x-2))^(1/2),((1-I*3^(1/2))*(-1+I*3^(
1/2))/(-I*3^(1/2)-1)/(I*3^(1/2)+1))^(1/2))-2*EllipticPi(((-I*3^(1/2)-1)*x/(1-I*3
^(1/2))/(x-2))^(1/2),(1-I*3^(1/2))/(-I*3^(1/2)-1),((1-I*3^(1/2))*(-1+I*3^(1/2))/
(-I*3^(1/2)-1)/(I*3^(1/2)+1))^(1/2)))-2/3*(x*(x-I*3^(1/2)-1)*(x-1+I*3^(1/2))+2*(
-1+I*3^(1/2))*((-I*3^(1/2)-1)*x/(1-I*3^(1/2))/(x-2))^(1/2)*(x-2)^2*((x-I*3^(1/2)
-1)/(I*3^(1/2)+1)/(x-2))^(1/2)*((x-1+I*3^(1/2))/(1-I*3^(1/2))/(x-2))^(1/2)*(1/2*
(6-2*I*3^(1/2))/(-I*3^(1/2)-1)*EllipticF(((-I*3^(1/2)-1)*x/(1-I*3^(1/2))/(x-2))^
(1/2),((1-I*3^(1/2))*(-1+I*3^(1/2))/(-I*3^(1/2)-1)/(I*3^(1/2)+1))^(1/2))+1/2*(-I
*3^(1/2)-1)*EllipticE(((-I*3^(1/2)-1)*x/(1-I*3^(1/2))/(x-2))^(1/2),((1-I*3^(1/2)
)*(-1+I*3^(1/2))/(-I*3^(1/2)-1)/(I*3^(1/2)+1))^(1/2))-4/(-I*3^(1/2)-1)*EllipticP
i(((-I*3^(1/2)-1)*x/(1-I*3^(1/2))/(x-2))^(1/2),(-1+I*3^(1/2))/(I*3^(1/2)+1),((1-
I*3^(1/2))*(-1+I*3^(1/2))/(-I*3^(1/2)-1)/(I*3^(1/2)+1))^(1/2))))/(-x*(x-2)*(x-I*
3^(1/2)-1)*(x-1+I*3^(1/2)))^(1/2)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \sqrt{-{\left (x^{2} - 2 \, x + 4\right )}{\left (x - 2\right )} x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(-(x^2 - 2*x + 4)*(x - 2)*x),x, algorithm="maxima")

[Out]

integrate(sqrt(-(x^2 - 2*x + 4)*(x - 2)*x), x)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\sqrt{-x^{4} + 4 \, x^{3} - 8 \, x^{2} + 8 \, x}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(-(x^2 - 2*x + 4)*(x - 2)*x),x, algorithm="fricas")

[Out]

integral(sqrt(-x^4 + 4*x^3 - 8*x^2 + 8*x), x)

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \sqrt{x \left (- x + 2\right ) \left (x^{2} - 2 x + 4\right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(((2-x)*x*(x**2-2*x+4))**(1/2),x)

[Out]

Integral(sqrt(x*(-x + 2)*(x**2 - 2*x + 4)), x)

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \sqrt{-{\left (x^{2} - 2 \, x + 4\right )}{\left (x - 2\right )} x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(-(x^2 - 2*x + 4)*(x - 2)*x),x, algorithm="giac")

[Out]

integrate(sqrt(-(x^2 - 2*x + 4)*(x - 2)*x), x)