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

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

Optimal result

Integrand size = 31, antiderivative size = 543 \[ \int \frac {1}{\sqrt [3]{(-a+x) (-b+x)^2} (a-b d+(-1+d) x)} \, dx=\frac {\sqrt {-3-3 i \sqrt {3}} \sqrt [3]{d} \arctan \left (\frac {\sqrt {3} (a-b)^{2/3} \sqrt [3]{d} \sqrt [3]{-a b^2+\left (2 a b+b^2\right ) x+(-a-2 b) x^2+x^3}}{2 \sqrt [3]{-1} b (-a d+b d)^{2/3}-2 \sqrt [3]{-1} (-a d+b d)^{2/3} x+(a-b)^{2/3} \sqrt [3]{d} \sqrt [3]{-a b^2+\left (2 a b+b^2\right ) x+(-a-2 b) x^2+x^3}}\right )}{\sqrt {2} \sqrt [3]{a-b} (-((a-b) d))^{2/3}}+\frac {\left (\sqrt [3]{d}-i \sqrt {3} \sqrt [3]{d}\right ) \log \left (\sqrt [3]{-1} (-a d+b d)^{2/3} (b-x)-(a-b)^{2/3} \sqrt [3]{d} \sqrt [3]{-a b^2+\left (2 a b+b^2\right ) x+(-a-2 b) x^2+x^3}\right )}{2 \sqrt [3]{a-b} (-((a-b) d))^{2/3}}+\frac {i \left (i \sqrt [3]{d}+\sqrt {3} \sqrt [3]{d}\right ) \log \left ((-1)^{2/3} d \sqrt [3]{-a d+b d} \left (a b^2-b^3-2 a b x+2 b^2 x+a x^2-b x^2\right )+\sqrt [3]{-1} (a-b)^{2/3} \sqrt [3]{d} (-a d+b d)^{2/3} (-b+x) \sqrt [3]{-a b^2+\left (2 a b+b^2\right ) x+(-a-2 b) x^2+x^3}-(a-b)^{4/3} d^{2/3} \left (-a b^2+\left (2 a b+b^2\right ) x+(-a-2 b) x^2+x^3\right )^{2/3}\right )}{4 \sqrt [3]{a-b} (-((a-b) d))^{2/3}} \]

[Out]

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

Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 377, normalized size of antiderivative = 0.69, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {2106, 2102, 93} \[ \int \frac {1}{\sqrt [3]{(-a+x) (-b+x)^2} (a-b d+(-1+d) x)} \, dx=-\frac {\sqrt {3} \left ((a-b)^2 (b-x)\right )^{2/3} \sqrt [3]{(a-b)^2 (x-a)} \arctan \left (\frac {1}{\sqrt {3}}-\frac {2 \sqrt [3]{(a-b)^2 (x-a)}}{\sqrt {3} \sqrt [3]{d} \sqrt [3]{(a-b)^2 (b-x)}}\right )}{\sqrt [3]{d} (a-b)^3 \sqrt [3]{-a b^2+x^2 (-a-2 b)+b x (2 a+b)+x^3}}+\frac {\left ((a-b)^2 (b-x)\right )^{2/3} \sqrt [3]{(a-b)^2 (x-a)} \log (a-b d+(d-1) x)}{2 \sqrt [3]{d} (a-b)^3 \sqrt [3]{-a b^2+x^2 (-a-2 b)+b x (2 a+b)+x^3}}-\frac {3 \left ((a-b)^2 (b-x)\right )^{2/3} \sqrt [3]{(a-b)^2 (x-a)} \log \left (-\frac {\sqrt [3]{\frac {2}{3}} \sqrt [3]{(a-b)^2 (x-a)}}{\sqrt [3]{d}}-\sqrt [3]{\frac {2}{3}} \sqrt [3]{(a-b)^2 (b-x)}\right )}{2 \sqrt [3]{d} (a-b)^3 \sqrt [3]{-a b^2+x^2 (-a-2 b)+b x (2 a+b)+x^3}} \]

[In]

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

[Out]

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

Rule 93

Int[1/(((a_.) + (b_.)*(x_))^(1/3)*((c_.) + (d_.)*(x_))^(2/3)*((e_.) + (f_.)*(x_))), x_Symbol] :> With[{q = Rt[
(d*e - c*f)/(b*e - a*f), 3]}, Simp[(-Sqrt[3])*q*(ArcTan[1/Sqrt[3] + 2*q*((a + b*x)^(1/3)/(Sqrt[3]*(c + d*x)^(1
/3)))]/(d*e - c*f)), x] + (Simp[q*(Log[e + f*x]/(2*(d*e - c*f))), x] - Simp[3*q*(Log[q*(a + b*x)^(1/3) - (c +
d*x)^(1/3)]/(2*(d*e - c*f))), x])] /; FreeQ[{a, b, c, d, e, f}, x]

Rule 2102

Int[((e_.) + (f_.)*(x_))^(m_.)*((a_) + (b_.)*(x_) + (d_.)*(x_)^3)^(p_), x_Symbol] :> Dist[(a + b*x + d*x^3)^p/
((3*a - b*x)^p*(3*a + 2*b*x)^(2*p)), Int[(e + f*x)^m*(3*a - b*x)^p*(3*a + 2*b*x)^(2*p), x], x] /; FreeQ[{a, b,
 d, e, f, m, p}, x] && EqQ[4*b^3 + 27*a^2*d, 0] &&  !IntegerQ[p]

Rule 2106

Int[(P3_)^(p_.)*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> With[{a = Coeff[P3, x, 0], b = Coeff[P3, x, 1], c = C
oeff[P3, x, 2], d = Coeff[P3, x, 3]}, Subst[Int[((3*d*e - c*f)/(3*d) + f*x)^m*Simp[(2*c^3 - 9*b*c*d + 27*a*d^2
)/(27*d^2) - (c^2 - 3*b*d)*(x/(3*d)) + d*x^3, x]^p, x], x, x + c/(3*d)] /; NeQ[c, 0]] /; FreeQ[{e, f, m, p}, x
] && PolyQ[P3, x, 3]

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

Mathematica [A] (verified)

Time = 0.20 (sec) , antiderivative size = 174, normalized size of antiderivative = 0.32 \[ \int \frac {1}{\sqrt [3]{(-a+x) (-b+x)^2} (a-b d+(-1+d) x)} \, dx=\frac {(b-x)^{2/3} \sqrt [3]{-a+x} \left (2 \sqrt {3} \arctan \left (\frac {1-\frac {2 \sqrt [3]{d} \sqrt [3]{b-x}}{\sqrt [3]{-a+x}}}{\sqrt {3}}\right )+\log \left (1+\frac {d^{2/3} (b-x)^{2/3}}{(-a+x)^{2/3}}-\frac {\sqrt [3]{d} \sqrt [3]{b-x}}{\sqrt [3]{-a+x}}\right )-2 \log \left (1+\frac {\sqrt [3]{d} \sqrt [3]{b-x}}{\sqrt [3]{-a+x}}\right )\right )}{2 (a-b) \sqrt [3]{d} \sqrt [3]{(b-x)^2 (-a+x)}} \]

[In]

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

[Out]

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

Maple [F]

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

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 662, normalized size of antiderivative = 1.22 \[ \int \frac {1}{\sqrt [3]{(-a+x) (-b+x)^2} (a-b d+(-1+d) x)} \, dx=\left [-\frac {\sqrt {3} d \sqrt {-\frac {1}{d^{\frac {2}{3}}}} \log \left (-\frac {b^{2} d + {\left (d + 2\right )} x^{2} + 2 \, a b + 3 \, {\left (-a b^{2} - {\left (a + 2 \, b\right )} x^{2} + x^{3} + {\left (2 \, a b + b^{2}\right )} x\right )}^{\frac {1}{3}} {\left (b - x\right )} d^{\frac {2}{3}} - 2 \, {\left (b d + a + b\right )} x + \sqrt {3} {\left ({\left (-a b^{2} - {\left (a + 2 \, b\right )} x^{2} + x^{3} + {\left (2 \, a b + b^{2}\right )} x\right )}^{\frac {1}{3}} {\left (b d - d x\right )} - {\left (b^{2} d - 2 \, b d x + d x^{2}\right )} d^{\frac {1}{3}} + 2 \, {\left (-a b^{2} - {\left (a + 2 \, b\right )} x^{2} + x^{3} + {\left (2 \, a b + b^{2}\right )} x\right )}^{\frac {2}{3}} d^{\frac {2}{3}}\right )} \sqrt {-\frac {1}{d^{\frac {2}{3}}}}}{b^{2} d + {\left (d - 1\right )} x^{2} - a b - {\left (2 \, b d - a - b\right )} x}\right ) - d^{\frac {2}{3}} \log \left (-\frac {{\left (-a b^{2} - {\left (a + 2 \, b\right )} x^{2} + x^{3} + {\left (2 \, a b + b^{2}\right )} x\right )}^{\frac {1}{3}} {\left (b - x\right )} d^{\frac {1}{3}} - {\left (b^{2} - 2 \, b x + x^{2}\right )} d^{\frac {2}{3}} - {\left (-a b^{2} - {\left (a + 2 \, b\right )} x^{2} + x^{3} + {\left (2 \, a b + b^{2}\right )} x\right )}^{\frac {2}{3}}}{b^{2} - 2 \, b x + x^{2}}\right ) + 2 \, d^{\frac {2}{3}} \log \left (-\frac {{\left (b - x\right )} d^{\frac {1}{3}} + {\left (-a b^{2} - {\left (a + 2 \, b\right )} x^{2} + x^{3} + {\left (2 \, a b + b^{2}\right )} x\right )}^{\frac {1}{3}}}{b - x}\right )}{2 \, {\left (a - b\right )} d}, -\frac {2 \, \sqrt {3} d^{\frac {2}{3}} \arctan \left (\frac {\sqrt {3} {\left ({\left (b - x\right )} d^{\frac {1}{3}} - 2 \, {\left (-a b^{2} - {\left (a + 2 \, b\right )} x^{2} + x^{3} + {\left (2 \, a b + b^{2}\right )} x\right )}^{\frac {1}{3}}\right )}}{3 \, {\left (b - x\right )} d^{\frac {1}{3}}}\right ) - d^{\frac {2}{3}} \log \left (-\frac {{\left (-a b^{2} - {\left (a + 2 \, b\right )} x^{2} + x^{3} + {\left (2 \, a b + b^{2}\right )} x\right )}^{\frac {1}{3}} {\left (b - x\right )} d^{\frac {1}{3}} - {\left (b^{2} - 2 \, b x + x^{2}\right )} d^{\frac {2}{3}} - {\left (-a b^{2} - {\left (a + 2 \, b\right )} x^{2} + x^{3} + {\left (2 \, a b + b^{2}\right )} x\right )}^{\frac {2}{3}}}{b^{2} - 2 \, b x + x^{2}}\right ) + 2 \, d^{\frac {2}{3}} \log \left (-\frac {{\left (b - x\right )} d^{\frac {1}{3}} + {\left (-a b^{2} - {\left (a + 2 \, b\right )} x^{2} + x^{3} + {\left (2 \, a b + b^{2}\right )} x\right )}^{\frac {1}{3}}}{b - x}\right )}{2 \, {\left (a - b\right )} d}\right ] \]

[In]

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

[Out]

[-1/2*(sqrt(3)*d*sqrt(-1/d^(2/3))*log(-(b^2*d + (d + 2)*x^2 + 2*a*b + 3*(-a*b^2 - (a + 2*b)*x^2 + x^3 + (2*a*b
 + b^2)*x)^(1/3)*(b - x)*d^(2/3) - 2*(b*d + a + b)*x + sqrt(3)*((-a*b^2 - (a + 2*b)*x^2 + x^3 + (2*a*b + b^2)*
x)^(1/3)*(b*d - d*x) - (b^2*d - 2*b*d*x + d*x^2)*d^(1/3) + 2*(-a*b^2 - (a + 2*b)*x^2 + x^3 + (2*a*b + b^2)*x)^
(2/3)*d^(2/3))*sqrt(-1/d^(2/3)))/(b^2*d + (d - 1)*x^2 - a*b - (2*b*d - a - b)*x)) - d^(2/3)*log(-((-a*b^2 - (a
 + 2*b)*x^2 + x^3 + (2*a*b + b^2)*x)^(1/3)*(b - x)*d^(1/3) - (b^2 - 2*b*x + x^2)*d^(2/3) - (-a*b^2 - (a + 2*b)
*x^2 + x^3 + (2*a*b + b^2)*x)^(2/3))/(b^2 - 2*b*x + x^2)) + 2*d^(2/3)*log(-((b - x)*d^(1/3) + (-a*b^2 - (a + 2
*b)*x^2 + x^3 + (2*a*b + b^2)*x)^(1/3))/(b - x)))/((a - b)*d), -1/2*(2*sqrt(3)*d^(2/3)*arctan(1/3*sqrt(3)*((b
- x)*d^(1/3) - 2*(-a*b^2 - (a + 2*b)*x^2 + x^3 + (2*a*b + b^2)*x)^(1/3))/((b - x)*d^(1/3))) - d^(2/3)*log(-((-
a*b^2 - (a + 2*b)*x^2 + x^3 + (2*a*b + b^2)*x)^(1/3)*(b - x)*d^(1/3) - (b^2 - 2*b*x + x^2)*d^(2/3) - (-a*b^2 -
 (a + 2*b)*x^2 + x^3 + (2*a*b + b^2)*x)^(2/3))/(b^2 - 2*b*x + x^2)) + 2*d^(2/3)*log(-((b - x)*d^(1/3) + (-a*b^
2 - (a + 2*b)*x^2 + x^3 + (2*a*b + b^2)*x)^(1/3))/(b - x)))/((a - b)*d)]

Sympy [F]

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

[In]

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

[Out]

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

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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