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]
________________________________________________________________________________________
Rubi [A] time = 0.10, 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, Rules used = {2067, 2011, 329, 275, 239} \[ \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]{(x-1)^3-(1-q) (x-1)}}-\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]{(x-1)^3-(1-q) (x-1)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 239
Rule 275
Rule 329
Rule 2011
Rule 2067
Rubi steps
\begin {align*} \int \frac {1}{\sqrt [3]{(-1+x) \left (q-2 x+x^2\right )}} \, dx &=\operatorname {Subst}\left (\int \frac {1}{\sqrt [3]{-(1-q) x+x^3}} \, dx,x,-1+x\right )\\ &=\frac {\left (\sqrt [3]{-1+q+(-1+x)^2} \sqrt [3]{-1+x}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt [3]{x} \sqrt [3]{-1+q+x^2}} \, dx,x,-1+x\right )}{\sqrt [3]{(-1+q) (-1+x)+(-1+x)^3}}\\ &=\frac {\left (3 \sqrt [3]{-1+q+(-1+x)^2} \sqrt [3]{-1+x}\right ) \operatorname {Subst}\left (\int \frac {x}{\sqrt [3]{-1+q+x^6}} \, dx,x,\sqrt [3]{-1+x}\right )}{\sqrt [3]{(-1+q) (-1+x)+(-1+x)^3}}\\ &=\frac {\left (3 \sqrt [3]{-1+q+(-1+x)^2} \sqrt [3]{-1+x}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt [3]{-1+q+x^3}} \, dx,x,(-1+x)^{2/3}\right )}{2 \sqrt [3]{(-1+q) (-1+x)+(-1+x)^3}}\\ &=\frac {\sqrt {3} \sqrt [3]{-1+q+(-1+x)^2} \sqrt [3]{-1+x} \tan ^{-1}\left (\frac {1+\frac {2 (-1+x)^{2/3}}{\sqrt [3]{q-(2-x) x}}}{\sqrt {3}}\right )}{2 \sqrt [3]{(1-q) (1-x)+(-1+x)^3}}-\frac {3 \sqrt [3]{-1+q+(-1+x)^2} \sqrt [3]{-1+x} \log \left ((-1+x)^{2/3}-\sqrt [3]{q-(2-x) x}\right )}{4 \sqrt [3]{(1-q) (1-x)+(-1+x)^3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.15, size = 140, normalized size = 1.77 \[ \frac {\sqrt [3]{x-1} \sqrt [3]{q+(x-2) x} \left (-2 \log \left (1-\frac {(x-1)^{2/3}}{\sqrt [3]{q+(x-2) x}}\right )+\log \left (\frac {(x-1)^{4/3}}{(q+(x-2) x)^{2/3}}+\frac {(x-1)^{2/3}}{\sqrt [3]{q+(x-2) x}}+1\right )+2 \sqrt {3} \tan ^{-1}\left (\frac {\frac {2 (x-1)^{2/3}}{\sqrt [3]{q+(x-2) x}}+1}{\sqrt {3}}\right )\right )}{4 \sqrt [3]{(x-1) (q+(x-2) x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 3.45, size = 665, normalized size = 8.42 \[ \frac {1}{2} \, \sqrt {3} \arctan \left (\frac {2 \, \sqrt {3} {\left (q^{12} - 18 \, q^{11} + 117 \, q^{10} - 346 \, q^{9} + 414 \, q^{8} - 18 \, q^{7} + 69 \, q^{6} - 774 \, q^{5} - 234 \, q^{4} + 1058 \, q^{3} + 621 \, q^{2} + 378 \, q - 539\right )} {\left (x^{3} + {\left (q + 2\right )} x - 3 \, x^{2} - q\right )}^{\frac {2}{3}} + 4 \, \sqrt {3} {\left (q^{12} - 12 \, q^{11} + 51 \, q^{10} - 70 \, q^{9} - 90 \, q^{8} + 288 \, q^{7} - 57 \, q^{6} + 54 \, q^{5} - 810 \, q^{4} + 320 \, q^{3} + 291 \, q^{2} - {\left (q^{12} - 12 \, q^{11} + 51 \, q^{10} - 70 \, q^{9} - 90 \, q^{8} + 288 \, q^{7} - 57 \, q^{6} + 54 \, q^{5} - 810 \, q^{4} + 320 \, q^{3} + 291 \, q^{2} + 714 \, q + 49\right )} x + 714 \, q + 49\right )} {\left (x^{3} + {\left (q + 2\right )} x - 3 \, x^{2} - q\right )}^{\frac {1}{3}} - \sqrt {3} {\left (q^{13} - 22 \, q^{12} + 177 \, q^{11} - 514 \, q^{10} - 434 \, q^{9} + 5346 \, q^{8} - 8247 \, q^{7} - 4542 \, q^{6} + 19638 \, q^{5} - 8050 \, q^{4} - 10343 \, q^{3} + {\left (q^{12} - 6 \, q^{11} - 15 \, q^{10} + 206 \, q^{9} - 594 \, q^{8} + 594 \, q^{7} - 183 \, q^{6} + 882 \, q^{5} - 1386 \, q^{4} - 418 \, q^{3} - 39 \, q^{2} + 1050 \, q + 637\right )} x^{2} + 6186 \, q^{2} - 2 \, {\left (q^{12} - 6 \, q^{11} - 15 \, q^{10} + 206 \, q^{9} - 594 \, q^{8} + 594 \, q^{7} - 183 \, q^{6} + 882 \, q^{5} - 1386 \, q^{4} - 418 \, q^{3} - 39 \, q^{2} + 1050 \, q + 637\right )} x + 1501 \, q + 32\right )}}{q^{13} - 22 \, q^{12} + 249 \, q^{11} - 1546 \, q^{10} + 4702 \, q^{9} - 4230 \, q^{8} - 10623 \, q^{7} + 25338 \, q^{6} - 3546 \, q^{5} - 31306 \, q^{4} + 18817 \, q^{3} + 9 \, {\left (q^{12} - 14 \, q^{11} + 73 \, q^{10} - 162 \, q^{9} + 78 \, q^{8} + 186 \, q^{7} - 15 \, q^{6} - 222 \, q^{5} - 618 \, q^{4} + 566 \, q^{3} + 401 \, q^{2} + 602 \, q - 147\right )} x^{2} + 9714 \, q^{2} - 18 \, {\left (q^{12} - 14 \, q^{11} + 73 \, q^{10} - 162 \, q^{9} + 78 \, q^{8} + 186 \, q^{7} - 15 \, q^{6} - 222 \, q^{5} - 618 \, q^{4} + 566 \, q^{3} + 401 \, q^{2} + 602 \, q - 147\right )} x - 995 \, q + 8}\right ) - \frac {1}{4} \, \log \left (3 \, {\left (x^{3} + {\left (q + 2\right )} x - 3 \, x^{2} - q\right )}^{\frac {1}{3}} {\left (x - 1\right )} + q - 3 \, {\left (x^{3} + {\left (q + 2\right )} x - 3 \, x^{2} - q\right )}^{\frac {2}{3}} - 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \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]
[Out]
________________________________________________________________________________________
maple [F] time = 0.04, size = 0, normalized size = 0.00 \[ \int \frac {1}{\left (\left (x -1\right ) \left (x^{2}+q -2 x \right )\right )^{\frac {1}{3}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \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]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {1}{{\left (\left (x-1\right )\,\left (x^2-2\,x+q\right )\right )}^{1/3}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sqrt [3]{\left (x - 1\right ) \left (q + x^{2} - 2 x\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________