Optimal. Leaf size=267 \[ \frac {\sqrt {3} \text {ArcTan}\left (\frac {\sqrt {3} b-\sqrt {3} x}{b-x-2 \sqrt [3]{d} \sqrt [3]{-a b^2+\left (2 a b+b^2\right ) x+(-a-2 b) x^2+x^3}}\right )}{(a-b) \sqrt [3]{d}}+\frac {\log \left (b-x+\sqrt [3]{d} \sqrt [3]{-a b^2+\left (2 a b+b^2\right ) x+(-a-2 b) x^2+x^3}\right )}{(a-b) \sqrt [3]{d}}-\frac {\log \left (b^2-2 b x+x^2+\left (-b \sqrt [3]{d}+\sqrt [3]{d} x\right ) \sqrt [3]{-a b^2+\left (2 a b+b^2\right ) x+(-a-2 b) x^2+x^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 )}{2 (a-b) \sqrt [3]{d}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.52, antiderivative size = 239, normalized size of antiderivative = 0.90, number of steps
used = 2, number of rules used = 2, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {6851, 93}
\begin {gather*} \frac {\sqrt {3} (x-a)^{2/3} (x-b)^{4/3} \text {ArcTan}\left (\frac {2 \sqrt [3]{x-b}}{\sqrt {3} \sqrt [3]{d} \sqrt [3]{x-a}}+\frac {1}{\sqrt {3}}\right )}{\sqrt [3]{d} (a-b) \left (-\left ((a-x) (b-x)^2\right )\right )^{2/3}}-\frac {(x-a)^{2/3} (x-b)^{4/3} \log (-a d+b-(1-d) x)}{2 \sqrt [3]{d} (a-b) \left (-\left ((a-x) (b-x)^2\right )\right )^{2/3}}+\frac {3 (x-a)^{2/3} (x-b)^{4/3} \log \left (\frac {\sqrt [3]{x-b}}{\sqrt [3]{d}}-\sqrt [3]{x-a}\right )}{2 \sqrt [3]{d} (a-b) \left (-\left ((a-x) (b-x)^2\right )\right )^{2/3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 93
Rule 6851
Rubi steps
\begin {align*} \int \frac {-b+x}{\left ((-a+x) (-b+x)^2\right )^{2/3} (b-a d+(-1+d) x)} \, dx &=\frac {\left ((-a+x)^{2/3} (-b+x)^{4/3}\right ) \int \frac {1}{(-a+x)^{2/3} \sqrt [3]{-b+x} (b-a d+(-1+d) x)} \, dx}{\left ((-a+x) (-b+x)^2\right )^{2/3}}\\ &=\frac {\sqrt {3} (-a+x)^{2/3} (-b+x)^{4/3} \tan ^{-1}\left (\frac {1}{\sqrt {3}}+\frac {2 \sqrt [3]{-b+x}}{\sqrt {3} \sqrt [3]{d} \sqrt [3]{-a+x}}\right )}{(a-b) \sqrt [3]{d} \left (-\left ((a-x) (b-x)^2\right )\right )^{2/3}}-\frac {(-a+x)^{2/3} (-b+x)^{4/3} \log (b-a d-(1-d) x)}{2 (a-b) \sqrt [3]{d} \left (-\left ((a-x) (b-x)^2\right )\right )^{2/3}}+\frac {3 (-a+x)^{2/3} (-b+x)^{4/3} \log \left (-\sqrt [3]{-a+x}+\frac {\sqrt [3]{-b+x}}{\sqrt [3]{d}}\right )}{2 (a-b) \sqrt [3]{d} \left (-\left ((a-x) (b-x)^2\right )\right )^{2/3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.18, size = 174, normalized size = 0.65 \begin {gather*} -\frac {(b-x)^{4/3} (-a+x)^{2/3} \left (2 \sqrt {3} \text {ArcTan}\left (\frac {1-\frac {2 \sqrt [3]{d} \sqrt [3]{-a+x}}{\sqrt [3]{b-x}}}{\sqrt {3}}\right )-2 \log \left (1+\frac {\sqrt [3]{d} \sqrt [3]{-a+x}}{\sqrt [3]{b-x}}\right )+\log \left (1-\frac {\sqrt [3]{d} \sqrt [3]{-a+x}}{\sqrt [3]{b-x}}+\frac {d^{2/3} (-a+x)^{2/3}}{(b-x)^{2/3}}\right )\right )}{2 (a-b) \sqrt [3]{d} \left ((b-x)^2 (-a+x)\right )^{2/3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.04, size = 0, normalized size = 0.00 \[\int \frac {-b +x}{\left (\left (-a +x \right ) \left (-b +x \right )^{2}\right )^{\frac {2}{3}} \left (b -a d +\left (-1+d \right ) x \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.47, size = 715, normalized size = 2.68 \begin {gather*} \left [-\frac {\sqrt {3} d \sqrt {\frac {\left (-d\right )^{\frac {1}{3}}}{d}} \log \left (\frac {2 \, a b d + {\left (2 \, d + 1\right )} x^{2} + b^{2} - 2 \, {\left ({\left (a + b\right )} d + 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 - x\right )} \left (-d\right )^{\frac {2}{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 + {\left (b^{2} - 2 \, b x + x^{2}\right )} \left (-d\right )^{\frac {1}{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 {1}{3}} {\left (b - x\right )} \left (-d\right )^{\frac {1}{3}}}{a b d + {\left (d - 1\right )} x^{2} - b^{2} - {\left ({\left (a + b\right )} d - 2 \, b\right )} x}\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 (b - x\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 + {\left (b^{2} - 2 \, b x + x^{2}\right )} \left (-d\right )^{\frac {1}{3}}}{b^{2} - 2 \, b x + x^{2}}\right ) - 2 \, \left (-d\right )^{\frac {2}{3}} \log \left (-\frac {{\left (b - x\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 {1}{3}} d}{b - x}\right )}{2 \, {\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 - x\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 {1}{3}} \left (-d\right )^{\frac {2}{3}}\right )} \sqrt {-\frac {\left (-d\right )^{\frac {1}{3}}}{d}}}{3 \, {\left (b - x\right )}}\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 (b - x\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 + {\left (b^{2} - 2 \, b x + x^{2}\right )} \left (-d\right )^{\frac {1}{3}}}{b^{2} - 2 \, b x + x^{2}}\right ) - 2 \, \left (-d\right )^{\frac {2}{3}} \log \left (-\frac {{\left (b - x\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 {1}{3}} d}{b - x}\right )}{2 \, {\left (a - b\right )} d}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [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 {2}{3}} \left (- a d + b + d x - x\right )}\, dx \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 )}^{2/3}\,\left (b-a\,d+x\,\left (d-1\right )\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________