Optimal. Leaf size=221 \[ -\frac {2 (d e-c f) \tanh ^{-1}\left (\frac {(c-2 d x)^2}{3 \sqrt {c} \sqrt {c^3-8 d^3 x^3}}\right )}{9 c^{3/2} d^2}-\frac {\sqrt {2+\sqrt {3}} (2 d e+c f) (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} c 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.21, antiderivative size = 221, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {2164, 224,
2163, 212} \begin {gather*} -\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}} (c f+2 d e) 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} c 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 (d e-c f) \tanh ^{-1}\left (\frac {(c-2 d x)^2}{3 \sqrt {c} \sqrt {c^3-8 d^3 x^3}}\right )}{9 c^{3/2} d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 224
Rule 2163
Rule 2164
Rubi steps
\begin {align*} \int \frac {e+f x}{(c+d x) \sqrt {c^3-8 d^3 x^3}} \, dx &=\frac {(d e-c f) \int \frac {c-2 d x}{(c+d x) \sqrt {c^3-8 d^3 x^3}} \, dx}{3 c d}+\frac {(2 d e+c f) \int \frac {1}{\sqrt {c^3-8 d^3 x^3}} \, dx}{3 c d}\\ &=-\frac {\sqrt {2+\sqrt {3}} (2 d e+c f) (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} c 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 (d e-c f)) \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 (d e-c f) \tanh ^{-1}\left (\frac {(c-2 d x)^2}{3 \sqrt {c} \sqrt {c^3-8 d^3 x^3}}\right )}{9 c^{3/2} d^2}-\frac {\sqrt {2+\sqrt {3}} (2 d e+c f) (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} c 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.80, size = 384, normalized size = 1.74 \begin {gather*} -\frac {i \sqrt {\frac {c-2 d x}{\left (1+\sqrt [3]{-1}\right ) c}} \left (f \sqrt {\frac {\left (-i+\sqrt {3}\right ) c+2 \left (i+\sqrt {3}\right ) d x}{\left (-3 i+\sqrt {3}\right ) c}} \left (\left (-3 i+\sqrt {3}\right ) c-2 \left (3 i+\sqrt {3}\right ) d x\right ) F\left (\sin ^{-1}\left (\sqrt {2} \sqrt {\frac {i c+i d x+\sqrt {3} d x}{3 i c-\sqrt {3} c}}\right )|\frac {1}{2} \left (1+i \sqrt {3}\right )\right )+4 \sqrt {2} (d e-c f) \sqrt {\frac {i c+i d x+\sqrt {3} d x}{3 i c-\sqrt {3} 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 {2} \sqrt {\frac {i c+i d x+\sqrt {3} d x}{3 i c-\sqrt {3} c}}\right )|\frac {1}{2} \left (1+i \sqrt {3}\right )\right )\right )}{2 \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. 520 vs. \(2 (192 ) = 384\).
time = 0.25, size = 521, normalized size = 2.36
method | result | size |
default | \(\frac {2 f \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 (-c f +d e \right ) \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}}\, c}\) | \(521\) |
elliptic | \(\frac {2 f \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 (c f -d e \right ) \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}}\, c}\) | \(521\) |
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.21, size = 400, normalized size = 1.81 \begin {gather*} \left [-\frac {3 \, \sqrt {2} \sqrt {-d^{3}} {\left (c^{2} f + 2 \, c d e\right )} {\rm weierstrassPInverse}\left (0, \frac {c^{3}}{2 \, d^{3}}, x\right ) + {\left (c d^{2} f - d^{3} e\right )} \sqrt {c} \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 )}{18 \, c^{2} d^{4}}, -\frac {3 \, \sqrt {2} \sqrt {-d^{3}} {\left (c^{2} f + 2 \, c d e\right )} {\rm weierstrassPInverse}\left (0, \frac {c^{3}}{2 \, d^{3}}, x\right ) - 2 \, {\left (c d^{2} f - d^{3} e\right )} \sqrt {-c} \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 )}{18 \, c^{2} 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 {e + f 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 {e+f\,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]
________________________________________________________________________________________