\(\int \frac {(a-2 b+x) (-b+x)}{\sqrt [3]{(-a+x) (-b+x)} (a^4-b^2 d-2 (2 a^3-b d) x+(6 a^2-d) x^2-4 a x^3+x^4)} \, dx\) [2836]

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

Optimal result

Integrand size = 74, antiderivative size = 289 \[ \int \frac {(a-2 b+x) (-b+x)}{\sqrt [3]{(-a+x) (-b+x)} \left (a^4-b^2 d-2 \left (2 a^3-b d\right ) x+\left (6 a^2-d\right ) x^2-4 a x^3+x^4\right )} \, dx=-\frac {\sqrt {3} \arctan \left (\frac {\sqrt {3} \sqrt [6]{d} \sqrt [3]{a b+(-a-b) x+x^2}}{2 a-2 x+\sqrt [6]{d} \sqrt [3]{a b+(-a-b) x+x^2}}\right )}{2 d^{5/6}}+\frac {\sqrt {3} \arctan \left (\frac {\sqrt {3} \sqrt [6]{d} \sqrt [3]{a b+(-a-b) x+x^2}}{-2 a+2 x+\sqrt [6]{d} \sqrt [3]{a b+(-a-b) x+x^2}}\right )}{2 d^{5/6}}+\frac {\text {arctanh}\left (\frac {\sqrt [6]{d} \sqrt [3]{a b+(-a-b) x+x^2}}{a-x}\right )}{d^{5/6}}+\frac {\text {arctanh}\left (\frac {\left (a \sqrt [6]{d}-\sqrt [6]{d} x\right ) \sqrt [3]{a b+(-a-b) x+x^2}}{a^2-2 a x+x^2+\sqrt [3]{d} \left (a b+(-a-b) x+x^2\right )^{2/3}}\right )}{2 d^{5/6}} \]

[Out]

-1/2*3^(1/2)*arctan(3^(1/2)*d^(1/6)*(a*b+(-a-b)*x+x^2)^(1/3)/(2*a-2*x+d^(1/6)*(a*b+(-a-b)*x+x^2)^(1/3)))/d^(5/
6)+1/2*3^(1/2)*arctan(3^(1/2)*d^(1/6)*(a*b+(-a-b)*x+x^2)^(1/3)/(-2*a+2*x+d^(1/6)*(a*b+(-a-b)*x+x^2)^(1/3)))/d^
(5/6)+arctanh(d^(1/6)*(a*b+(-a-b)*x+x^2)^(1/3)/(a-x))/d^(5/6)+1/2*arctanh((a*d^(1/6)-d^(1/6)*x)*(a*b+(-a-b)*x+
x^2)^(1/3)/(a^2-2*a*x+x^2+d^(1/3)*(a*b+(-a-b)*x+x^2)^(2/3)))/d^(5/6)

Rubi [F]

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

[In]

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

[Out]

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {(a-2 b+x) (-b+x)}{\sqrt [3]{a b+(-a-b) x+x^2} \left (a^4-b^2 d-2 \left (2 a^3-b d\right ) x+\left (6 a^2-d\right ) x^2-4 a x^3+x^4\right )} \, dx \\ & = \int \frac {(b-x) (-a+2 b-x)}{\sqrt [3]{a b-(a+b) x+x^2} \left (a^4-b^2 d-2 \left (2 a^3-b d\right ) x+\left (6 a^2-d\right ) x^2-4 a x^3+x^4\right )} \, dx \\ & = \int \left (\frac {a b \left (1-\frac {2 b}{a}\right )}{\sqrt [3]{a b-(a+b) x+x^2} \left (-a^4+b^2 d+2 \left (2 a^3-b d\right ) x-\left (6 a^2-d\right ) x^2+4 a x^3-x^4\right )}+\frac {3 \left (1-\frac {a}{3 b}\right ) b x}{\sqrt [3]{a b-(a+b) x+x^2} \left (-a^4+b^2 d+2 \left (2 a^3-b d\right ) x-\left (6 a^2-d\right ) x^2+4 a x^3-x^4\right )}+\frac {x^2}{\sqrt [3]{a b-(a+b) x+x^2} \left (a^4-b^2 d-2 \left (2 a^3-b d\right ) x+\left (6 a^2-d\right ) x^2-4 a x^3+x^4\right )}\right ) \, dx \\ & = ((a-2 b) b) \int \frac {1}{\sqrt [3]{a b-(a+b) x+x^2} \left (-a^4+b^2 d+2 \left (2 a^3-b d\right ) x-\left (6 a^2-d\right ) x^2+4 a x^3-x^4\right )} \, dx+(-a+3 b) \int \frac {x}{\sqrt [3]{a b-(a+b) x+x^2} \left (-a^4+b^2 d+2 \left (2 a^3-b d\right ) x-\left (6 a^2-d\right ) x^2+4 a x^3-x^4\right )} \, dx+\int \frac {x^2}{\sqrt [3]{a b-(a+b) x+x^2} \left (a^4-b^2 d-2 \left (2 a^3-b d\right ) x+\left (6 a^2-d\right ) x^2-4 a x^3+x^4\right )} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 11.93 (sec) , antiderivative size = 225, normalized size of antiderivative = 0.78 \[ \int \frac {(a-2 b+x) (-b+x)}{\sqrt [3]{(-a+x) (-b+x)} \left (a^4-b^2 d-2 \left (2 a^3-b d\right ) x+\left (6 a^2-d\right ) x^2-4 a x^3+x^4\right )} \, dx=\frac {\sqrt {3} \left (-\arctan \left (\frac {\sqrt {3} \sqrt [6]{d} \sqrt [3]{(-a+x) (-b+x)}}{2 a-2 x+\sqrt [6]{d} \sqrt [3]{(-a+x) (-b+x)}}\right )+\arctan \left (\frac {\sqrt {3} \sqrt [6]{d} \sqrt [3]{(-a+x) (-b+x)}}{-2 a+2 x+\sqrt [6]{d} \sqrt [3]{(-a+x) (-b+x)}}\right )\right )-2 \text {arctanh}\left (\frac {\sqrt [6]{d} (-b+x)}{((-a+x) (-b+x))^{2/3}}\right )-\text {arctanh}\left (\frac {\sqrt [6]{d} (-a+x) \sqrt [3]{(-a+x) (-b+x)}}{a^2-2 a x+x^2+\sqrt [3]{d} ((-a+x) (-b+x))^{2/3}}\right )}{2 d^{5/6}} \]

[In]

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

[Out]

(Sqrt[3]*(-ArcTan[(Sqrt[3]*d^(1/6)*((-a + x)*(-b + x))^(1/3))/(2*a - 2*x + d^(1/6)*((-a + x)*(-b + x))^(1/3))]
 + ArcTan[(Sqrt[3]*d^(1/6)*((-a + x)*(-b + x))^(1/3))/(-2*a + 2*x + d^(1/6)*((-a + x)*(-b + x))^(1/3))]) - 2*A
rcTanh[(d^(1/6)*(-b + x))/((-a + x)*(-b + x))^(2/3)] - ArcTanh[(d^(1/6)*(-a + x)*((-a + x)*(-b + x))^(1/3))/(a
^2 - 2*a*x + x^2 + d^(1/3)*((-a + x)*(-b + x))^(2/3))])/(2*d^(5/6))

Maple [F]

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

[In]

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

[Out]

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

Fricas [F(-1)]

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

[In]

integrate((a-2*b+x)*(-b+x)/((-a+x)*(-b+x))^(1/3)/(a^4-b^2*d-2*(2*a^3-b*d)*x+(6*a^2-d)*x^2-4*a*x^3+x^4),x, algo
rithm="fricas")

[Out]

Timed out

Sympy [F(-1)]

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

[In]

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

[Out]

Timed out

Maxima [F]

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

[In]

integrate((a-2*b+x)*(-b+x)/((-a+x)*(-b+x))^(1/3)/(a^4-b^2*d-2*(2*a^3-b*d)*x+(6*a^2-d)*x^2-4*a*x^3+x^4),x, algo
rithm="maxima")

[Out]

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

Giac [F]

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

[In]

integrate((a-2*b+x)*(-b+x)/((-a+x)*(-b+x))^(1/3)/(a^4-b^2*d-2*(2*a^3-b*d)*x+(6*a^2-d)*x^2-4*a*x^3+x^4),x, algo
rithm="giac")

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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