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

3.1.42.1 Optimal result
3.1.42.2 Mathematica [A] (verified)
3.1.42.3 Rubi [A] (warning: unable to verify)
3.1.42.4 Maple [F]
3.1.42.5 Fricas [B] (verification not implemented)
3.1.42.6 Sympy [F]
3.1.42.7 Maxima [F]
3.1.42.8 Giac [F]
3.1.42.9 Mupad [F(-1)]

3.1.42.1 Optimal result

Integrand size = 16, antiderivative size = 79 \[ \int \frac {1}{\sqrt [3]{(-1+x) \left (q-2 x+x^2\right )}} \, dx=\frac {1}{2} \sqrt {3} \arctan \left (\frac {1}{\sqrt {3}}+\frac {2 (-1+x)}{\sqrt {3} \sqrt [3]{(-1+x) \left (q-2 x+x^2\right )}}\right )+\frac {1}{4} \log (1-x)-\frac {3}{4} \log \left (1-x+\sqrt [3]{(-1+x) \left (q-2 x+x^2\right )}\right ) \]

output
1/4*ln(1-x)-3/4*ln(1-x+((-1+x)*(x^2+q-2*x))^(1/3))+1/2*arctan(1/3*3^(1/2)+ 
2/3*(-1+x)/((-1+x)*(x^2+q-2*x))^(1/3)*3^(1/2))*3^(1/2)
 
3.1.42.2 Mathematica [A] (verified)

Time = 0.97 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.84 \[ \int \frac {1}{\sqrt [3]{(-1+x) \left (q-2 x+x^2\right )}} \, dx=\frac {\sqrt [3]{-1+x} \sqrt [3]{q+(-2+x) x} \left (2 \sqrt {3} \arctan \left (\frac {\sqrt {3} (-1+x)^{2/3}}{(-1+x)^{2/3}+2 \sqrt [3]{q+(-2+x) x}}\right )-2 \log \left (-(-1+x)^{2/3}+\sqrt [3]{q+(-2+x) x}\right )+\log \left ((-1+x)^{4/3}+(-1+x)^{2/3} \sqrt [3]{q+(-2+x) x}+(q+(-2+x) x)^{2/3}\right )\right )}{4 \sqrt [3]{(-1+x) (q+(-2+x) x)}} \]

input
Integrate[((-1 + x)*(q - 2*x + x^2))^(-1/3),x]
 
output
((-1 + x)^(1/3)*(q + (-2 + x)*x)^(1/3)*(2*Sqrt[3]*ArcTan[(Sqrt[3]*(-1 + x) 
^(2/3))/((-1 + x)^(2/3) + 2*(q + (-2 + x)*x)^(1/3))] - 2*Log[-(-1 + x)^(2/ 
3) + (q + (-2 + x)*x)^(1/3)] + Log[(-1 + x)^(4/3) + (-1 + x)^(2/3)*(q + (- 
2 + x)*x)^(1/3) + (q + (-2 + x)*x)^(2/3)]))/(4*((-1 + x)*(q + (-2 + x)*x)) 
^(1/3))
 
3.1.42.3 Rubi [A] (warning: unable to verify)

Time = 0.21 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.19, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {2481, 1917, 266, 807, 769}

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 {1}{\sqrt [3]{(x-1) \left (q+x^2-2 x\right )}} \, dx\)

\(\Big \downarrow \) 2481

\(\displaystyle \int \frac {1}{\sqrt [3]{(x-1)^3-(1-q) (x-1)}}d(x-1)\)

\(\Big \downarrow \) 1917

\(\displaystyle \frac {\sqrt [3]{x-1} \sqrt [3]{q+(x-1)^2-1} \int \frac {1}{\sqrt [3]{(x-1)^2+q-1} \sqrt [3]{x-1}}d(x-1)}{\sqrt [3]{(x-1)^3-(1-q) (x-1)}}\)

\(\Big \downarrow \) 266

\(\displaystyle \frac {3 \sqrt [3]{x-1} \sqrt [3]{q+(x-1)^2-1} \int \frac {\sqrt [3]{x-1}}{\sqrt [3]{(x-1)^2+q-1}}d\sqrt [3]{x-1}}{\sqrt [3]{(x-1)^3-(1-q) (x-1)}}\)

\(\Big \downarrow \) 807

\(\displaystyle \frac {3 \sqrt [3]{x-1} \sqrt [3]{q+(x-1)^2-1} \int \frac {1}{\sqrt [3]{q+x-2}}d(x-1)^{2/3}}{2 \sqrt [3]{(x-1)^3-(1-q) (x-1)}}\)

\(\Big \downarrow \) 769

\(\displaystyle \frac {3 \sqrt [3]{x-1} \sqrt [3]{q+(x-1)^2-1} \left (\frac {\arctan \left (\frac {\frac {2 (x-1)^{2/3}}{\sqrt [3]{q+x-2}}+1}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {1}{2} \log \left (\sqrt [3]{q+x-2}-x+1\right )\right )}{2 \sqrt [3]{(x-1)^3-(1-q) (x-1)}}\)

input
Int[((-1 + x)*(q - 2*x + x^2))^(-1/3),x]
 
output
(3*(-1 + q + (-1 + x)^2)^(1/3)*(-1 + x)^(1/3)*(ArcTan[(1 + (2*(-1 + x)^(2/ 
3))/(-2 + q + x)^(1/3))/Sqrt[3]]/Sqrt[3] - Log[1 - x + (-2 + q + x)^(1/3)] 
/2))/(2*(-((1 - q)*(-1 + x)) + (-1 + x)^3)^(1/3))
 

3.1.42.3.1 Defintions of rubi rules used

rule 266
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{k = De 
nominator[m]}, Simp[k/c   Subst[Int[x^(k*(m + 1) - 1)*(a + b*(x^(2*k)/c^2)) 
^p, x], x, (c*x)^(1/k)], x]] /; FreeQ[{a, b, c, p}, x] && FractionQ[m] && I 
ntBinomialQ[a, b, c, 2, m, p, x]
 

rule 769
Int[((a_) + (b_.)*(x_)^3)^(-1/3), x_Symbol] :> Simp[ArcTan[(1 + 2*Rt[b, 3]* 
(x/(a + b*x^3)^(1/3)))/Sqrt[3]]/(Sqrt[3]*Rt[b, 3]), x] - Simp[Log[(a + b*x^ 
3)^(1/3) - Rt[b, 3]*x]/(2*Rt[b, 3]), x] /; FreeQ[{a, b}, x]
 

rule 807
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = GCD[m 
+ 1, n]}, Simp[1/k   Subst[Int[x^((m + 1)/k - 1)*(a + b*x^(n/k))^p, x], x, 
x^k], x] /; k != 1] /; FreeQ[{a, b, p}, x] && IGtQ[n, 0] && IntegerQ[m]
 

rule 1917
Int[((a_.)*(x_)^(j_.) + (b_.)*(x_)^(n_.))^(p_), x_Symbol] :> Simp[(a*x^j + 
b*x^n)^FracPart[p]/(x^(j*FracPart[p])*(a + b*x^(n - j))^FracPart[p])   Int[ 
x^(j*p)*(a + b*x^(n - j))^p, x], x] /; FreeQ[{a, b, j, n, p}, x] &&  !Integ 
erQ[p] && NeQ[n, j] && PosQ[n - j]
 

rule 2481
Int[(Px_)^(p_), x_Symbol] :> With[{a = Coeff[Px, x, 0], b = Coeff[Px, x, 1] 
, c = Coeff[Px, x, 2], d = Coeff[Px, x, 3]}, Subst[Int[Simp[(2*c^3 - 9*b*c* 
d + 27*a*d^2)/(27*d^2) - (c^2 - 3*b*d)*(x/(3*d)) + d*x^3, x]^p, x], x, c/(3 
*d) + x]] /; FreeQ[p, x] && PolyQ[Px, x, 3]
 
3.1.42.4 Maple [F]

\[\int \frac {1}{{\left (\left (-1+x \right ) \left (x^{2}+q -2 x \right )\right )}^{\frac {1}{3}}}d x\]

input
int(1/((-1+x)*(x^2+q-2*x))^(1/3),x)
 
output
int(1/((-1+x)*(x^2+q-2*x))^(1/3),x)
 
3.1.42.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 665 vs. \(2 (65) = 130\).

Time = 0.78 (sec) , antiderivative size = 665, normalized size of antiderivative = 8.42 \[ \int \frac {1}{\sqrt [3]{(-1+x) \left (q-2 x+x^2\right )}} \, dx=\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 ) \]

input
integrate(1/((-1+x)*(x^2+q-2*x))^(1/3),x, algorithm="fricas")
 
output
1/2*sqrt(3)*arctan((2*sqrt(3)*(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 - 53 
9)*(x^3 + (q + 2)*x - 3*x^2 - q)^(2/3) + 4*sqrt(3)*(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 - (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)*x + 714*q + 49)*(x^3 + (q 
 + 2)*x - 3*x^2 - q)^(1/3) - sqrt(3)*(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 + (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)*x^2 + 6186*q^2 - 2*( 
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)*x + 1501*q + 32))/(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*(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 + 60 
2*q - 147)*x^2 + 9714*q^2 - 18*(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 
)*x - 995*q + 8)) - 1/4*log(3*(x^3 + (q + 2)*x - 3*x^2 - q)^(1/3)*(x - 1) 
+ q - 3*(x^3 + (q + 2)*x - 3*x^2 - q)^(2/3) - 1)
 
3.1.42.6 Sympy [F]

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

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

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

input
integrate(1/((-1+x)*(x^2+q-2*x))^(1/3),x, algorithm="maxima")
 
output
integrate(((x^2 + q - 2*x)*(x - 1))^(-1/3), x)
 
3.1.42.8 Giac [F]

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

input
integrate(1/((-1+x)*(x^2+q-2*x))^(1/3),x, algorithm="giac")
 
output
integrate(((x^2 + q - 2*x)*(x - 1))^(-1/3), x)
 
3.1.42.9 Mupad [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt [3]{(-1+x) \left (q-2 x+x^2\right )}} \, dx=\int \frac {1}{{\left (\left (x-1\right )\,\left (x^2-2\,x+q\right )\right )}^{1/3}} \,d x \]

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