\[ \int \frac {x^7 (-4 a+3 x)}{\left (x^2 (-a+x)\right )^{2/3} \left (-a^2+2 a x-x^2+d x^8\right )} \, dx \]
Optimal antiderivative \[ -\frac {\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, d^{\frac {1}{6}} x^{2}}{d^{\frac {1}{6}} x^{2}-2 \left (-a \,x^{2}+x^{3}\right )^{\frac {1}{3}}}\right )}{2 d^{\frac {5}{6}}}+\frac {\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, d^{\frac {1}{6}} x^{2}}{d^{\frac {1}{6}} x^{2}+2 \left (-a \,x^{2}+x^{3}\right )^{\frac {1}{3}}}\right )}{2 d^{\frac {5}{6}}}+\frac {\arctanh \left (\frac {d^{\frac {1}{6}} \left (-a \,x^{2}+x^{3}\right )^{\frac {2}{3}}}{a -x}\right )}{d^{\frac {5}{6}}}-\frac {\arctanh \left (\frac {d^{\frac {1}{6}} x^{4}+\frac {\left (-a \,x^{2}+x^{3}\right )^{\frac {2}{3}}}{d^{\frac {1}{6}}}}{x^{2} \left (-a \,x^{2}+x^{3}\right )^{\frac {1}{3}}}\right )}{2 d^{\frac {5}{6}}} \]
command
Integrate[(x^7*(-4*a + 3*x))/((x^2*(-a + x))^(2/3)*(-a^2 + 2*a*x - x^2 + d*x^8)),x]
Mathematica 13.1 output
\[ \frac {x^{4/3} (-a+x)^{2/3} \left (\sqrt {3} \left (\text {ArcTan}\left (\frac {1-\frac {2 \sqrt [3]{-a+x}}{\sqrt [6]{d} x^{4/3}}}{\sqrt {3}}\right )-\text {ArcTan}\left (\frac {1+\frac {2 \sqrt [3]{-a+x}}{\sqrt [6]{d} x^{4/3}}}{\sqrt {3}}\right )\right )-2 \tanh ^{-1}\left (\frac {\sqrt [3]{-a+x}}{\sqrt [6]{d} x^{4/3}}\right )-\tanh ^{-1}\left (\frac {\sqrt [6]{d} x^{4/3} \sqrt [3]{-a+x}}{\sqrt [3]{d} x^{8/3}+(-a+x)^{2/3}}\right )\right )}{2 d^{5/6} \left (x^2 (-a+x)\right )^{2/3}} \]
Mathematica 12.3 output
\[ \int \frac {x^7 (-4 a+3 x)}{\left (x^2 (-a+x)\right )^{2/3} \left (-a^2+2 a x-x^2+d x^8\right )} \, dx \]________________________________________________________________________________________