Optimal. Leaf size=541 \[ \frac {\log \left (a^3 \sqrt [3]{b-a}-2 a^2 x \sqrt [3]{b-a}-a^2 b \sqrt [3]{b-a}+\left (b d^{2/3} \sqrt [3]{a-b}-a d^{2/3} \sqrt [3]{a-b}\right ) \left (x \left (2 a b+b^2\right )-a b^2+x^2 (-a-2 b)+x^3\right )^{2/3}+\sqrt [3]{x \left (2 a b+b^2\right )-a b^2+x^2 (-a-2 b)+x^3} \left (a \sqrt [3]{d} (a-b)^{2/3} (b-a)^{2/3}-\sqrt [3]{d} x (a-b)^{2/3} (b-a)^{2/3}\right )+a x^2 \sqrt [3]{b-a}-b x^2 \sqrt [3]{b-a}+2 a b x \sqrt [3]{b-a}\right )}{4 d^{2/3} \sqrt [3]{a-b} (b-a)^{2/3}}-\frac {\log \left (\sqrt [3]{d} (a-b)^{2/3} \sqrt [3]{x \left (2 a b+b^2\right )-a b^2+x^2 (-a-2 b)+x^3}-x (b-a)^{2/3}+a (b-a)^{2/3}\right )}{2 d^{2/3} \sqrt [3]{a-b} (b-a)^{2/3}}-\frac {\sqrt {3} \tan ^{-1}\left (\frac {\sqrt {3} \sqrt [3]{d} (a-b)^{2/3} \sqrt [3]{x \left (2 a b+b^2\right )-a b^2+x^2 (-a-2 b)+x^3}}{\sqrt [3]{d} (a-b)^{2/3} \sqrt [3]{x \left (2 a b+b^2\right )-a b^2+x^2 (-a-2 b)+x^3}+2 x (b-a)^{2/3}-2 a (b-a)^{2/3}}\right )}{2 d^{2/3} \sqrt [3]{a-b} (b-a)^{2/3}} \]
________________________________________________________________________________________
Rubi [A] time = 1.08, antiderivative size = 513, normalized size of antiderivative = 0.95, number of steps used = 10, number of rules used = 6, integrand size = 53, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.113, Rules used = {6719, 21, 911, 105, 59, 91} \begin {gather*} \frac {\sqrt [3]{x-a} (x-b)^{2/3} \log \left (2 \left (1-\sqrt {d}\right ) \left (a+b \sqrt {d}\right )-2 (1-d) x\right )}{4 d^{2/3} (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 (\sqrt {d}+1\right ) \left (a-b \sqrt {d}\right )\right )}{4 d^{2/3} (a-b) \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}-\frac {3 \sqrt [3]{x-a} (x-b)^{2/3} \log \left (-\frac {\sqrt [3]{x-a}}{\sqrt [6]{d}}-\sqrt [3]{x-b}\right )}{4 d^{2/3} (a-b) \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}-\frac {3 \sqrt [3]{x-a} (x-b)^{2/3} \log \left (\frac {\sqrt [3]{x-a}}{\sqrt [6]{d}}-\sqrt [3]{x-b}\right )}{4 d^{2/3} (a-b) \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}-\frac {\sqrt {3} \sqrt [3]{x-a} (x-b)^{2/3} \tan ^{-1}\left (\frac {1}{\sqrt {3}}-\frac {2 \sqrt [3]{x-a}}{\sqrt {3} \sqrt [6]{d} \sqrt [3]{x-b}}\right )}{2 d^{2/3} (a-b) \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}-\frac {\sqrt {3} \sqrt [3]{x-a} (x-b)^{2/3} \tan ^{-1}\left (\frac {2 \sqrt [3]{x-a}}{\sqrt {3} \sqrt [6]{d} \sqrt [3]{x-b}}+\frac {1}{\sqrt {3}}\right )}{2 d^{2/3} (a-b) \sqrt [3]{-\left ((a-x) (b-x)^2\right )}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 59
Rule 91
Rule 105
Rule 911
Rule 6719
Rubi steps
\begin {align*} \int \frac {b-x}{\sqrt [3]{(-a+x) (-b+x)^2} \left (a^2-b^2 d-2 (a-b d) x+(1-d) x^2\right )} \, dx &=\frac {\left (\sqrt [3]{-a+x} (-b+x)^{2/3}\right ) \int \frac {b-x}{\sqrt [3]{-a+x} (-b+x)^{2/3} \left (a^2-b^2 d-2 (a-b 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 \frac {\sqrt [3]{-b+x}}{\sqrt [3]{-a+x} \left (a^2-b^2 d-2 (a-b 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 a-2 (a-b) \sqrt {d}-2 b d-2 (1-d) x\right )}+\frac {(1-d) \sqrt [3]{-b+x}}{(a-b) \sqrt {d} \sqrt [3]{-a+x} \left (-2 a-2 (a-b) \sqrt {d}+2 b 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 a-2 (a-b) \sqrt {d}-2 b 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 a-2 (a-b) \sqrt {d}+2 b 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 a-2 (a-b) \sqrt {d}+2 b d+2 (1-d) x\right )} \, dx}{\left (1-\sqrt {d}\right ) \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 a-2 (a-b) \sqrt {d}-2 b d-2 (1-d) x\right )} \, dx}{\left (1+\sqrt {d}\right ) \sqrt {d} \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 [3]{-a+x}}{\sqrt {3} \sqrt [6]{d} \sqrt [3]{-b+x}}\right )}{2 (a-b) d^{2/3} \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 [3]{-a+x}}{\sqrt {3} \sqrt [6]{d} \sqrt [3]{-b+x}}\right )}{2 (a-b) d^{2/3} \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 (a+b \sqrt {d}\right )-2 (1-d) x\right )}{4 (a-b) d^{2/3} \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 (a-b \sqrt {d}\right )+2 (1-d) x\right )}{4 (a-b) d^{2/3} \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}-\frac {3 \sqrt [3]{-a+x} (-b+x)^{2/3} \log \left (-\frac {\sqrt [3]{-a+x}}{\sqrt [6]{d}}-\sqrt [3]{-b+x}\right )}{4 (a-b) d^{2/3} \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}-\frac {3 \sqrt [3]{-a+x} (-b+x)^{2/3} \log \left (\frac {\sqrt [3]{-a+x}}{\sqrt [6]{d}}-\sqrt [3]{-b+x}\right )}{4 (a-b) d^{2/3} \sqrt [3]{-\left ((a-x) (b-x)^2\right )}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.30, size = 93, normalized size = 0.17 \begin {gather*} -\frac {3 (x-b) \left (\, _2F_1\left (\frac {1}{3},1;\frac {4}{3};\frac {\sqrt {d} (b-x)}{x-a}\right )-\, _2F_1\left (\frac {1}{3},1;\frac {4}{3};\frac {\sqrt {d} (x-b)}{x-a}\right )\right )}{2 \sqrt {d} (a-b) \sqrt [3]{(x-a) (b-x)^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 3.77, size = 541, normalized size = 1.00 \begin {gather*} \frac {\log \left (a^3 \sqrt [3]{b-a}-2 a^2 x \sqrt [3]{b-a}-a^2 b \sqrt [3]{b-a}+\left (b d^{2/3} \sqrt [3]{a-b}-a d^{2/3} \sqrt [3]{a-b}\right ) \left (x \left (2 a b+b^2\right )-a b^2+x^2 (-a-2 b)+x^3\right )^{2/3}+\sqrt [3]{x \left (2 a b+b^2\right )-a b^2+x^2 (-a-2 b)+x^3} \left (a \sqrt [3]{d} (a-b)^{2/3} (b-a)^{2/3}-\sqrt [3]{d} x (a-b)^{2/3} (b-a)^{2/3}\right )+a x^2 \sqrt [3]{b-a}-b x^2 \sqrt [3]{b-a}+2 a b x \sqrt [3]{b-a}\right )}{4 d^{2/3} \sqrt [3]{a-b} (b-a)^{2/3}}-\frac {\log \left (\sqrt [3]{d} (a-b)^{2/3} \sqrt [3]{x \left (2 a b+b^2\right )-a b^2+x^2 (-a-2 b)+x^3}-x (b-a)^{2/3}+a (b-a)^{2/3}\right )}{2 d^{2/3} \sqrt [3]{a-b} (b-a)^{2/3}}-\frac {\sqrt {3} \tan ^{-1}\left (\frac {\sqrt {3} \sqrt [3]{d} (a-b)^{2/3} \sqrt [3]{x \left (2 a b+b^2\right )-a b^2+x^2 (-a-2 b)+x^3}}{\sqrt [3]{d} (a-b)^{2/3} \sqrt [3]{x \left (2 a b+b^2\right )-a b^2+x^2 (-a-2 b)+x^3}+2 x (b-a)^{2/3}-2 a (b-a)^{2/3}}\right )}{2 d^{2/3} \sqrt [3]{a-b} (b-a)^{2/3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.41, size = 323, normalized size = 0.60 \begin {gather*} \frac {2 \, \sqrt {3} {\left (d^{2}\right )}^{\frac {1}{6}} d \arctan \left (\frac {\sqrt {3} {\left (d^{2}\right )}^{\frac {1}{6}} {\left ({\left (b^{2} d - 2 \, b d x + d x^{2}\right )} {\left (d^{2}\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^{2}\right )}^{\frac {2}{3}}\right )}}{3 \, {\left (b^{2} d^{2} - 2 \, b d^{2} x + d^{2} x^{2}\right )}}\right ) - 2 \, {\left (d^{2}\right )}^{\frac {2}{3}} \log \left (-\frac {{\left (b^{2} - 2 \, b x + x^{2}\right )} {\left (d^{2}\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^{2}\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} d - 2 \, b d x + d x^{2}\right )} {\left (d^{2}\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^{2}\right )}^{\frac {2}{3}}}{b^{2} - 2 \, b x + x^{2}}\right )}{4 \, {\left (a - b\right )} d^{2}} \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*} \int -\frac {b - x}{\left (-{\left (a - x\right )} {\left (b - x\right )}^{2}\right )^{\frac {1}{3}} {\left (b^{2} d + {\left (d - 1\right )} x^{2} - a^{2} - 2 \, {\left (b d - a\right )} x\right )}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.52, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {b -x}{\left (\left (-a +x \right ) \left (-b +x \right )^{2}\right )^{\frac {1}{3}} \left (a^{2}-b^{2} d -2 \left (-b d +a \right ) x +\left (1-d \right ) x^{2}\right )}\, dx \end {gather*}
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*} -\int \frac {b - x}{\left (-{\left (a - x\right )} {\left (b - x\right )}^{2}\right )^{\frac {1}{3}} {\left (b^{2} d + {\left (d - 1\right )} x^{2} - a^{2} - 2 \, {\left (b d - a\right )} x\right )}}\,{d x} \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 (b^2\,d+2\,x\,\left (a-b\,d\right )-a^2+x^2\,\left (d-1\right )\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] 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]
________________________________________________________________________________________