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

   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 = 65, antiderivative size = 89 \[ \int \frac {-a b+2 (a-b) x+x^2}{\sqrt [4]{x (-a+x) (-b+x)} \left (-a^3+\left (3 a^2+b d\right ) x-(3 a+d) x^2+x^3\right )} \, dx=-\frac {2 \arctan \left (\frac {\sqrt [4]{d} \sqrt [4]{a b x+(-a-b) x^2+x^3}}{a-x}\right )}{d^{3/4}}+\frac {2 \text {arctanh}\left (\frac {\sqrt [4]{d} \sqrt [4]{a b x+(-a-b) x^2+x^3}}{a-x}\right )}{d^{3/4}} \]

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

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

[In]

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

[Out]

(2*(ArcTan[(d^(1/4)*x*(-b + x))/(x*(-a + x)*(-b + x))^(3/4)] + ArcTanh[(d^(1/4)*(x*(-a + x)*(-b + x))^(1/4))/(
a - x)]))/d^(3/4)

Maple [F]

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

[In]

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

[Out]

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

Fricas [F(-1)]

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

[In]

integrate((-a*b+2*(a-b)*x+x^2)/(x*(-a+x)*(-b+x))^(1/4)/(-a^3+(3*a^2+b*d)*x-(3*a+d)*x^2+x^3),x, algorithm="fric
as")

[Out]

Timed out

Sympy [F(-1)]

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

[In]

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

[Out]

Timed out

Maxima [F]

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

[In]

integrate((-a*b+2*(a-b)*x+x^2)/(x*(-a+x)*(-b+x))^(1/4)/(-a^3+(3*a^2+b*d)*x-(3*a+d)*x^2+x^3),x, algorithm="maxi
ma")

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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