Optimal. Leaf size=72 \[ -\sqrt {\frac {2}{5 \left (3+\sqrt {5}\right )}} \tanh ^{-1}\left (\sqrt {\frac {2}{3+\sqrt {5}}} x\right )+\sqrt {\frac {1}{10} \left (3+\sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {1107, 213}
\begin {gather*} \sqrt {\frac {1}{10} \left (3+\sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right )-\sqrt {\frac {2}{5 \left (3+\sqrt {5}\right )}} \tanh ^{-1}\left (\sqrt {\frac {2}{3+\sqrt {5}}} x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 1107
Rubi steps
\begin {align*} \int \frac {1}{1-3 x^2+x^4} \, dx &=\frac {\int \frac {1}{-\frac {3}{2}-\frac {\sqrt {5}}{2}+x^2} \, dx}{\sqrt {5}}-\frac {\int \frac {1}{-\frac {3}{2}+\frac {\sqrt {5}}{2}+x^2} \, dx}{\sqrt {5}}\\ &=-\sqrt {\frac {2}{5 \left (3+\sqrt {5}\right )}} \tanh ^{-1}\left (\sqrt {\frac {2}{3+\sqrt {5}}} x\right )+\sqrt {\frac {1}{10} \left (3+\sqrt {5}\right )} \tanh ^{-1}\left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 83, normalized size = 1.15 \begin {gather*} \frac {1}{20} \left (-\left (\left (5+\sqrt {5}\right ) \log \left (-1+\sqrt {5}-2 x\right )\right )-\left (-5+\sqrt {5}\right ) \log \left (1+\sqrt {5}-2 x\right )+\left (5+\sqrt {5}\right ) \log \left (-1+\sqrt {5}+2 x\right )+\left (-5+\sqrt {5}\right ) \log \left (1+\sqrt {5}+2 x\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 54, normalized size = 0.75
method | result | size |
default | \(-\frac {\ln \left (x^{2}+x -1\right )}{4}+\frac {\sqrt {5}\, \arctanh \left (\frac {\left (1+2 x \right ) \sqrt {5}}{5}\right )}{10}+\frac {\ln \left (x^{2}-x -1\right )}{4}+\frac {\sqrt {5}\, \arctanh \left (\frac {\left (2 x -1\right ) \sqrt {5}}{5}\right )}{10}\) | \(54\) |
risch | \(\frac {\ln \left (2 x -1+\sqrt {5}\right )}{4}+\frac {\ln \left (2 x -1+\sqrt {5}\right ) \sqrt {5}}{20}+\frac {\ln \left (2 x -1-\sqrt {5}\right )}{4}-\frac {\ln \left (2 x -1-\sqrt {5}\right ) \sqrt {5}}{20}+\frac {\ln \left (2 x +\sqrt {5}+1\right ) \sqrt {5}}{20}-\frac {\ln \left (2 x +\sqrt {5}+1\right )}{4}-\frac {\ln \left (2 x +1-\sqrt {5}\right )}{4}-\frac {\ln \left (2 x +1-\sqrt {5}\right ) \sqrt {5}}{20}\) | \(110\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 5.96, size = 75, normalized size = 1.04 \begin {gather*} -\frac {1}{20} \, \sqrt {5} \log \left (\frac {2 \, x - \sqrt {5} + 1}{2 \, x + \sqrt {5} + 1}\right ) - \frac {1}{20} \, \sqrt {5} \log \left (\frac {2 \, x - \sqrt {5} - 1}{2 \, x + \sqrt {5} - 1}\right ) - \frac {1}{4} \, \log \left (x^{2} + x - 1\right ) + \frac {1}{4} \, \log \left (x^{2} - x - 1\right ) \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. 91 vs.
\(2 (42) = 84\).
time = 0.69, size = 91, normalized size = 1.26 \begin {gather*} \frac {1}{20} \, \sqrt {5} \log \left (\frac {2 \, x^{2} + \sqrt {5} {\left (2 \, x + 1\right )} + 2 \, x + 3}{x^{2} + x - 1}\right ) + \frac {1}{20} \, \sqrt {5} \log \left (\frac {2 \, x^{2} + \sqrt {5} {\left (2 \, x - 1\right )} - 2 \, x + 3}{x^{2} - x - 1}\right ) - \frac {1}{4} \, \log \left (x^{2} + x - 1\right ) + \frac {1}{4} \, \log \left (x^{2} - x - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 158 vs.
\(2 (58) = 116\).
time = 0.19, size = 158, normalized size = 2.19 \begin {gather*} \left (\frac {\sqrt {5}}{20} + \frac {1}{4}\right ) \log {\left (x - \frac {7}{2} - \frac {7 \sqrt {5}}{10} + 120 \left (\frac {\sqrt {5}}{20} + \frac {1}{4}\right )^{3} \right )} + \left (\frac {1}{4} - \frac {\sqrt {5}}{20}\right ) \log {\left (x - \frac {7}{2} + 120 \left (\frac {1}{4} - \frac {\sqrt {5}}{20}\right )^{3} + \frac {7 \sqrt {5}}{10} \right )} + \left (- \frac {1}{4} + \frac {\sqrt {5}}{20}\right ) \log {\left (x - \frac {7 \sqrt {5}}{10} + 120 \left (- \frac {1}{4} + \frac {\sqrt {5}}{20}\right )^{3} + \frac {7}{2} \right )} + \left (- \frac {1}{4} - \frac {\sqrt {5}}{20}\right ) \log {\left (x + 120 \left (- \frac {1}{4} - \frac {\sqrt {5}}{20}\right )^{3} + \frac {7 \sqrt {5}}{10} + \frac {7}{2} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.47, size = 81, normalized size = 1.12 \begin {gather*} -\frac {1}{20} \, \sqrt {5} \log \left (\frac {{\left | 2 \, x - \sqrt {5} + 1 \right |}}{{\left | 2 \, x + \sqrt {5} + 1 \right |}}\right ) - \frac {1}{20} \, \sqrt {5} \log \left (\frac {{\left | 2 \, x - \sqrt {5} - 1 \right |}}{{\left | 2 \, x + \sqrt {5} - 1 \right |}}\right ) - \frac {1}{4} \, \log \left ({\left | x^{2} + x - 1 \right |}\right ) + \frac {1}{4} \, \log \left ({\left | x^{2} - x - 1 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.10, size = 67, normalized size = 0.93 \begin {gather*} \mathrm {atanh}\left (\frac {4\,x}{\sqrt {5}-3}-\frac {2\,\sqrt {5}\,x}{\sqrt {5}-3}\right )\,\left (\frac {\sqrt {5}}{10}-\frac {1}{2}\right )+\mathrm {atanh}\left (\frac {4\,x}{\sqrt {5}+3}+\frac {2\,\sqrt {5}\,x}{\sqrt {5}+3}\right )\,\left (\frac {\sqrt {5}}{10}+\frac {1}{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________