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