Optimal. Leaf size=194 \[ \frac {\sqrt {3} \text {ArcTan}\left (\frac {\sqrt {3} x}{x-2 \sqrt [6]{d} \sqrt [3]{-a x^2+x^3}}\right )}{2 a d^{5/6}}-\frac {\sqrt {3} \text {ArcTan}\left (\frac {\sqrt {3} x}{x+2 \sqrt [6]{d} \sqrt [3]{-a x^2+x^3}}\right )}{2 a d^{5/6}}-\frac {\tanh ^{-1}\left (\frac {x}{\sqrt [6]{d} \sqrt [3]{-a x^2+x^3}}\right )}{a d^{5/6}}-\frac {\tanh ^{-1}\left (\frac {\frac {x^2}{\sqrt [6]{d}}+\sqrt [6]{d} \left (-a x^2+x^3\right )^{2/3}}{x \sqrt [3]{-a x^2+x^3}}\right )}{2 a d^{5/6}} \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(405\) vs. \(2(194)=388\).
time = 0.59, antiderivative size = 405, normalized size of antiderivative = 2.09, number of steps
used = 11, number of rules used = 6, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {6851, 925,
129, 399, 245, 384} \begin {gather*} \frac {\sqrt {3} x^{2/3} \sqrt [3]{x-a} \text {ArcTan}\left (\frac {1-\frac {2 \sqrt [3]{x}}{\sqrt [6]{d} \sqrt [3]{x-a}}}{\sqrt {3}}\right )}{2 a d^{5/6} \sqrt [3]{-\left (x^2 (a-x)\right )}}-\frac {\sqrt {3} x^{2/3} \sqrt [3]{x-a} \text {ArcTan}\left (\frac {\frac {2 \sqrt [3]{x}}{\sqrt [6]{d} \sqrt [3]{x-a}}+1}{\sqrt {3}}\right )}{2 a d^{5/6} \sqrt [3]{-\left (x^2 (a-x)\right )}}+\frac {x^{2/3} \sqrt [3]{x-a} \log \left (a \left (1-\sqrt {d}\right ) \sqrt {d}-(1-d) x\right )}{4 a d^{5/6} \sqrt [3]{-\left (x^2 (a-x)\right )}}-\frac {x^{2/3} \sqrt [3]{x-a} \log \left (a \sqrt {d} \left (\sqrt {d}+1\right )+(1-d) x\right )}{4 a d^{5/6} \sqrt [3]{-\left (x^2 (a-x)\right )}}+\frac {3 x^{2/3} \sqrt [3]{x-a} \log \left (\sqrt [3]{x}-\sqrt [6]{d} \sqrt [3]{x-a}\right )}{4 a d^{5/6} \sqrt [3]{-\left (x^2 (a-x)\right )}}-\frac {3 x^{2/3} \sqrt [3]{x-a} \log \left (\sqrt [6]{d} \sqrt [3]{x-a}+\sqrt [3]{x}\right )}{4 a d^{5/6} \sqrt [3]{-\left (x^2 (a-x)\right )}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 129
Rule 245
Rule 384
Rule 399
Rule 925
Rule 6851
Rubi steps
\begin {align*} \int \frac {-a+x}{\sqrt [3]{x^2 (-a+x)} \left (a^2 d-2 a d x+(-1+d) x^2\right )} \, dx &=\frac {\left (x^{2/3} \sqrt [3]{-a+x}\right ) \int \frac {(-a+x)^{2/3}}{x^{2/3} \left (a^2 d-2 a d x+(-1+d) x^2\right )} \, dx}{\sqrt [3]{x^2 (-a+x)}}\\ &=\frac {\left (x^{2/3} \sqrt [3]{-a+x}\right ) \int \left (\frac {(-1+d) (-a+x)^{2/3}}{a \sqrt {d} x^{2/3} \left (-2 a \sqrt {d}-2 a d-2 (1-d) x\right )}+\frac {(-1+d) (-a+x)^{2/3}}{a \sqrt {d} x^{2/3} \left (-2 a \sqrt {d}+2 a d+2 (1-d) x\right )}\right ) \, dx}{\sqrt [3]{x^2 (-a+x)}}\\ &=-\frac {\left ((1-d) x^{2/3} \sqrt [3]{-a+x}\right ) \int \frac {(-a+x)^{2/3}}{x^{2/3} \left (-2 a \sqrt {d}-2 a d-2 (1-d) x\right )} \, dx}{a \sqrt {d} \sqrt [3]{x^2 (-a+x)}}-\frac {\left ((1-d) x^{2/3} \sqrt [3]{-a+x}\right ) \int \frac {(-a+x)^{2/3}}{x^{2/3} \left (-2 a \sqrt {d}+2 a d+2 (1-d) x\right )} \, dx}{a \sqrt {d} \sqrt [3]{x^2 (-a+x)}}\\ &=\frac {\left ((1-d) x^{2/3} \sqrt [3]{-a+x}\right ) \int \frac {1}{x^{2/3} \sqrt [3]{-a+x} \left (-2 a \sqrt {d}-2 a d-2 (1-d) x\right )} \, dx}{\left (1-\sqrt {d}\right ) \sqrt {d} \sqrt [3]{x^2 (-a+x)}}+\frac {\left ((1-d) x^{2/3} \sqrt [3]{-a+x}\right ) \int \frac {1}{x^{2/3} \sqrt [3]{-a+x} \left (-2 a \sqrt {d}+2 a d+2 (1-d) x\right )} \, dx}{\left (1+\sqrt {d}\right ) \sqrt {d} \sqrt [3]{x^2 (-a+x)}}\\ &=-\frac {\sqrt {3} x^{2/3} \sqrt [3]{-a+x} \tan ^{-1}\left (\frac {1}{\sqrt {3}}-\frac {2 \sqrt [6]{d} \sqrt [3]{-a+x}}{\sqrt {3} \sqrt [3]{x}}\right )}{2 a d^{5/6} \sqrt [3]{-\left ((a-x) x^2\right )}}+\frac {\sqrt {3} x^{2/3} \sqrt [3]{-a+x} \tan ^{-1}\left (\frac {1}{\sqrt {3}}+\frac {2 \sqrt [6]{d} \sqrt [3]{-a+x}}{\sqrt {3} \sqrt [3]{x}}\right )}{2 a d^{5/6} \sqrt [3]{-\left ((a-x) x^2\right )}}-\frac {x^{2/3} \sqrt [3]{-a+x} \log \left (-2 a \left (1+\sqrt {d}\right ) \sqrt {d}-2 (1-d) x\right )}{4 a d^{5/6} \sqrt [3]{-\left ((a-x) x^2\right )}}+\frac {x^{2/3} \sqrt [3]{-a+x} \log \left (-2 a \left (1-\sqrt {d}\right ) \sqrt {d}+2 (1-d) x\right )}{4 a d^{5/6} \sqrt [3]{-\left ((a-x) x^2\right )}}-\frac {3 x^{2/3} \sqrt [3]{-a+x} \log \left (-\sqrt [3]{x}-\sqrt [6]{d} \sqrt [3]{-a+x}\right )}{4 a d^{5/6} \sqrt [3]{-\left ((a-x) x^2\right )}}+\frac {3 x^{2/3} \sqrt [3]{-a+x} \log \left (-\sqrt [3]{x}+\sqrt [6]{d} \sqrt [3]{-a+x}\right )}{4 a d^{5/6} \sqrt [3]{-\left ((a-x) x^2\right )}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.42, size = 188, normalized size = 0.97 \begin {gather*} \frac {x^{2/3} \sqrt [3]{-a+x} \left (\sqrt {3} \left (\text {ArcTan}\left (\frac {\sqrt {3} \sqrt [3]{x}}{\sqrt [3]{x}-2 \sqrt [6]{d} \sqrt [3]{-a+x}}\right )-\text {ArcTan}\left (\frac {\sqrt {3} \sqrt [3]{x}}{\sqrt [3]{x}+2 \sqrt [6]{d} \sqrt [3]{-a+x}}\right )\right )-2 \tanh ^{-1}\left (\frac {\sqrt [3]{x}}{\sqrt [6]{d} \sqrt [3]{-a+x}}\right )-\tanh ^{-1}\left (\frac {\sqrt [3]{x}}{\sqrt [6]{d} \sqrt [3]{-a+x}}+\frac {\sqrt [6]{d} \sqrt [3]{-a+x}}{\sqrt [3]{x}}\right )\right )}{2 a d^{5/6} \sqrt [3]{x^2 (-a+x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.12, size = 0, normalized size = 0.00 \[\int \frac {-a +x}{\left (x^{2} \left (-a +x \right )\right )^{\frac {1}{3}} \left (a^{2} d -2 a d 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 [B] Leaf count of result is larger than twice the leaf count of optimal. 535 vs.
\(2 (152) = 304\).
time = 0.54, size = 535, normalized size = 2.76 \begin {gather*} -\sqrt {3} \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {1}{6}} \arctan \left (\frac {2 \, \sqrt {3} a d x \sqrt {\frac {{\left (-a x^{2} + x^{3}\right )}^{\frac {1}{3}} a^{5} d^{4} x \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {5}{6}} + a^{4} d^{3} x^{2} \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {2}{3}} + {\left (-a x^{2} + x^{3}\right )}^{\frac {2}{3}}}{x^{2}}} \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {1}{6}} - 2 \, \sqrt {3} {\left (-a x^{2} + x^{3}\right )}^{\frac {1}{3}} a d \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {1}{6}} - \sqrt {3} x}{3 \, x}\right ) - \sqrt {3} \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {1}{6}} \arctan \left (\frac {2 \, \sqrt {3} a d x \sqrt {-\frac {{\left (-a x^{2} + x^{3}\right )}^{\frac {1}{3}} a^{5} d^{4} x \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {5}{6}} - a^{4} d^{3} x^{2} \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {2}{3}} - {\left (-a x^{2} + x^{3}\right )}^{\frac {2}{3}}}{x^{2}}} \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {1}{6}} - 2 \, \sqrt {3} {\left (-a x^{2} + x^{3}\right )}^{\frac {1}{3}} a d \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {1}{6}} + \sqrt {3} x}{3 \, x}\right ) - \frac {1}{2} \, \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {1}{6}} \log \left (\frac {a^{5} d^{4} x \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {5}{6}} + {\left (-a x^{2} + x^{3}\right )}^{\frac {1}{3}}}{x}\right ) + \frac {1}{2} \, \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {1}{6}} \log \left (-\frac {a^{5} d^{4} x \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {5}{6}} - {\left (-a x^{2} + x^{3}\right )}^{\frac {1}{3}}}{x}\right ) - \frac {1}{4} \, \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {1}{6}} \log \left (\frac {{\left (-a x^{2} + x^{3}\right )}^{\frac {1}{3}} a^{5} d^{4} x \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {5}{6}} + a^{4} d^{3} x^{2} \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {2}{3}} + {\left (-a x^{2} + x^{3}\right )}^{\frac {2}{3}}}{x^{2}}\right ) + \frac {1}{4} \, \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {1}{6}} \log \left (-\frac {{\left (-a x^{2} + x^{3}\right )}^{\frac {1}{3}} a^{5} d^{4} x \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {5}{6}} - a^{4} d^{3} x^{2} \left (\frac {1}{a^{6} d^{5}}\right )^{\frac {2}{3}} - {\left (-a x^{2} + x^{3}\right )}^{\frac {2}{3}}}{x^{2}}\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 {- a + x}{\sqrt [3]{x^{2} \left (- a + x\right )} \left (a^{2} d - 2 a d x + d x^{2} - x^{2}\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.48, size = 233, normalized size = 1.20 \begin {gather*} -\frac {\sqrt {3} \log \left (\sqrt {3} {\left (-\frac {a}{x} + 1\right )}^{\frac {1}{3}} \left (-\frac {1}{d}\right )^{\frac {1}{6}} + {\left (-\frac {a}{x} + 1\right )}^{\frac {2}{3}} + \left (-\frac {1}{d}\right )^{\frac {1}{3}}\right )}{4 \, \left (-d^{5}\right )^{\frac {1}{6}} a} + \frac {\sqrt {3} \log \left (-\sqrt {3} {\left (-\frac {a}{x} + 1\right )}^{\frac {1}{3}} \left (-\frac {1}{d}\right )^{\frac {1}{6}} + {\left (-\frac {a}{x} + 1\right )}^{\frac {2}{3}} + \left (-\frac {1}{d}\right )^{\frac {1}{3}}\right )}{4 \, \left (-d^{5}\right )^{\frac {1}{6}} a} + \frac {\arctan \left (\frac {\sqrt {3} \left (-\frac {1}{d}\right )^{\frac {1}{6}} + 2 \, {\left (-\frac {a}{x} + 1\right )}^{\frac {1}{3}}}{\left (-\frac {1}{d}\right )^{\frac {1}{6}}}\right )}{2 \, \left (-d^{5}\right )^{\frac {1}{6}} a} + \frac {\arctan \left (-\frac {\sqrt {3} \left (-\frac {1}{d}\right )^{\frac {1}{6}} - 2 \, {\left (-\frac {a}{x} + 1\right )}^{\frac {1}{3}}}{\left (-\frac {1}{d}\right )^{\frac {1}{6}}}\right )}{2 \, \left (-d^{5}\right )^{\frac {1}{6}} a} + \frac {\arctan \left (\frac {{\left (-\frac {a}{x} + 1\right )}^{\frac {1}{3}}}{\left (-\frac {1}{d}\right )^{\frac {1}{6}}}\right )}{\left (-d^{5}\right )^{\frac {1}{6}} a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int -\frac {a-x}{{\left (-x^2\,\left (a-x\right )\right )}^{1/3}\,\left (d\,a^2-2\,d\,a\,x+\left (d-1\right )\,x^2\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________