3.42 \(\int \frac{1}{\sqrt [3]{(-1+x) \left (q-2 x+x^2\right )}} \, dx\)

Optimal. Leaf size=79 \[ -\frac{3}{4} \log \left (\sqrt [3]{(x-1) \left (q+x^2-2 x\right )}-x+1\right )+\frac{1}{2} \sqrt{3} \tan ^{-1}\left (\frac{2 (x-1)}{\sqrt{3} \sqrt [3]{(x-1) \left (q+x^2-2 x\right )}}+\frac{1}{\sqrt{3}}\right )+\frac{1}{4} \log (1-x) \]

[Out]

(Sqrt[3]*ArcTan[1/Sqrt[3] + (2*(-1 + x))/(Sqrt[3]*((-1 + x)*(q - 2*x + x^2))^(1/
3))])/2 + Log[1 - x]/4 - (3*Log[1 - x + ((-1 + x)*(q - 2*x + x^2))^(1/3)])/4

_______________________________________________________________________________________

Rubi [A]  time = 0.187644, antiderivative size = 145, normalized size of antiderivative = 1.84, number of steps used = 5, number of rules used = 5, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.312 \[ \frac{\sqrt{3} \sqrt [3]{x-1} \sqrt [3]{q+(x-1)^2-1} \tan ^{-1}\left (\frac{\frac{2 (x-1)^{2/3}}{\sqrt [3]{q+(x-1)^2-1}}+1}{\sqrt{3}}\right )}{2 \sqrt [3]{(1-q) (1-x)+(x-1)^3}}-\frac{3 \sqrt [3]{x-1} \sqrt [3]{q+(x-1)^2-1} \log \left ((x-1)^{2/3}-\sqrt [3]{q+(x-1)^2-1}\right )}{4 \sqrt [3]{(1-q) (1-x)+(x-1)^3}} \]

Antiderivative was successfully verified.

[In]  Int[((-1 + x)*(q - 2*x + x^2))^(-1/3),x]

[Out]

(Sqrt[3]*(-1 + q + (-1 + x)^2)^(1/3)*(-1 + x)^(1/3)*ArcTan[(1 + (2*(-1 + x)^(2/3
))/(-1 + q + (-1 + x)^2)^(1/3))/Sqrt[3]])/(2*((1 - q)*(1 - x) + (-1 + x)^3)^(1/3
)) - (3*(-1 + q + (-1 + x)^2)^(1/3)*(-1 + x)^(1/3)*Log[-(-1 + q + (-1 + x)^2)^(1
/3) + (-1 + x)^(2/3)])/(4*((1 - q)*(1 - x) + (-1 + x)^3)^(1/3))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 9.5927, size = 216, normalized size = 2.73 \[ - \frac{\sqrt [3]{x - 1} \sqrt [3]{q + x^{2} - 2 x} \log{\left (- \frac{\left (x - 1\right )^{\frac{2}{3}}}{\sqrt [3]{q + \left (x - 1\right )^{2} - 1}} + 1 \right )}}{2 \sqrt [3]{- q + x^{3} - 3 x^{2} + x \left (q + 2\right )}} + \frac{\sqrt [3]{x - 1} \sqrt [3]{q + x^{2} - 2 x} \log{\left (\frac{\left (x - 1\right )^{\frac{4}{3}}}{\left (q + \left (x - 1\right )^{2} - 1\right )^{\frac{2}{3}}} + \frac{\left (x - 1\right )^{\frac{2}{3}}}{\sqrt [3]{q + \left (x - 1\right )^{2} - 1}} + 1 \right )}}{4 \sqrt [3]{- q + x^{3} - 3 x^{2} + x \left (q + 2\right )}} + \frac{\sqrt{3} \sqrt [3]{x - 1} \sqrt [3]{q + x^{2} - 2 x} \operatorname{atan}{\left (\sqrt{3} \left (\frac{2 \left (x - 1\right )^{\frac{2}{3}}}{3 \sqrt [3]{q + \left (x - 1\right )^{2} - 1}} + \frac{1}{3}\right ) \right )}}{2 \sqrt [3]{- q + x^{3} - 3 x^{2} + x \left (q + 2\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-(x - 1)**(1/3)*(q + x**2 - 2*x)**(1/3)*log(-(x - 1)**(2/3)/(q + (x - 1)**2 - 1)
**(1/3) + 1)/(2*(-q + x**3 - 3*x**2 + x*(q + 2))**(1/3)) + (x - 1)**(1/3)*(q + x
**2 - 2*x)**(1/3)*log((x - 1)**(4/3)/(q + (x - 1)**2 - 1)**(2/3) + (x - 1)**(2/3
)/(q + (x - 1)**2 - 1)**(1/3) + 1)/(4*(-q + x**3 - 3*x**2 + x*(q + 2))**(1/3)) +
 sqrt(3)*(x - 1)**(1/3)*(q + x**2 - 2*x)**(1/3)*atan(sqrt(3)*(2*(x - 1)**(2/3)/(
3*(q + (x - 1)**2 - 1)**(1/3)) + 1/3))/(2*(-q + x**3 - 3*x**2 + x*(q + 2))**(1/3
))

_______________________________________________________________________________________

Mathematica [C]  time = 0.0579134, size = 61, normalized size = 0.77 \[ \frac{3 (x-1) \sqrt [3]{\frac{q+(x-2) x}{q-1}} \, _2F_1\left (\frac{1}{3},\frac{1}{3};\frac{4}{3};-\frac{(x-1)^2}{q-1}\right )}{2 \sqrt [3]{(x-1) (q+(x-2) x)}} \]

Antiderivative was successfully verified.

[In]  Integrate[((-1 + x)*(q - 2*x + x^2))^(-1/3),x]

[Out]

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

_______________________________________________________________________________________

Maple [F]  time = 0.02, size = 0, normalized size = 0. \[ \int{\frac{1}{\sqrt [3]{ \left ( -1+x \right ) \left ({x}^{2}+q-2\,x \right ) }}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(((x^2 + q - 2*x)*(x - 1))^(-1/3),x, algorithm="maxima")

[Out]

integrate(((x^2 + q - 2*x)*(x - 1))^(-1/3), x)

_______________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(((x^2 + q - 2*x)*(x - 1))^(-1/3),x, algorithm="fricas")

[Out]

Timed out

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

Timed out

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(((x^2 + q - 2*x)*(x - 1))^(-1/3),x, algorithm="giac")

[Out]

integrate(((x^2 + q - 2*x)*(x - 1))^(-1/3), x)