Optimal. Leaf size=41 \[ \tanh ^{-1}\left (\frac {x}{\sqrt {-2+x^2}}\right )-\sqrt {\frac {3}{2}} \tanh ^{-1}\left (\frac {\sqrt {\frac {2}{3}} x}{\sqrt {-2+x^2}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {494, 223, 212,
385, 213} \begin {gather*} \tanh ^{-1}\left (\frac {x}{\sqrt {x^2-2}}\right )-\sqrt {\frac {3}{2}} \tanh ^{-1}\left (\frac {\sqrt {\frac {2}{3}} x}{\sqrt {x^2-2}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 213
Rule 223
Rule 385
Rule 494
Rubi steps
\begin {align*} \int \frac {x^2}{\left (-6+x^2\right ) \sqrt {-2+x^2}} \, dx &=6 \int \frac {1}{\left (-6+x^2\right ) \sqrt {-2+x^2}} \, dx+\int \frac {1}{\sqrt {-2+x^2}} \, dx\\ &=6 \text {Subst}\left (\int \frac {1}{-6+4 x^2} \, dx,x,\frac {x}{\sqrt {-2+x^2}}\right )+\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x}{\sqrt {-2+x^2}}\right )\\ &=\tanh ^{-1}\left (\frac {x}{\sqrt {-2+x^2}}\right )-\sqrt {\frac {3}{2}} \tanh ^{-1}\left (\frac {\sqrt {\frac {2}{3}} x}{\sqrt {-2+x^2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.13, size = 50, normalized size = 1.22 \begin {gather*} \tanh ^{-1}\left (\frac {x}{\sqrt {-2+x^2}}\right )-\sqrt {\frac {3}{2}} \tanh ^{-1}\left (\frac {6-x^2+x \sqrt {-2+x^2}}{2 \sqrt {6}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(99\) vs.
\(2(30)=60\).
time = 0.16, size = 100, normalized size = 2.44
method | result | size |
trager | \(-\ln \left (x -\sqrt {x^{2}-2}\right )-\frac {\RootOf \left (\textit {\_Z}^{2}-6\right ) \ln \left (-\frac {5 \RootOf \left (\textit {\_Z}^{2}-6\right ) x^{2}+12 \sqrt {x^{2}-2}\, x -6 \RootOf \left (\textit {\_Z}^{2}-6\right )}{x^{2}-6}\right )}{4}\) | \(64\) |
default | \(\ln \left (x +\sqrt {x^{2}-2}\right )-\frac {\sqrt {6}\, \arctanh \left (\frac {8+2 \sqrt {6}\, \left (x -\sqrt {6}\right )}{4 \sqrt {\left (x -\sqrt {6}\right )^{2}+2 \sqrt {6}\, \left (x -\sqrt {6}\right )+4}}\right )}{4}+\frac {\sqrt {6}\, \arctanh \left (\frac {8-2 \sqrt {6}\, \left (x +\sqrt {6}\right )}{4 \sqrt {\left (x +\sqrt {6}\right )^{2}-2 \sqrt {6}\, \left (x +\sqrt {6}\right )+4}}\right )}{4}\) | \(100\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 107 vs.
\(2 (30) = 60\).
time = 2.21, size = 107, normalized size = 2.61 \begin {gather*} \frac {1}{12} \, \sqrt {6} {\left (2 \, \sqrt {6} \log \left (x + \sqrt {x^{2} - 2}\right ) - 3 \, \log \left (\sqrt {6} + \frac {4 \, \sqrt {x^{2} - 2}}{{\left | 2 \, x - 2 \, \sqrt {6} \right |}} + \frac {8}{{\left | 2 \, x - 2 \, \sqrt {6} \right |}}\right ) + 3 \, \log \left (-\sqrt {6} + \frac {4 \, \sqrt {x^{2} - 2}}{{\left | 2 \, x + 2 \, \sqrt {6} \right |}} + \frac {8}{{\left | 2 \, x + 2 \, \sqrt {6} \right |}}\right )\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. 77 vs.
\(2 (30) = 60\).
time = 0.53, size = 77, normalized size = 1.88 \begin {gather*} \frac {1}{4} \, \sqrt {3} \sqrt {2} \log \left (-\frac {2 \, \sqrt {3} \sqrt {2} {\left (5 \, x^{2} - 6\right )} - 25 \, x^{2} + 2 \, {\left (5 \, \sqrt {3} \sqrt {2} x - 12 \, x\right )} \sqrt {x^{2} - 2} + 30}{x^{2} - 6}\right ) - \log \left (-x + \sqrt {x^{2} - 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 {x^{2}}{\left (x^{2} - 6\right ) \sqrt {x^{2} - 2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 72 vs.
\(2 (30) = 60\).
time = 0.68, size = 72, normalized size = 1.76 \begin {gather*} -\frac {1}{4} \, \sqrt {6} \log \left (\frac {{\left | 2 \, {\left (x - \sqrt {x^{2} - 2}\right )}^{2} - 8 \, \sqrt {6} - 20 \right |}}{{\left | 2 \, {\left (x - \sqrt {x^{2} - 2}\right )}^{2} + 8 \, \sqrt {6} - 20 \right |}}\right ) - \frac {1}{2} \, \log \left ({\left (x - \sqrt {x^{2} - 2}\right )}^{2}\right ) \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^2}{\sqrt {x^2-2}\,\left (x^2-6\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________