\(\int \frac {(-2+(1+k) x) (1-2 (1+k) x+(1+4 k+k^2) x^2-2 (k+k^2) x^3+(a+k^2) x^4)}{x^4 \sqrt [3]{(1-x) x (1-k x)} (1-(1+k) x+(-b+k) x^2)} \, dx\) [2662]

   Optimal result
   Rubi [F]
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [F(-1)]
   Sympy [F(-1)]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 86, antiderivative size = 238 \[ \int \frac {(-2+(1+k) x) \left (1-2 (1+k) x+\left (1+4 k+k^2\right ) x^2-2 \left (k+k^2\right ) x^3+\left (a+k^2\right ) x^4\right )}{x^4 \sqrt [3]{(1-x) x (1-k x)} \left (1-(1+k) x+(-b+k) x^2\right )} \, dx=\frac {3 \left (2-2 x-2 k x+5 b x^2+2 k x^2\right ) \left (x-x^2-k x^2+k x^3\right )^{2/3}}{10 x^4}+\frac {\left (-\sqrt {3} a-\sqrt {3} b^2\right ) \arctan \left (\frac {\sqrt {3} \sqrt [3]{b} x}{\sqrt [3]{b} x+2 \sqrt [3]{x+(-1-k) x^2+k x^3}}\right )}{\sqrt [3]{b}}+\frac {\left (a+b^2\right ) \log \left (-\sqrt [3]{b} x+\sqrt [3]{x+(-1-k) x^2+k x^3}\right )}{\sqrt [3]{b}}+\frac {\left (-a-b^2\right ) \log \left (b^{2/3} x^2+\sqrt [3]{b} x \sqrt [3]{x+(-1-k) x^2+k x^3}+\left (x+(-1-k) x^2+k x^3\right )^{2/3}\right )}{2 \sqrt [3]{b}} \]

[Out]

3/10*(5*b*x^2+2*k*x^2-2*k*x-2*x+2)*(k*x^3-k*x^2-x^2+x)^(2/3)/x^4+(-3^(1/2)*a-3^(1/2)*b^2)*arctan(3^(1/2)*b^(1/
3)*x/(b^(1/3)*x+2*(x+(-1-k)*x^2+k*x^3)^(1/3)))/b^(1/3)+(b^2+a)*ln(-b^(1/3)*x+(x+(-1-k)*x^2+k*x^3)^(1/3))/b^(1/
3)+1/2*(-b^2-a)*ln(b^(2/3)*x^2+b^(1/3)*x*(x+(-1-k)*x^2+k*x^3)^(1/3)+(x+(-1-k)*x^2+k*x^3)^(2/3))/b^(1/3)

Rubi [F]

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

[In]

Int[((-2 + (1 + k)*x)*(1 - 2*(1 + k)*x + (1 + 4*k + k^2)*x^2 - 2*(k + k^2)*x^3 + (a + k^2)*x^4))/(x^4*((1 - x)
*x*(1 - k*x))^(1/3)*(1 - (1 + k)*x + (-b + k)*x^2)),x]

[Out]

(-3*(8*b*k^3 - 2*k^4 + 4*b^3*(1 + 3*k + k^2) + b^2*(1 - 12*k^2 + k^4) + a*(1 + 2*b^2 + k^4 + 4*b*(1 + k + k^2)
))*(1 - x)*(1 - k*x))/(10*(b - k)^4*x^3*((1 - x)*x*(1 - k*x))^(1/3)) - (3*(1 + k)*(9*b*k^2 - 3*k^3 - a*(1 + 3*
b - k + k^2) - b^2*(1 + 8*k + k^2))*(1 - x)*(1 - k*x))/(7*(b - k)^3*x^2*((1 - x)*x*(1 - k*x))^(1/3)) - (12*(1
+ k)*(8*b*k^3 - 2*k^4 + 4*b^3*(1 + 3*k + k^2) + b^2*(1 - 12*k^2 + k^4) + a*(1 + 2*b^2 + k^4 + 4*b*(1 + k + k^2
)))*(1 - x)*(1 - k*x))/(35*(b - k)^4*x^2*((1 - x)*x*(1 - k*x))^(1/3)) - (3*(a*(1 + 2*b + k^2) + 2*b*k*(1 + 3*k
 + k^2) - k^2*(1 + 4*k + k^2))*(1 - x)*(1 - k*x))/(4*(b - k)^2*x*((1 - x)*x*(1 - k*x))^(1/3)) - (15*(1 + k)^2*
(9*b*k^2 - 3*k^3 - a*(1 + 3*b - k + k^2) - b^2*(1 + 8*k + k^2))*(1 - x)*(1 - k*x))/(28*(b - k)^3*x*((1 - x)*x*
(1 - k*x))^(1/3)) - (3*(20 + 19*k + 20*k^2)*(8*b*k^3 - 2*k^4 + 4*b^3*(1 + 3*k + k^2) + b^2*(1 - 12*k^2 + k^4)
+ a*(1 + 2*b^2 + k^4 + 4*b*(1 + k + k^2)))*(1 - x)*(1 - k*x))/(140*(b - k)^4*x*((1 - x)*x*(1 - k*x))^(1/3)) +
(3*(1 + k)*(a + k^2)*(1 - x)*(((1 - k)*x)/(1 - k*x))^(4/3)*(1 - k*x)*Hypergeometric2F1[2/3, 4/3, 5/3, (1 - x)/
(1 - k*x)])/(2*(1 - k)*(b - k)*x*((1 - x)*x*(1 - k*x))^(1/3)) - (3*(1 + k)*(5 + 4*k + 5*k^2)*(9*b*k^2 - 3*k^3
- a*(1 + 3*b - k + k^2) - b^2*(1 + 8*k + k^2))*(1 - x)*(((1 - k)*x)/(1 - k*x))^(4/3)*(1 - k*x)*Hypergeometric2
F1[2/3, 4/3, 5/3, (1 - x)/(1 - k*x)])/(28*(1 - k)*(b - k)^3*x*((1 - x)*x*(1 - k*x))^(1/3)) - (3*(1 + k)*(4 - k
 + 4*k^2)*(8*b*k^3 - 2*k^4 + 4*b^3*(1 + 3*k + k^2) + b^2*(1 - 12*k^2 + k^4) + a*(1 + 2*b^2 + k^4 + 4*b*(1 + k
+ k^2)))*(1 - x)*(((1 - k)*x)/(1 - k*x))^(4/3)*(1 - k*x)*Hypergeometric2F1[2/3, 4/3, 5/3, (1 - x)/(1 - k*x)])/
(28*(1 - k)*(b - k)^4*x*((1 - x)*x*(1 - k*x))^(1/3)) - (3*(1 + k)*(a*(1 + 2*b + k^2) + k*(2*b*(1 + 3*k + k^2)
- k*(1 + 4*k + k^2)))*(1 - x)*(((1 - k)*x)/(1 - k*x))^(4/3)*(1 - k*x)*Hypergeometric2F1[2/3, 4/3, 5/3, (1 - x)
/(1 - k*x)])/(4*(1 - k)*(b - k)^2*x*((1 - x)*x*(1 - k*x))^(1/3)) + ((a + b^2)*(1 + 5*b^2 + 5*b^2*k + k^5 + 5*b
*(1 + k^2) + 5*b*k*(1 + k^2) + (1 + 4*b^3 - k - k^5 + k^6 + b^2*(13 + 14*k + 13*k^2) + b*(7 + 2*k + 2*k^2 + 2*
k^3 + 7*k^4))/Sqrt[4*b + (-1 + k)^2])*(1 - x)^(1/3)*x^(1/3)*(1 - k*x)^(1/3)*Defer[Int][1/((1 - x)^(1/3)*x^(13/
3)*(1 - k*x)^(1/3)*(-1 - k - Sqrt[1 + 4*b - 2*k + k^2] + 2*(-b + k)*x)), x])/((b - k)^4*((1 - x)*x*(1 - k*x))^
(1/3)) + ((a + b^2)*(1 + k^5 + 5*b^2*(1 + k) + 5*b*(1 + k + k^2 + k^3) - (1 + 4*b^3 - k - k^5 + k^6 + b^2*(13
+ 14*k + 13*k^2) + b*(7 + 2*k + 2*k^2 + 2*k^3 + 7*k^4))/Sqrt[4*b + (-1 + k)^2])*(1 - x)^(1/3)*x^(1/3)*(1 - k*x
)^(1/3)*Defer[Int][1/((1 - x)^(1/3)*x^(13/3)*(1 - k*x)^(1/3)*(-1 - k + Sqrt[1 + 4*b - 2*k + k^2] + 2*(-b + k)*
x)), x])/((b - k)^4*((1 - x)*x*(1 - k*x))^(1/3))

Rubi steps \begin{align*} \text {integral}& = \frac {\left (\sqrt [3]{1-x} \sqrt [3]{x} \sqrt [3]{1-k x}\right ) \int \frac {(-2+(1+k) x) \left (1-2 (1+k) x+\left (1+4 k+k^2\right ) x^2-2 \left (k+k^2\right ) x^3+\left (a+k^2\right ) x^4\right )}{\sqrt [3]{1-x} x^{13/3} \sqrt [3]{1-k x} \left (1-(1+k) x+(-b+k) x^2\right )} \, dx}{\sqrt [3]{(1-x) x (1-k x)}} \\ & = \frac {\left (\sqrt [3]{1-x} \sqrt [3]{x} \sqrt [3]{1-k x}\right ) \int \left (\frac {8 b k^3-2 k^4+4 b^3 \left (1+3 k+k^2\right )+b^2 \left (1-12 k^2+k^4\right )+a \left (1+2 b^2+k^4+4 b \left (1+k+k^2\right )\right )}{(b-k)^4 \sqrt [3]{1-x} x^{13/3} \sqrt [3]{1-k x}}+\frac {(1+k) \left (9 b k^2-3 k^3-a \left (1+3 b-k+k^2\right )-b^2 \left (1+8 k+k^2\right )\right )}{(b-k)^3 \sqrt [3]{1-x} x^{10/3} \sqrt [3]{1-k x}}+\frac {a \left (1+2 b+k^2\right )+2 b k \left (1+3 k+k^2\right )-k^2 \left (1+4 k+k^2\right )}{(b-k)^2 \sqrt [3]{1-x} x^{7/3} \sqrt [3]{1-k x}}-\frac {(1+k) \left (a+k^2\right )}{(b-k) \sqrt [3]{1-x} x^{4/3} \sqrt [3]{1-k x}}-\frac {\left (a+b^2\right ) \left (1+2 b^2+k^4+4 b \left (1+k+k^2\right )\right )-\left (a+b^2\right ) (1+k) \left (1+5 b^2-k+k^2-k^3+k^4+5 b \left (1+k^2\right )\right ) x}{(b-k)^4 \sqrt [3]{1-x} x^{13/3} \sqrt [3]{1-k x} \left (1+(-1-k) x+(-b+k) x^2\right )}\right ) \, dx}{\sqrt [3]{(1-x) x (1-k x)}} \\ & = -\frac {\left (\sqrt [3]{1-x} \sqrt [3]{x} \sqrt [3]{1-k x}\right ) \int \frac {\left (a+b^2\right ) \left (1+2 b^2+k^4+4 b \left (1+k+k^2\right )\right )-\left (a+b^2\right ) (1+k) \left (1+5 b^2-k+k^2-k^3+k^4+5 b \left (1+k^2\right )\right ) x}{\sqrt [3]{1-x} x^{13/3} \sqrt [3]{1-k x} \left (1+(-1-k) x+(-b+k) x^2\right )} \, dx}{(b-k)^4 \sqrt [3]{(1-x) x (1-k x)}}-\frac {\left ((1+k) \left (a+k^2\right ) \sqrt [3]{1-x} \sqrt [3]{x} \sqrt [3]{1-k x}\right ) \int \frac {1}{\sqrt [3]{1-x} x^{4/3} \sqrt [3]{1-k x}} \, dx}{(b-k) \sqrt [3]{(1-x) x (1-k x)}}+\frac {\left (\left (a \left (1+2 b+k^2\right )+2 b k \left (1+3 k+k^2\right )-k^2 \left (1+4 k+k^2\right )\right ) \sqrt [3]{1-x} \sqrt [3]{x} \sqrt [3]{1-k x}\right ) \int \frac {1}{\sqrt [3]{1-x} x^{7/3} \sqrt [3]{1-k x}} \, dx}{(b-k)^2 \sqrt [3]{(1-x) x (1-k x)}}+\frac {\left ((1+k) \left (9 b k^2-3 k^3-a \left (1+3 b-k+k^2\right )-b^2 \left (1+8 k+k^2\right )\right ) \sqrt [3]{1-x} \sqrt [3]{x} \sqrt [3]{1-k x}\right ) \int \frac {1}{\sqrt [3]{1-x} x^{10/3} \sqrt [3]{1-k x}} \, dx}{(b-k)^3 \sqrt [3]{(1-x) x (1-k x)}}+\frac {\left (\left (8 b k^3-2 k^4+4 b^3 \left (1+3 k+k^2\right )+b^2 \left (1-12 k^2+k^4\right )+a \left (1+2 b^2+k^4+4 b \left (1+k+k^2\right )\right )\right ) \sqrt [3]{1-x} \sqrt [3]{x} \sqrt [3]{1-k x}\right ) \int \frac {1}{\sqrt [3]{1-x} x^{13/3} \sqrt [3]{1-k x}} \, dx}{(b-k)^4 \sqrt [3]{(1-x) x (1-k x)}} \\ & = -\frac {3 \left (8 b k^3-2 k^4+4 b^3 \left (1+3 k+k^2\right )+b^2 \left (1-12 k^2+k^4\right )+a \left (1+2 b^2+k^4+4 b \left (1+k+k^2\right )\right )\right ) (1-x) (1-k x)}{10 (b-k)^4 x^3 \sqrt [3]{(1-x) x (1-k x)}}-\frac {3 (1+k) \left (9 b k^2-3 k^3-a \left (1+3 b-k+k^2\right )-b^2 \left (1+8 k+k^2\right )\right ) (1-x) (1-k x)}{7 (b-k)^3 x^2 \sqrt [3]{(1-x) x (1-k x)}}-\frac {3 \left (a \left (1+2 b+k^2\right )+2 b k \left (1+3 k+k^2\right )-k^2 \left (1+4 k+k^2\right )\right ) (1-x) (1-k x)}{4 (b-k)^2 x \sqrt [3]{(1-x) x (1-k x)}}+\frac {3 (1+k) \left (a+k^2\right ) (1-x) \left (\frac {(1-k) x}{1-k x}\right )^{4/3} (1-k x) \operatorname {Hypergeometric2F1}\left (\frac {2}{3},\frac {4}{3},\frac {5}{3},\frac {1-x}{1-k x}\right )}{2 (1-k) (b-k) x \sqrt [3]{(1-x) x (1-k x)}}-\frac {\left (\sqrt [3]{1-x} \sqrt [3]{x} \sqrt [3]{1-k x}\right ) \int \left (\frac {-\frac {\left (a+b^2\right ) \left (1+7 b+13 b^2+4 b^3-k+2 b k+14 b^2 k+2 b k^2+13 b^2 k^2+2 b k^3+7 b k^4-k^5+k^6\right )}{\sqrt {1+4 b-2 k+k^2}}-\left (a+b^2\right ) (1+k) \left (1+5 b^2-k+k^2-k^3+k^4+5 b \left (1+k^2\right )\right )}{\sqrt [3]{1-x} x^{13/3} \sqrt [3]{1-k x} \left (-1-k-\sqrt {1+4 b-2 k+k^2}+2 (-b+k) x\right )}+\frac {\frac {\left (a+b^2\right ) \left (1+7 b+13 b^2+4 b^3-k+2 b k+14 b^2 k+2 b k^2+13 b^2 k^2+2 b k^3+7 b k^4-k^5+k^6\right )}{\sqrt {1+4 b-2 k+k^2}}-\left (a+b^2\right ) (1+k) \left (1+5 b^2-k+k^2-k^3+k^4+5 b \left (1+k^2\right )\right )}{\sqrt [3]{1-x} x^{13/3} \sqrt [3]{1-k x} \left (-1-k+\sqrt {1+4 b-2 k+k^2}+2 (-b+k) x\right )}\right ) \, dx}{(b-k)^4 \sqrt [3]{(1-x) x (1-k x)}}+\frac {\left ((1+k) \left (a \left (1+2 b+k^2\right )+2 b k \left (1+3 k+k^2\right )-k^2 \left (1+4 k+k^2\right )\right ) \sqrt [3]{1-x} \sqrt [3]{x} \sqrt [3]{1-k x}\right ) \int \frac {1}{\sqrt [3]{1-x} x^{4/3} \sqrt [3]{1-k x}} \, dx}{2 (b-k)^2 \sqrt [3]{(1-x) x (1-k x)}}-\frac {\left (3 (1+k) \left (9 b k^2-3 k^3-a \left (1+3 b-k+k^2\right )-b^2 \left (1+8 k+k^2\right )\right ) \sqrt [3]{1-x} \sqrt [3]{x} \sqrt [3]{1-k x}\right ) \int \frac {-\frac {5}{3} (1+k)+k x}{\sqrt [3]{1-x} x^{7/3} \sqrt [3]{1-k x}} \, dx}{7 (b-k)^3 \sqrt [3]{(1-x) x (1-k x)}}-\frac {\left (3 \left (8 b k^3-2 k^4+4 b^3 \left (1+3 k+k^2\right )+b^2 \left (1-12 k^2+k^4\right )+a \left (1+2 b^2+k^4+4 b \left (1+k+k^2\right )\right )\right ) \sqrt [3]{1-x} \sqrt [3]{x} \sqrt [3]{1-k x}\right ) \int \frac {-\frac {8}{3} (1+k)+2 k x}{\sqrt [3]{1-x} x^{10/3} \sqrt [3]{1-k x}} \, dx}{10 (b-k)^4 \sqrt [3]{(1-x) x (1-k x)}} \\ & = -\frac {3 \left (8 b k^3-2 k^4+4 b^3 \left (1+3 k+k^2\right )+b^2 \left (1-12 k^2+k^4\right )+a \left (1+2 b^2+k^4+4 b \left (1+k+k^2\right )\right )\right ) (1-x) (1-k x)}{10 (b-k)^4 x^3 \sqrt [3]{(1-x) x (1-k x)}}-\frac {3 (1+k) \left (9 b k^2-3 k^3-a \left (1+3 b-k+k^2\right )-b^2 \left (1+8 k+k^2\right )\right ) (1-x) (1-k x)}{7 (b-k)^3 x^2 \sqrt [3]{(1-x) x (1-k x)}}-\frac {12 (1+k) \left (8 b k^3-2 k^4+4 b^3 \left (1+3 k+k^2\right )+b^2 \left (1-12 k^2+k^4\right )+a \left (1+2 b^2+k^4+4 b \left (1+k+k^2\right )\right )\right ) (1-x) (1-k x)}{35 (b-k)^4 x^2 \sqrt [3]{(1-x) x (1-k x)}}-\frac {3 \left (a \left (1+2 b+k^2\right )+2 b k \left (1+3 k+k^2\right )-k^2 \left (1+4 k+k^2\right )\right ) (1-x) (1-k x)}{4 (b-k)^2 x \sqrt [3]{(1-x) x (1-k x)}}-\frac {15 (1+k)^2 \left (9 b k^2-3 k^3-a \left (1+3 b-k+k^2\right )-b^2 \left (1+8 k+k^2\right )\right ) (1-x) (1-k x)}{28 (b-k)^3 x \sqrt [3]{(1-x) x (1-k x)}}+\frac {3 (1+k) \left (a+k^2\right ) (1-x) \left (\frac {(1-k) x}{1-k x}\right )^{4/3} (1-k x) \operatorname {Hypergeometric2F1}\left (\frac {2}{3},\frac {4}{3},\frac {5}{3},\frac {1-x}{1-k x}\right )}{2 (1-k) (b-k) x \sqrt [3]{(1-x) x (1-k x)}}-\frac {3 (1+k) \left (a \left (1+2 b+k^2\right )+k \left (2 b \left (1+3 k+k^2\right )-k \left (1+4 k+k^2\right )\right )\right ) (1-x) \left (\frac {(1-k) x}{1-k x}\right )^{4/3} (1-k x) \operatorname {Hypergeometric2F1}\left (\frac {2}{3},\frac {4}{3},\frac {5}{3},\frac {1-x}{1-k x}\right )}{4 (1-k) (b-k)^2 x \sqrt [3]{(1-x) x (1-k x)}}+\frac {\left (9 (1+k) \left (9 b k^2-3 k^3-a \left (1+3 b-k+k^2\right )-b^2 \left (1+8 k+k^2\right )\right ) \sqrt [3]{1-x} \sqrt [3]{x} \sqrt [3]{1-k x}\right ) \int \frac {2 \left (5+4 k+5 k^2\right )}{9 \sqrt [3]{1-x} x^{4/3} \sqrt [3]{1-k x}} \, dx}{28 (b-k)^3 \sqrt [3]{(1-x) x (1-k x)}}-\frac {\left (\left (\frac {\left (a+b^2\right ) \left (1+7 b+13 b^2+4 b^3-k+2 b k+14 b^2 k+2 b k^2+13 b^2 k^2+2 b k^3+7 b k^4-k^5+k^6\right )}{\sqrt {1+4 b-2 k+k^2}}-\left (a+b^2\right ) (1+k) \left (1+5 b^2-k+k^2-k^3+k^4+5 b \left (1+k^2\right )\right )\right ) \sqrt [3]{1-x} \sqrt [3]{x} \sqrt [3]{1-k x}\right ) \int \frac {1}{\sqrt [3]{1-x} x^{13/3} \sqrt [3]{1-k x} \left (-1-k+\sqrt {1+4 b-2 k+k^2}+2 (-b+k) x\right )} \, dx}{(b-k)^4 \sqrt [3]{(1-x) x (1-k x)}}+\frac {\left (9 \left (8 b k^3-2 k^4+4 b^3 \left (1+3 k+k^2\right )+b^2 \left (1-12 k^2+k^4\right )+a \left (1+2 b^2+k^4+4 b \left (1+k+k^2\right )\right )\right ) \sqrt [3]{1-x} \sqrt [3]{x} \sqrt [3]{1-k x}\right ) \int \frac {\frac {2}{9} \left (20+19 k+20 k^2\right )-\frac {8}{3} k (1+k) x}{\sqrt [3]{1-x} x^{7/3} \sqrt [3]{1-k x}} \, dx}{70 (b-k)^4 \sqrt [3]{(1-x) x (1-k x)}}+\frac {\left (\left (a+b^2\right ) \left (1+5 b^2+5 b^2 k+k^5+5 b \left (1+k^2\right )+5 b k \left (1+k^2\right )+\frac {1+4 b^3-k-k^5+k^6+b^2 \left (13+14 k+13 k^2\right )+b \left (7+2 k+2 k^2+2 k^3+7 k^4\right )}{\sqrt {4 b+(-1+k)^2}}\right ) \sqrt [3]{1-x} \sqrt [3]{x} \sqrt [3]{1-k x}\right ) \int \frac {1}{\sqrt [3]{1-x} x^{13/3} \sqrt [3]{1-k x} \left (-1-k-\sqrt {1+4 b-2 k+k^2}+2 (-b+k) x\right )} \, dx}{(b-k)^4 \sqrt [3]{(1-x) x (1-k x)}} \\ & = \text {Too large to display} \\ \end{align*}

Mathematica [A] (verified)

Time = 10.48 (sec) , antiderivative size = 192, normalized size of antiderivative = 0.81 \[ \int \frac {(-2+(1+k) x) \left (1-2 (1+k) x+\left (1+4 k+k^2\right ) x^2-2 \left (k+k^2\right ) x^3+\left (a+k^2\right ) x^4\right )}{x^4 \sqrt [3]{(1-x) x (1-k x)} \left (1-(1+k) x+(-b+k) x^2\right )} \, dx=\frac {3 ((-1+x) x (-1+k x))^{2/3} \left (2-2 (1+k) x+(5 b+2 k) x^2\right )}{10 x^4}-\frac {\sqrt {3} \left (a+b^2\right ) \arctan \left (\frac {\sqrt {3} \sqrt [3]{b} x}{\sqrt [3]{b} x+2 \sqrt [3]{(-1+x) x (-1+k x)}}\right )}{\sqrt [3]{b}}+\frac {\left (a+b^2\right ) \log \left (-\sqrt [3]{b} x+\sqrt [3]{(-1+x) x (-1+k x)}\right )}{\sqrt [3]{b}}-\frac {\left (a+b^2\right ) \log \left (b^{2/3} x^2+\sqrt [3]{b} x \sqrt [3]{(-1+x) x (-1+k x)}+((-1+x) x (-1+k x))^{2/3}\right )}{2 \sqrt [3]{b}} \]

[In]

Integrate[((-2 + (1 + k)*x)*(1 - 2*(1 + k)*x + (1 + 4*k + k^2)*x^2 - 2*(k + k^2)*x^3 + (a + k^2)*x^4))/(x^4*((
1 - x)*x*(1 - k*x))^(1/3)*(1 - (1 + k)*x + (-b + k)*x^2)),x]

[Out]

(3*((-1 + x)*x*(-1 + k*x))^(2/3)*(2 - 2*(1 + k)*x + (5*b + 2*k)*x^2))/(10*x^4) - (Sqrt[3]*(a + b^2)*ArcTan[(Sq
rt[3]*b^(1/3)*x)/(b^(1/3)*x + 2*((-1 + x)*x*(-1 + k*x))^(1/3))])/b^(1/3) + ((a + b^2)*Log[-(b^(1/3)*x) + ((-1
+ x)*x*(-1 + k*x))^(1/3)])/b^(1/3) - ((a + b^2)*Log[b^(2/3)*x^2 + b^(1/3)*x*((-1 + x)*x*(-1 + k*x))^(1/3) + ((
-1 + x)*x*(-1 + k*x))^(2/3)])/(2*b^(1/3))

Maple [A] (verified)

Time = 1.18 (sec) , antiderivative size = 170, normalized size of antiderivative = 0.71

method result size
pseudoelliptic \(-\frac {-3 \left (\left (-1+x \right ) x \left (k x -1\right )\right )^{\frac {2}{3}} b^{\frac {4}{3}} x^{2}-\frac {6 \left (\left (-1+x \right ) x \left (k x -1\right )\right )^{\frac {2}{3}} \left (-1+x \right ) \left (k x -1\right ) b^{\frac {1}{3}}}{5}+x^{4} \left (-2 \arctan \left (\frac {\sqrt {3}\, \left (b^{\frac {1}{3}} x +2 \left (\left (-1+x \right ) x \left (k x -1\right )\right )^{\frac {1}{3}}\right )}{3 b^{\frac {1}{3}} x}\right ) \sqrt {3}+\ln \left (\frac {b^{\frac {2}{3}} x^{2}+b^{\frac {1}{3}} \left (\left (-1+x \right ) x \left (k x -1\right )\right )^{\frac {1}{3}} x +\left (\left (-1+x \right ) x \left (k x -1\right )\right )^{\frac {2}{3}}}{x^{2}}\right )-2 \ln \left (\frac {-b^{\frac {1}{3}} x +\left (\left (-1+x \right ) x \left (k x -1\right )\right )^{\frac {1}{3}}}{x}\right )\right ) \left (b^{2}+a \right )}{2 b^{\frac {1}{3}} x^{4}}\) \(170\)

[In]

int((-2+(1+k)*x)*(1-2*(1+k)*x+(k^2+4*k+1)*x^2-2*(k^2+k)*x^3+(k^2+a)*x^4)/x^4/((1-x)*x*(-k*x+1))^(1/3)/(1-(1+k)
*x+(-b+k)*x^2),x,method=_RETURNVERBOSE)

[Out]

-1/2/b^(1/3)*(-3*((-1+x)*x*(k*x-1))^(2/3)*b^(4/3)*x^2-6/5*((-1+x)*x*(k*x-1))^(2/3)*(-1+x)*(k*x-1)*b^(1/3)+x^4*
(-2*arctan(1/3*3^(1/2)*(b^(1/3)*x+2*((-1+x)*x*(k*x-1))^(1/3))/b^(1/3)/x)*3^(1/2)+ln((b^(2/3)*x^2+b^(1/3)*((-1+
x)*x*(k*x-1))^(1/3)*x+((-1+x)*x*(k*x-1))^(2/3))/x^2)-2*ln((-b^(1/3)*x+((-1+x)*x*(k*x-1))^(1/3))/x))*(b^2+a))/x
^4

Fricas [F(-1)]

Timed out. \[ \int \frac {(-2+(1+k) x) \left (1-2 (1+k) x+\left (1+4 k+k^2\right ) x^2-2 \left (k+k^2\right ) x^3+\left (a+k^2\right ) x^4\right )}{x^4 \sqrt [3]{(1-x) x (1-k x)} \left (1-(1+k) x+(-b+k) x^2\right )} \, dx=\text {Timed out} \]

[In]

integrate((-2+(1+k)*x)*(1-2*(1+k)*x+(k^2+4*k+1)*x^2-2*(k^2+k)*x^3+(k^2+a)*x^4)/x^4/((1-x)*x*(-k*x+1))^(1/3)/(1
-(1+k)*x+(-b+k)*x^2),x, algorithm="fricas")

[Out]

Timed out

Sympy [F(-1)]

Timed out. \[ \int \frac {(-2+(1+k) x) \left (1-2 (1+k) x+\left (1+4 k+k^2\right ) x^2-2 \left (k+k^2\right ) x^3+\left (a+k^2\right ) x^4\right )}{x^4 \sqrt [3]{(1-x) x (1-k x)} \left (1-(1+k) x+(-b+k) x^2\right )} \, dx=\text {Timed out} \]

[In]

integrate((-2+(1+k)*x)*(1-2*(1+k)*x+(k**2+4*k+1)*x**2-2*(k**2+k)*x**3+(k**2+a)*x**4)/x**4/((1-x)*x*(-k*x+1))**
(1/3)/(1-(1+k)*x+(-b+k)*x**2),x)

[Out]

Timed out

Maxima [F]

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

[In]

integrate((-2+(1+k)*x)*(1-2*(1+k)*x+(k^2+4*k+1)*x^2-2*(k^2+k)*x^3+(k^2+a)*x^4)/x^4/((1-x)*x*(-k*x+1))^(1/3)/(1
-(1+k)*x+(-b+k)*x^2),x, algorithm="maxima")

[Out]

-integrate(((k^2 + a)*x^4 - 2*(k^2 + k)*x^3 + (k^2 + 4*k + 1)*x^2 - 2*(k + 1)*x + 1)*((k + 1)*x - 2)/(((k*x -
1)*(x - 1)*x)^(1/3)*((b - k)*x^2 + (k + 1)*x - 1)*x^4), x)

Giac [F]

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

[In]

integrate((-2+(1+k)*x)*(1-2*(1+k)*x+(k^2+4*k+1)*x^2-2*(k^2+k)*x^3+(k^2+a)*x^4)/x^4/((1-x)*x*(-k*x+1))^(1/3)/(1
-(1+k)*x+(-b+k)*x^2),x, algorithm="giac")

[Out]

integrate(-((k^2 + a)*x^4 - 2*(k^2 + k)*x^3 + (k^2 + 4*k + 1)*x^2 - 2*(k + 1)*x + 1)*((k + 1)*x - 2)/(((k*x -
1)*(x - 1)*x)^(1/3)*((b - k)*x^2 + (k + 1)*x - 1)*x^4), x)

Mupad [F(-1)]

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

[In]

int(-((x*(k + 1) - 2)*(x^2*(4*k + k^2 + 1) - 2*x*(k + 1) + x^4*(a + k^2) - 2*x^3*(k + k^2) + 1))/(x^4*(x*(k*x
- 1)*(x - 1))^(1/3)*(x*(k + 1) + x^2*(b - k) - 1)),x)

[Out]

int(-((x*(k + 1) - 2)*(x^2*(4*k + k^2 + 1) - 2*x*(k + 1) + x^4*(a + k^2) - 2*x^3*(k + k^2) + 1))/(x^4*(x*(k*x
- 1)*(x - 1))^(1/3)*(x*(k + 1) + x^2*(b - k) - 1)), x)