Optimal. Leaf size=202 \[ \frac {2 \tanh ^{-1}\left (\frac {(c-2 d x)^2}{3 \sqrt {c} \sqrt {c^3-8 d^3 x^3}}\right )}{9 \sqrt {c} d^2}-\frac {\sqrt {2+\sqrt {3}} (c-2 d x) \sqrt {\frac {c^2+2 c d x+4 d^2 x^2}{\left (\left (1+\sqrt {3}\right ) c-2 d x\right )^2}} F\left (\sin ^{-1}\left (\frac {\left (1-\sqrt {3}\right ) c-2 d x}{\left (1+\sqrt {3}\right ) c-2 d x}\right )|-7-4 \sqrt {3}\right )}{3 \sqrt [4]{3} d^2 \sqrt {\frac {c (c-2 d x)}{\left (\left (1+\sqrt {3}\right ) c-2 d x\right )^2}} \sqrt {c^3-8 d^3 x^3}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 202, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {2164, 224,
2163, 212} \begin {gather*} \frac {2 \tanh ^{-1}\left (\frac {(c-2 d x)^2}{3 \sqrt {c} \sqrt {c^3-8 d^3 x^3}}\right )}{9 \sqrt {c} d^2}-\frac {\sqrt {2+\sqrt {3}} (c-2 d x) \sqrt {\frac {c^2+2 c d x+4 d^2 x^2}{\left (\left (1+\sqrt {3}\right ) c-2 d x\right )^2}} F\left (\text {ArcSin}\left (\frac {\left (1-\sqrt {3}\right ) c-2 d x}{\left (1+\sqrt {3}\right ) c-2 d x}\right )|-7-4 \sqrt {3}\right )}{3 \sqrt [4]{3} d^2 \sqrt {\frac {c (c-2 d x)}{\left (\left (1+\sqrt {3}\right ) c-2 d x\right )^2}} \sqrt {c^3-8 d^3 x^3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 224
Rule 2163
Rule 2164
Rubi steps
\begin {align*} \int \frac {x}{(c+d x) \sqrt {c^3-8 d^3 x^3}} \, dx &=\frac {\int \frac {1}{\sqrt {c^3-8 d^3 x^3}} \, dx}{3 d}-\frac {\int \frac {c-2 d x}{(c+d x) \sqrt {c^3-8 d^3 x^3}} \, dx}{3 d}\\ &=-\frac {\sqrt {2+\sqrt {3}} (c-2 d x) \sqrt {\frac {c^2+2 c d x+4 d^2 x^2}{\left (\left (1+\sqrt {3}\right ) c-2 d x\right )^2}} F\left (\sin ^{-1}\left (\frac {\left (1-\sqrt {3}\right ) c-2 d x}{\left (1+\sqrt {3}\right ) c-2 d x}\right )|-7-4 \sqrt {3}\right )}{3 \sqrt [4]{3} d^2 \sqrt {\frac {c (c-2 d x)}{\left (\left (1+\sqrt {3}\right ) c-2 d x\right )^2}} \sqrt {c^3-8 d^3 x^3}}+\frac {(2 c) \text {Subst}\left (\int \frac {1}{9-c^3 x^2} \, dx,x,\frac {\left (1-\frac {2 d x}{c}\right )^2}{\sqrt {c^3-8 d^3 x^3}}\right )}{3 d^2}\\ &=\frac {2 \tanh ^{-1}\left (\frac {(c-2 d x)^2}{3 \sqrt {c} \sqrt {c^3-8 d^3 x^3}}\right )}{9 \sqrt {c} d^2}-\frac {\sqrt {2+\sqrt {3}} (c-2 d x) \sqrt {\frac {c^2+2 c d x+4 d^2 x^2}{\left (\left (1+\sqrt {3}\right ) c-2 d x\right )^2}} F\left (\sin ^{-1}\left (\frac {\left (1-\sqrt {3}\right ) c-2 d x}{\left (1+\sqrt {3}\right ) c-2 d x}\right )|-7-4 \sqrt {3}\right )}{3 \sqrt [4]{3} d^2 \sqrt {\frac {c (c-2 d x)}{\left (\left (1+\sqrt {3}\right ) c-2 d x\right )^2}} \sqrt {c^3-8 d^3 x^3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 10.47, size = 295, normalized size = 1.46 \begin {gather*} \frac {\sqrt {\frac {c-2 d x}{\left (1+\sqrt [3]{-1}\right ) c}} \left (\left (-2+\sqrt [3]{-1}\right ) \left (\sqrt [3]{-1} c+2 d x\right ) \sqrt {\frac {\sqrt [3]{-1} \left (c+2 \sqrt [3]{-1} d x\right )}{\left (1+\sqrt [3]{-1}\right ) c}} F\left (\sin ^{-1}\left (\sqrt {\frac {c-2 (-1)^{2/3} d x}{\left (1+\sqrt [3]{-1}\right ) c}}\right )|\sqrt [3]{-1}\right )+\frac {2 \sqrt [3]{-1} \left (1+\sqrt [3]{-1}\right ) c \sqrt {\frac {c-2 (-1)^{2/3} d x}{\left (1+\sqrt [3]{-1}\right ) c}} \sqrt {\frac {c^2+2 c d x+4 d^2 x^2}{c^2}} \Pi \left (\frac {2 \sqrt {3}}{3 i+\sqrt {3}};\sin ^{-1}\left (\sqrt {\frac {c-2 (-1)^{2/3} d x}{\left (1+\sqrt [3]{-1}\right ) c}}\right )|\sqrt [3]{-1}\right )}{\sqrt {3}}\right )}{\left (-2+\sqrt [3]{-1}\right ) d^2 \sqrt {\frac {c-2 (-1)^{2/3} d x}{\left (1+\sqrt [3]{-1}\right ) c}} \sqrt {c^3-8 d^3 x^3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 508 vs. \(2 (173 ) = 346\).
time = 0.25, size = 509, normalized size = 2.52
method | result | size |
default | \(\frac {2 \left (\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}-\frac {c}{2 d}\right ) \sqrt {\frac {x -\frac {c}{2 d}}{\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}-\frac {c}{2 d}}}\, \sqrt {\frac {x -\frac {\left (-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) c}{2 d}}{\frac {c}{2 d}-\frac {\left (-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) c}{2 d}}}\, \sqrt {\frac {x -\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}}{\frac {c}{2 d}-\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}}}\, \EllipticF \left (\sqrt {\frac {x -\frac {c}{2 d}}{\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}-\frac {c}{2 d}}}, \sqrt {\frac {\frac {c}{2 d}-\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}}{\frac {c}{2 d}-\frac {\left (-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) c}{2 d}}}\right )}{d \sqrt {-8 d^{3} x^{3}+c^{3}}}-\frac {4 \left (\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}-\frac {c}{2 d}\right ) \sqrt {\frac {x -\frac {c}{2 d}}{\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}-\frac {c}{2 d}}}\, \sqrt {\frac {x -\frac {\left (-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) c}{2 d}}{\frac {c}{2 d}-\frac {\left (-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) c}{2 d}}}\, \sqrt {\frac {x -\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}}{\frac {c}{2 d}-\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}}}\, \EllipticPi \left (\sqrt {\frac {x -\frac {c}{2 d}}{\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}-\frac {c}{2 d}}}, \frac {2 \left (\frac {c}{2 d}-\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}\right ) d}{3 c}, \sqrt {\frac {\frac {c}{2 d}-\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}}{\frac {c}{2 d}-\frac {\left (-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) c}{2 d}}}\right )}{3 d \sqrt {-8 d^{3} x^{3}+c^{3}}}\) | \(509\) |
elliptic | \(\frac {2 \left (\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}-\frac {c}{2 d}\right ) \sqrt {\frac {x -\frac {c}{2 d}}{\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}-\frac {c}{2 d}}}\, \sqrt {\frac {x -\frac {\left (-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) c}{2 d}}{\frac {c}{2 d}-\frac {\left (-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) c}{2 d}}}\, \sqrt {\frac {x -\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}}{\frac {c}{2 d}-\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}}}\, \EllipticF \left (\sqrt {\frac {x -\frac {c}{2 d}}{\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}-\frac {c}{2 d}}}, \sqrt {\frac {\frac {c}{2 d}-\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}}{\frac {c}{2 d}-\frac {\left (-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) c}{2 d}}}\right )}{d \sqrt {-8 d^{3} x^{3}+c^{3}}}-\frac {4 \left (\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}-\frac {c}{2 d}\right ) \sqrt {\frac {x -\frac {c}{2 d}}{\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}-\frac {c}{2 d}}}\, \sqrt {\frac {x -\frac {\left (-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) c}{2 d}}{\frac {c}{2 d}-\frac {\left (-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) c}{2 d}}}\, \sqrt {\frac {x -\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}}{\frac {c}{2 d}-\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}}}\, \EllipticPi \left (\sqrt {\frac {x -\frac {c}{2 d}}{\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}-\frac {c}{2 d}}}, \frac {2 \left (\frac {c}{2 d}-\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}\right ) d}{3 c}, \sqrt {\frac {\frac {c}{2 d}-\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) c}{2 d}}{\frac {c}{2 d}-\frac {\left (-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) c}{2 d}}}\right )}{3 d \sqrt {-8 d^{3} x^{3}+c^{3}}}\) | \(509\) |
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 [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.14, size = 356, normalized size = 1.76 \begin {gather*} \left [\frac {\sqrt {c} d^{2} \log \left (\frac {8 \, d^{6} x^{6} - 240 \, c d^{5} x^{5} + 408 \, c^{2} d^{4} x^{4} + 88 \, c^{3} d^{3} x^{3} + 156 \, c^{4} d^{2} x^{2} + 12 \, c^{5} d x + 17 \, c^{6} + 3 \, {\left (8 \, d^{4} x^{4} - 52 \, c d^{3} x^{3} + 12 \, c^{2} d^{2} x^{2} - 4 \, c^{3} d x + 5 \, c^{4}\right )} \sqrt {-8 \, d^{3} x^{3} + c^{3}} \sqrt {c}}{d^{6} x^{6} + 6 \, c d^{5} x^{5} + 15 \, c^{2} d^{4} x^{4} + 20 \, c^{3} d^{3} x^{3} + 15 \, c^{4} d^{2} x^{2} + 6 \, c^{5} d x + c^{6}}\right ) - 3 \, \sqrt {2} \sqrt {-d^{3}} c {\rm weierstrassPInverse}\left (0, \frac {c^{3}}{2 \, d^{3}}, x\right )}{18 \, c d^{4}}, \frac {2 \, \sqrt {-c} d^{2} \arctan \left (\frac {{\left (4 \, d^{3} x^{3} - 24 \, c d^{2} x^{2} - 6 \, c^{2} d x - 5 \, c^{3}\right )} \sqrt {-8 \, d^{3} x^{3} + c^{3}} \sqrt {-c}}{3 \, {\left (16 \, c d^{4} x^{4} - 8 \, c^{2} d^{3} x^{3} - 2 \, c^{4} d x + c^{5}\right )}}\right ) - 3 \, \sqrt {2} \sqrt {-d^{3}} c {\rm weierstrassPInverse}\left (0, \frac {c^{3}}{2 \, d^{3}}, x\right )}{18 \, c d^{4}}\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 {x}{\sqrt {- \left (- c + 2 d x\right ) \left (c^{2} + 2 c d x + 4 d^{2} x^{2}\right )} \left (c + d 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 {x}{\sqrt {c^3-8\,d^3\,x^3}\,\left (c+d\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________