Optimal. Leaf size=65 \[ \frac {1}{3} \sqrt {-3+2 \sqrt {3}} \tanh ^{-1}\left (\frac {\left (1-\sqrt {3}+x\right )^2}{\sqrt {3 \left (-3+2 \sqrt {3}\right )} \sqrt {-4+4 \sqrt {3} x^2+x^4}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {1754, 213}
\begin {gather*} \frac {1}{3} \sqrt {2 \sqrt {3}-3} \tanh ^{-1}\left (\frac {\left (x-\sqrt {3}+1\right )^2}{\sqrt {3 \left (2 \sqrt {3}-3\right )} \sqrt {x^4+4 \sqrt {3} x^2-4}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 1754
Rubi steps
\begin {align*} \int \frac {1-\sqrt {3}+x}{\left (1+\sqrt {3}+x\right ) \sqrt {-4+4 \sqrt {3} x^2+x^4}} \, dx &=-\left (\left (4 \left (2-\sqrt {3}\right )\right ) \text {Subst}\left (\int \frac {1}{3 \left (1-\sqrt {3}\right )^4+6 \left (1-\sqrt {3}\right )^3 \left (1+\sqrt {3}\right )+4 x^2} \, dx,x,\frac {\left (1-\sqrt {3}+x\right )^2}{\sqrt {-4+4 \sqrt {3} x^2+x^4}}\right )\right )\\ &=\frac {1}{3} \sqrt {-3+2 \sqrt {3}} \tanh ^{-1}\left (\frac {\left (1-\sqrt {3}+x\right )^2}{\sqrt {3 \left (-3+2 \sqrt {3}\right )} \sqrt {-4+4 \sqrt {3} x^2+x^4}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 8.31, size = 77, normalized size = 1.18 \begin {gather*} \frac {1}{3} \sqrt {-3+2 \sqrt {3}} \tanh ^{-1}\left (\frac {\sqrt {9+6 \sqrt {3}} \sqrt {-4+4 \sqrt {3} x^2+x^4}}{2+\left (-2-2 \sqrt {3}\right ) x+\left (2+\sqrt {3}\right ) x^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 4 vs. order
3.
time = 0.42, size = 327, normalized size = 5.03
method | result | size |
default | \(\frac {\sqrt {1-\left (-1+\frac {\sqrt {3}}{2}\right ) x^{2}}\, \sqrt {1-\left (1+\frac {\sqrt {3}}{2}\right ) x^{2}}\, \EllipticF \left (x \left (\frac {i \sqrt {3}}{2}-\frac {i}{2}\right ), i \sqrt {1+4 \sqrt {3}\, \left (1+\frac {\sqrt {3}}{2}\right )}\right )}{\left (\frac {i \sqrt {3}}{2}-\frac {i}{2}\right ) \sqrt {-4+x^{4}+4 \sqrt {3}\, x^{2}}}-2 \sqrt {3}\, \left (-\frac {\arctanh \left (\frac {4 \left (-1-\sqrt {3}\right )^{2} \sqrt {3}-8+4 \sqrt {3}\, x^{2}+2 x^{2} \left (-1-\sqrt {3}\right )^{2}}{2 \sqrt {\left (-1-\sqrt {3}\right )^{4}+4 \left (-1-\sqrt {3}\right )^{2} \sqrt {3}-4}\, \sqrt {-4+x^{4}+4 \sqrt {3}\, x^{2}}}\right )}{2 \sqrt {\left (-1-\sqrt {3}\right )^{4}+4 \left (-1-\sqrt {3}\right )^{2} \sqrt {3}-4}}-\frac {\sqrt {1-\left (-1+\frac {\sqrt {3}}{2}\right ) x^{2}}\, \sqrt {1-\left (1+\frac {\sqrt {3}}{2}\right ) x^{2}}\, \EllipticPi \left (\sqrt {-1+\frac {\sqrt {3}}{2}}\, x , \frac {1}{\left (-1+\frac {\sqrt {3}}{2}\right ) \left (-1-\sqrt {3}\right )^{2}}, \frac {\sqrt {1+\frac {\sqrt {3}}{2}}}{\sqrt {-1+\frac {\sqrt {3}}{2}}}\right )}{\sqrt {-1+\frac {\sqrt {3}}{2}}\, \left (-1-\sqrt {3}\right ) \sqrt {-4+x^{4}+4 \sqrt {3}\, x^{2}}}\right )\) | \(327\) |
elliptic | \(\frac {\sqrt {1-\left (-1+\frac {\sqrt {3}}{2}\right ) x^{2}}\, \sqrt {1-\left (1+\frac {\sqrt {3}}{2}\right ) x^{2}}\, \EllipticF \left (x \left (\frac {i \sqrt {3}}{2}-\frac {i}{2}\right ), i \sqrt {1+4 \sqrt {3}\, \left (1+\frac {\sqrt {3}}{2}\right )}\right )}{\left (\frac {i \sqrt {3}}{2}-\frac {i}{2}\right ) \sqrt {-4+x^{4}+4 \sqrt {3}\, x^{2}}}-2 \sqrt {3}\, \left (-\frac {\arctanh \left (\frac {4 \left (-1-\sqrt {3}\right )^{2} \sqrt {3}-8+4 \sqrt {3}\, x^{2}+2 x^{2} \left (-1-\sqrt {3}\right )^{2}}{2 \sqrt {\left (-1-\sqrt {3}\right )^{4}+4 \left (-1-\sqrt {3}\right )^{2} \sqrt {3}-4}\, \sqrt {-4+x^{4}+4 \sqrt {3}\, x^{2}}}\right )}{2 \sqrt {\left (-1-\sqrt {3}\right )^{4}+4 \left (-1-\sqrt {3}\right )^{2} \sqrt {3}-4}}-\frac {\sqrt {1-\left (-1+\frac {\sqrt {3}}{2}\right ) x^{2}}\, \sqrt {1-\left (1+\frac {\sqrt {3}}{2}\right ) x^{2}}\, \EllipticPi \left (\sqrt {-1+\frac {\sqrt {3}}{2}}\, x , \frac {1}{\left (-1+\frac {\sqrt {3}}{2}\right ) \left (-1-\sqrt {3}\right )^{2}}, \frac {\sqrt {1+\frac {\sqrt {3}}{2}}}{\sqrt {-1+\frac {\sqrt {3}}{2}}}\right )}{\sqrt {-1+\frac {\sqrt {3}}{2}}\, \left (-1-\sqrt {3}\right ) \sqrt {-4+x^{4}+4 \sqrt {3}\, x^{2}}}\right )\) | \(327\) |
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. 323 vs.
\(2 (47) = 94\).
time = 1.12, size = 323, normalized size = 4.97 \begin {gather*} \frac {1}{12} \, \sqrt {2 \, \sqrt {3} - 3} \log \left (-\frac {37 \, x^{12} - 204 \, x^{11} + 804 \, x^{10} - 2408 \, x^{9} + 3708 \, x^{8} - 5472 \, x^{7} + 6432 \, x^{6} + 10944 \, x^{5} + 14832 \, x^{4} + 19264 \, x^{3} + 12864 \, x^{2} + {\left (54 \, x^{10} - 300 \, x^{9} + 1026 \, x^{8} - 2232 \, x^{7} + 3024 \, x^{6} - 3024 \, x^{5} - 1008 \, x^{4} - 2016 \, x^{3} - 2592 \, x^{2} + \sqrt {3} {\left (31 \, x^{10} - 176 \, x^{9} + 576 \, x^{8} - 1320 \, x^{7} + 1848 \, x^{6} - 1008 \, x^{5} + 1344 \, x^{4} + 1632 \, x^{3} + 1008 \, x^{2} + 832 \, x + 256\right )} - 1152 \, x - 480\right )} \sqrt {x^{4} + 4 \, \sqrt {3} x^{2} - 4} \sqrt {2 \, \sqrt {3} - 3} + 3 \, \sqrt {3} {\left (7 \, x^{12} - 40 \, x^{11} + 160 \, x^{10} - 400 \, x^{9} + 924 \, x^{8} - 960 \, x^{7} - 1920 \, x^{5} - 3696 \, x^{4} - 3200 \, x^{3} - 2560 \, x^{2} - 1280 \, x - 448\right )} + 6528 \, x + 2368}{x^{12} + 12 \, x^{11} + 48 \, x^{10} + 40 \, x^{9} - 180 \, x^{8} - 288 \, x^{7} + 384 \, x^{6} + 576 \, x^{5} - 720 \, x^{4} - 320 \, x^{3} + 768 \, x^{2} - 384 \, x + 64}\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 {3} + 1}{\left (x + 1 + \sqrt {3}\right ) \sqrt {x^{4} + 4 \sqrt {3} x^{2} - 4}}\, 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.02 \begin {gather*} \int \frac {x-\sqrt {3}+1}{\left (x+\sqrt {3}+1\right )\,\sqrt {x^4+4\,\sqrt {3}\,x^2-4}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________