\[ \int \frac {-1+(-1+2 k) x}{\sqrt [3]{(1-x) x (1-k x)} \left (1-(2+b) x+(1+b k) x^2\right )} \, dx \]
Optimal antiderivative \[ \frac {\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, b^{\frac {1}{3}} \left (x +\left (-1-k \right ) x^{2}+k \,x^{3}\right )^{\frac {1}{3}}}{2-2 x +b^{\frac {1}{3}} \left (x +\left (-1-k \right ) x^{2}+k \,x^{3}\right )^{\frac {1}{3}}}\right )}{b^{\frac {2}{3}}}+\frac {\ln \left (-1+x +b^{\frac {1}{3}} \left (x +\left (-1-k \right ) x^{2}+k \,x^{3}\right )^{\frac {1}{3}}\right )}{b^{\frac {2}{3}}}-\frac {\ln \left (1-2 x +x^{2}+\left (b^{\frac {1}{3}}-b^{\frac {1}{3}} x \right ) \left (x +\left (-1-k \right ) x^{2}+k \,x^{3}\right )^{\frac {1}{3}}+b^{\frac {2}{3}} \left (x +\left (-1-k \right ) x^{2}+k \,x^{3}\right )^{\frac {2}{3}}\right )}{2 b^{\frac {2}{3}}} \]
command
Integrate[(-1 + (-1 + 2*k)*x)/(((1 - x)*x*(1 - k*x))^(1/3)*(1 - (2 + b)*x + (1 + b*k)*x^2)),x]
Mathematica 13.1 output
\[ \frac {x \sqrt [3]{\frac {-1+k x}{-1+x}} \left (2 \sqrt {3} \text {ArcTan}\left (\frac {\sqrt {3} \sqrt [3]{b} \sqrt [3]{\frac {x}{-1+x}} \sqrt [3]{\frac {-1+k x}{-1+x}}}{-2+\sqrt [3]{b} \sqrt [3]{\frac {x}{-1+x}} \sqrt [3]{\frac {-1+k x}{-1+x}}}\right )-2 \log \left (\sqrt [3]{\frac {x}{-1+x}} \sqrt [3]{\frac {-1+k x}{-1+x}}\right )+\log \left (\left (\frac {x}{-1+x}\right )^{2/3} \left (\frac {-1+k x}{-1+x}\right )^{2/3}\right )+2 \log \left (1+\sqrt [3]{b} \sqrt [3]{\frac {x}{-1+x}} \sqrt [3]{\frac {-1+k x}{-1+x}}\right )-\log \left (1-\sqrt [3]{b} \sqrt [3]{\frac {x}{-1+x}} \sqrt [3]{\frac {-1+k x}{-1+x}}+b^{2/3} \left (\frac {x}{-1+x}\right )^{2/3} \left (\frac {-1+k x}{-1+x}\right )^{2/3}\right )\right )}{2 b^{2/3} \left (\frac {x}{-1+x}\right )^{2/3} \sqrt [3]{(-1+x) x (-1+k x)}} \]
Mathematica 12.3 output
\[ \int \frac {-1+(-1+2 k) x}{\sqrt [3]{(1-x) x (1-k x)} \left (1-(2+b) x+(1+b k) x^2\right )} \, dx \]________________________________________________________________________________________