Optimal. Leaf size=569 \[ \frac {\sqrt {3} (a-b)^{2/3} d^{4/3} \text {ArcTan}\left (\frac {\sqrt {3} \sqrt [3]{a d-b d} \sqrt [3]{-a b^2+\left (2 a b+b^2\right ) x+(-a-2 b) x^2+x^3}}{-2 a \sqrt [3]{a-b} d^{2/3}+2 \sqrt [3]{a-b} d^{2/3} x+\sqrt [3]{a d-b d} \sqrt [3]{-a b^2+\left (2 a b+b^2\right ) x+(-a-2 b) x^2+x^3}}\right )}{2 ((a-b) d)^{5/3}}+\frac {(a-b)^{2/3} d^{4/3} \log \left (a (a d-b d)^{2/3}-(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 )}{2 ((a-b) d)^{5/3}}-\frac {(a-b)^{2/3} d^{4/3} \log \left (a^3 d \sqrt [3]{a d-b d}-a^2 b d \sqrt [3]{a d-b d}-2 a^2 d \sqrt [3]{a d-b d} x+2 a b d \sqrt [3]{a d-b d} x+a d \sqrt [3]{a d-b d} x^2-b d \sqrt [3]{a d-b d} x^2+\left (-a (a-b)^{2/3} \sqrt [3]{d} (a d-b d)^{2/3}+(a-b)^{2/3} \sqrt [3]{d} (a d-b d)^{2/3} x\right ) \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 ((a-b) d)^{5/3}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.66, antiderivative size = 513, normalized size of antiderivative = 0.90, number of steps
used = 11, number of rules used = 6, integrand size = 52, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {6851, 925,
132, 61, 12, 93} \begin {gather*} \frac {\sqrt {3} \sqrt [3]{x-a} (x-b)^{2/3} \text {ArcTan}\left (\frac {1}{\sqrt {3}}-\frac {2 \sqrt [6]{d} \sqrt [3]{x-a}}{\sqrt {3} \sqrt [3]{x-b}}\right )}{2 \sqrt [3]{d} (a-b) \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}+\frac {\sqrt {3} \sqrt [3]{x-a} (x-b)^{2/3} \text {ArcTan}\left (\frac {2 \sqrt [6]{d} \sqrt [3]{x-a}}{\sqrt {3} \sqrt [3]{x-b}}+\frac {1}{\sqrt {3}}\right )}{2 \sqrt [3]{d} (a-b) \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}-\frac {\sqrt [3]{x-a} (x-b)^{2/3} \log \left (2 \left (\sqrt {d}+1\right ) \left (b-a \sqrt {d}\right )-2 (1-d) x\right )}{4 \sqrt [3]{d} (a-b) \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}-\frac {\sqrt [3]{x-a} (x-b)^{2/3} \log \left (2 (1-d) x-2 \left (1-\sqrt {d}\right ) \left (a \sqrt {d}+b\right )\right )}{4 \sqrt [3]{d} (a-b) \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}+\frac {3 \sqrt [3]{x-a} (x-b)^{2/3} \log \left (-\sqrt [6]{d} \sqrt [3]{x-a}-\sqrt [3]{x-b}\right )}{4 \sqrt [3]{d} (a-b) \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}+\frac {3 \sqrt [3]{x-a} (x-b)^{2/3} \log \left (\sqrt [6]{d} \sqrt [3]{x-a}-\sqrt [3]{x-b}\right )}{4 \sqrt [3]{d} (a-b) \sqrt [3]{-\left ((a-x) (b-x)^2\right )}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 61
Rule 93
Rule 132
Rule 925
Rule 6851
Rubi steps
\begin {align*} \int \frac {-b+x}{\sqrt [3]{(-a+x) (-b+x)^2} \left (-b^2+a^2 d+2 (b-a d) x+(-1+d) x^2\right )} \, dx &=\frac {\left (\sqrt [3]{-a+x} (-b+x)^{2/3}\right ) \int \frac {\sqrt [3]{-b+x}}{\sqrt [3]{-a+x} \left (-b^2+a^2 d+2 (b-a d) x+(-1+d) x^2\right )} \, dx}{\sqrt [3]{(-a+x) (-b+x)^2}}\\ &=\frac {\left (\sqrt [3]{-a+x} (-b+x)^{2/3}\right ) \int \left (\frac {(-1+d) \sqrt [3]{-b+x}}{(a-b) \sqrt {d} \sqrt [3]{-a+x} \left (2 b-2 (a-b) \sqrt {d}-2 a d-2 (1-d) x\right )}+\frac {(-1+d) \sqrt [3]{-b+x}}{(a-b) \sqrt {d} \sqrt [3]{-a+x} \left (-2 b-2 (a-b) \sqrt {d}+2 a d+2 (1-d) x\right )}\right ) \, dx}{\sqrt [3]{(-a+x) (-b+x)^2}}\\ &=-\frac {\left ((1-d) \sqrt [3]{-a+x} (-b+x)^{2/3}\right ) \int \frac {\sqrt [3]{-b+x}}{\sqrt [3]{-a+x} \left (2 b-2 (a-b) \sqrt {d}-2 a d-2 (1-d) x\right )} \, dx}{(a-b) \sqrt {d} \sqrt [3]{(-a+x) (-b+x)^2}}-\frac {\left ((1-d) \sqrt [3]{-a+x} (-b+x)^{2/3}\right ) \int \frac {\sqrt [3]{-b+x}}{\sqrt [3]{-a+x} \left (-2 b-2 (a-b) \sqrt {d}+2 a d+2 (1-d) x\right )} \, dx}{(a-b) \sqrt {d} \sqrt [3]{(-a+x) (-b+x)^2}}\\ &=\frac {\left ((1-d) \sqrt [3]{-a+x} (-b+x)^{2/3}\right ) \int \frac {1}{\sqrt [3]{-a+x} (-b+x)^{2/3} \left (2 b-2 (a-b) \sqrt {d}-2 a d-2 (1-d) x\right )} \, dx}{\left (1-\sqrt {d}\right ) \sqrt [3]{(-a+x) (-b+x)^2}}-\frac {\left ((1-d) \sqrt [3]{-a+x} (-b+x)^{2/3}\right ) \int \frac {1}{\sqrt [3]{-a+x} (-b+x)^{2/3} \left (-2 b-2 (a-b) \sqrt {d}+2 a d+2 (1-d) x\right )} \, dx}{\left (1+\sqrt {d}\right ) \sqrt [3]{(-a+x) (-b+x)^2}}\\ &=\frac {\sqrt {3} \sqrt [3]{-a+x} (-b+x)^{2/3} \tan ^{-1}\left (\frac {1}{\sqrt {3}}-\frac {2 \sqrt [6]{d} \sqrt [3]{-a+x}}{\sqrt {3} \sqrt [3]{-b+x}}\right )}{2 (a-b) \sqrt [3]{d} \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}+\frac {\sqrt {3} \sqrt [3]{-a+x} (-b+x)^{2/3} \tan ^{-1}\left (\frac {1}{\sqrt {3}}+\frac {2 \sqrt [6]{d} \sqrt [3]{-a+x}}{\sqrt {3} \sqrt [3]{-b+x}}\right )}{2 (a-b) \sqrt [3]{d} \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}-\frac {\sqrt [3]{-a+x} (-b+x)^{2/3} \log \left (2 \left (1+\sqrt {d}\right ) \left (b-a \sqrt {d}\right )-2 (1-d) x\right )}{4 (a-b) \sqrt [3]{d} \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}-\frac {\sqrt [3]{-a+x} (-b+x)^{2/3} \log \left (-2 \left (1-\sqrt {d}\right ) \left (b+a \sqrt {d}\right )+2 (1-d) x\right )}{4 (a-b) \sqrt [3]{d} \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}+\frac {3 \sqrt [3]{-a+x} (-b+x)^{2/3} \log \left (-\sqrt [6]{d} \sqrt [3]{-a+x}-\sqrt [3]{-b+x}\right )}{4 (a-b) \sqrt [3]{d} \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}+\frac {3 \sqrt [3]{-a+x} (-b+x)^{2/3} \log \left (\sqrt [6]{d} \sqrt [3]{-a+x}-\sqrt [3]{-b+x}\right )}{4 (a-b) \sqrt [3]{d} \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.30, size = 292, normalized size = 0.51 \begin {gather*} -\frac {(b-x)^{2/3} \sqrt [3]{-a+x} \left (2 \sqrt {3} \text {ArcTan}\left (\frac {1-\frac {2 \sqrt [3]{b-x}}{\sqrt [6]{d} \sqrt [3]{-a+x}}}{\sqrt {3}}\right )+2 \sqrt {3} \text {ArcTan}\left (\frac {1+\frac {2 \sqrt [3]{b-x}}{\sqrt [6]{d} \sqrt [3]{-a+x}}}{\sqrt {3}}\right )-2 \log \left (\sqrt [6]{d}-\frac {\sqrt [3]{b-x}}{\sqrt [3]{-a+x}}\right )-2 \log \left (\sqrt [6]{d}+\frac {\sqrt [3]{b-x}}{\sqrt [3]{-a+x}}\right )+\log \left (\sqrt [3]{d}+\frac {(b-x)^{2/3}}{(-a+x)^{2/3}}-\frac {\sqrt [6]{d} \sqrt [3]{b-x}}{\sqrt [3]{-a+x}}\right )+\log \left (\sqrt [3]{d}+\frac {(b-x)^{2/3}}{(-a+x)^{2/3}}+\frac {\sqrt [6]{d} \sqrt [3]{b-x}}{\sqrt [3]{-a+x}}\right )\right )}{4 (a-b) \sqrt [3]{d} \sqrt [3]{(b-x)^2 (-a+x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.05, size = 0, normalized size = 0.00 \[\int \frac {-b +x}{\left (\left (-a +x \right ) \left (-b +x \right )^{2}\right )^{\frac {1}{3}} \left (-b^{2}+a^{2} d +2 \left (-a d +b \right ) x +\left (-1+d \right ) x^{2}\right )}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.44, size = 755, normalized size = 1.33 \begin {gather*} \left [-\frac {\sqrt {3} d \sqrt {\frac {\left (-d\right )^{\frac {1}{3}}}{d}} \log \left (\frac {2 \, a^{2} d + {\left (2 \, d + 1\right )} x^{2} + b^{2} - 2 \, {\left (2 \, a d + b\right )} x - \sqrt {3} {\left (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}} {\left (a d - d x\right )} - {\left (b^{2} - 2 \, b x + x^{2}\right )} \left (-d\right )^{\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 {2}{3}} \left (-d\right )^{\frac {2}{3}}\right )} \sqrt {\frac {\left (-d\right )^{\frac {1}{3}}}{d}} + 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}} \left (-d\right )^{\frac {1}{3}}}{a^{2} d + {\left (d - 1\right )} x^{2} - b^{2} - 2 \, {\left (a d - b\right )} x}\right ) - 2 \, \left (-d\right )^{\frac {2}{3}} \log \left (-\frac {{\left (b^{2} - 2 \, b x + x^{2}\right )} \left (-d\right )^{\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}} d}{b^{2} - 2 \, b x + x^{2}}\right ) + \left (-d\right )^{\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 (a d - d x\right )} + {\left (b^{2} - 2 \, b x + x^{2}\right )} \left (-d\right )^{\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 {2}{3}} \left (-d\right )^{\frac {2}{3}}}{b^{2} - 2 \, b x + x^{2}}\right )}{4 \, {\left (a - b\right )} d}, -\frac {2 \, \sqrt {3} d \sqrt {-\frac {\left (-d\right )^{\frac {1}{3}}}{d}} \arctan \left (-\frac {\sqrt {3} {\left ({\left (b^{2} - 2 \, b x + x^{2}\right )} \left (-d\right )^{\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}} \left (-d\right )^{\frac {2}{3}}\right )} \sqrt {-\frac {\left (-d\right )^{\frac {1}{3}}}{d}}}{3 \, {\left (b^{2} - 2 \, b x + x^{2}\right )}}\right ) - 2 \, \left (-d\right )^{\frac {2}{3}} \log \left (-\frac {{\left (b^{2} - 2 \, b x + x^{2}\right )} \left (-d\right )^{\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}} d}{b^{2} - 2 \, b x + x^{2}}\right ) + \left (-d\right )^{\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 (a d - d x\right )} + {\left (b^{2} - 2 \, b x + x^{2}\right )} \left (-d\right )^{\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 {2}{3}} \left (-d\right )^{\frac {2}{3}}}{b^{2} - 2 \, b x + x^{2}}\right )}{4 \, {\left (a - b\right )} d}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int -\frac {b-x}{{\left (-\left (a-x\right )\,{\left (b-x\right )}^2\right )}^{1/3}\,\left (a^2\,d+2\,x\,\left (b-a\,d\right )-b^2+x^2\,\left (d-1\right )\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________