Optimal. Leaf size=82 \[ \frac {4 x}{3 \left (1-3 x^2\right )}-\frac {2 \sqrt {1+x^2}}{3 \left (1-3 x^2\right )}-\frac {\tanh ^{-1}\left (\sqrt {3} x\right )}{3 \sqrt {3}}+\frac {\tanh ^{-1}\left (\frac {1}{2} \sqrt {3} \sqrt {1+x^2}\right )}{3 \sqrt {3}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 6, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {6874, 205, 213,
455, 43, 65} \begin {gather*} \frac {4 x}{3 \left (1-3 x^2\right )}-\frac {2 \sqrt {x^2+1}}{3 \left (1-3 x^2\right )}+\frac {\tanh ^{-1}\left (\frac {1}{2} \sqrt {3} \sqrt {x^2+1}\right )}{3 \sqrt {3}}-\frac {\tanh ^{-1}\left (\sqrt {3} x\right )}{3 \sqrt {3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 65
Rule 205
Rule 213
Rule 455
Rule 6874
Rubi steps
\begin {align*} \int \frac {1}{\left (2 x+\sqrt {1+x^2}\right )^2} \, dx &=\int \left (\frac {8}{3 \left (-1+3 x^2\right )^2}-\frac {4 x \sqrt {1+x^2}}{\left (-1+3 x^2\right )^2}+\frac {5}{3 \left (-1+3 x^2\right )}\right ) \, dx\\ &=\frac {5}{3} \int \frac {1}{-1+3 x^2} \, dx+\frac {8}{3} \int \frac {1}{\left (-1+3 x^2\right )^2} \, dx-4 \int \frac {x \sqrt {1+x^2}}{\left (-1+3 x^2\right )^2} \, dx\\ &=\frac {4 x}{3 \left (1-3 x^2\right )}-\frac {5 \tanh ^{-1}\left (\sqrt {3} x\right )}{3 \sqrt {3}}-\frac {4}{3} \int \frac {1}{-1+3 x^2} \, dx-2 \text {Subst}\left (\int \frac {\sqrt {1+x}}{(-1+3 x)^2} \, dx,x,x^2\right )\\ &=\frac {4 x}{3 \left (1-3 x^2\right )}-\frac {2 \sqrt {1+x^2}}{3 \left (1-3 x^2\right )}-\frac {\tanh ^{-1}\left (\sqrt {3} x\right )}{3 \sqrt {3}}-\frac {1}{3} \text {Subst}\left (\int \frac {1}{\sqrt {1+x} (-1+3 x)} \, dx,x,x^2\right )\\ &=\frac {4 x}{3 \left (1-3 x^2\right )}-\frac {2 \sqrt {1+x^2}}{3 \left (1-3 x^2\right )}-\frac {\tanh ^{-1}\left (\sqrt {3} x\right )}{3 \sqrt {3}}-\frac {2}{3} \text {Subst}\left (\int \frac {1}{-4+3 x^2} \, dx,x,\sqrt {1+x^2}\right )\\ &=\frac {4 x}{3 \left (1-3 x^2\right )}-\frac {2 \sqrt {1+x^2}}{3 \left (1-3 x^2\right )}-\frac {\tanh ^{-1}\left (\sqrt {3} x\right )}{3 \sqrt {3}}+\frac {\tanh ^{-1}\left (\frac {1}{2} \sqrt {3} \sqrt {1+x^2}\right )}{3 \sqrt {3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.21, size = 60, normalized size = 0.73 \begin {gather*} \frac {6 \left (-2 x+\sqrt {1+x^2}\right )-2 \sqrt {3} \left (-1+3 x^2\right ) \tanh ^{-1}\left (\frac {x-\sqrt {1+x^2}}{\sqrt {3}}\right )}{-9+27 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(369\) vs.
\(2(60)=120\).
time = 0.16, size = 370, normalized size = 4.51
method | result | size |
trager | \(-\frac {4 x}{3 \left (3 x^{2}-1\right )}+\frac {2 \sqrt {x^{2}+1}}{3 \left (3 x^{2}-1\right )}+\frac {\RootOf \left (\textit {\_Z}^{2}-3\right ) \ln \left (-\frac {2 \RootOf \left (\textit {\_Z}^{2}-3\right )+3 \sqrt {x^{2}+1}}{\RootOf \left (\textit {\_Z}^{2}-3\right ) x +1}\right )}{9}\) | \(73\) |
default | \(-\frac {x}{2 \left (3 x^{2}-1\right )}-\frac {\arctanh \left (x \sqrt {3}\right ) \sqrt {3}}{9}-\frac {5 x}{18 \left (x^{2}-\frac {1}{3}\right )}-\sqrt {3}\, \left (-\frac {\left (\left (x -\frac {\sqrt {3}}{3}\right )^{2}+\frac {2 \sqrt {3}\, \left (x -\frac {\sqrt {3}}{3}\right )}{3}+\frac {4}{3}\right )^{\frac {3}{2}}}{12 \left (x -\frac {\sqrt {3}}{3}\right )}+\frac {\sqrt {3}\, \left (\frac {\sqrt {9 \left (x -\frac {\sqrt {3}}{3}\right )^{2}+6 \sqrt {3}\, \left (x -\frac {\sqrt {3}}{3}\right )+12}}{3}+\frac {\sqrt {3}\, \arcsinh \left (x \right )}{3}-\frac {2 \sqrt {3}\, \arctanh \left (\frac {3 \left (\frac {8}{3}+\frac {2 \sqrt {3}\, \left (x -\frac {\sqrt {3}}{3}\right )}{3}\right ) \sqrt {3}}{4 \sqrt {9 \left (x -\frac {\sqrt {3}}{3}\right )^{2}+6 \sqrt {3}\, \left (x -\frac {\sqrt {3}}{3}\right )+12}}\right )}{3}\right )}{36}+\frac {x \sqrt {\left (x -\frac {\sqrt {3}}{3}\right )^{2}+\frac {2 \sqrt {3}\, \left (x -\frac {\sqrt {3}}{3}\right )}{3}+\frac {4}{3}}}{12}+\frac {\arcsinh \left (x \right )}{12}\right )+\sqrt {3}\, \left (-\frac {\left (\left (x +\frac {\sqrt {3}}{3}\right )^{2}-\frac {2 \sqrt {3}\, \left (x +\frac {\sqrt {3}}{3}\right )}{3}+\frac {4}{3}\right )^{\frac {3}{2}}}{12 \left (x +\frac {\sqrt {3}}{3}\right )}-\frac {\sqrt {3}\, \left (\frac {\sqrt {9 \left (x +\frac {\sqrt {3}}{3}\right )^{2}-6 \sqrt {3}\, \left (x +\frac {\sqrt {3}}{3}\right )+12}}{3}-\frac {\sqrt {3}\, \arcsinh \left (x \right )}{3}-\frac {2 \sqrt {3}\, \arctanh \left (\frac {3 \left (\frac {8}{3}-\frac {2 \sqrt {3}\, \left (x +\frac {\sqrt {3}}{3}\right )}{3}\right ) \sqrt {3}}{4 \sqrt {9 \left (x +\frac {\sqrt {3}}{3}\right )^{2}-6 \sqrt {3}\, \left (x +\frac {\sqrt {3}}{3}\right )+12}}\right )}{3}\right )}{36}+\frac {x \sqrt {\left (x +\frac {\sqrt {3}}{3}\right )^{2}-\frac {2 \sqrt {3}\, \left (x +\frac {\sqrt {3}}{3}\right )}{3}+\frac {4}{3}}}{12}+\frac {\arcsinh \left (x \right )}{12}\right )\) | \(370\) |
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 [A]
time = 0.44, size = 100, normalized size = 1.22 \begin {gather*} \frac {\sqrt {3} {\left (3 \, x^{2} - 1\right )} \log \left (\frac {3 \, x^{2} - 2 \, \sqrt {3} x + 1}{3 \, x^{2} - 1}\right ) + \sqrt {3} {\left (3 \, x^{2} - 1\right )} \log \left (\frac {3 \, x^{2} + 4 \, \sqrt {3} \sqrt {x^{2} + 1} + 7}{3 \, x^{2} - 1}\right ) - 24 \, x + 12 \, \sqrt {x^{2} + 1}}{18 \, {\left (3 \, x^{2} - 1\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 {1}{\left (2 x + \sqrt {x^{2} + 1}\right )^{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. 177 vs.
\(2 (60) = 120\).
time = 0.88, size = 177, normalized size = 2.16 \begin {gather*} \frac {1}{18} \, \sqrt {3} \log \left (\frac {{\left | 6 \, x - 2 \, \sqrt {3} \right |}}{{\left | 6 \, x + 2 \, \sqrt {3} \right |}}\right ) - \frac {1}{18} \, \sqrt {3} \log \left (-\frac {{\left | -6 \, x - 8 \, \sqrt {3} + 6 \, \sqrt {x^{2} + 1} - \frac {6}{x - \sqrt {x^{2} + 1}} \right |}}{2 \, {\left (3 \, x - 4 \, \sqrt {3} - 3 \, \sqrt {x^{2} + 1} + \frac {3}{x - \sqrt {x^{2} + 1}}\right )}}\right ) - \frac {4 \, {\left (x - \sqrt {x^{2} + 1} + \frac {1}{x - \sqrt {x^{2} + 1}}\right )}}{3 \, {\left (3 \, {\left (x - \sqrt {x^{2} + 1} + \frac {1}{x - \sqrt {x^{2} + 1}}\right )}^{2} - 16\right )}} - \frac {4 \, x}{3 \, {\left (3 \, x^{2} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.57, size = 204, normalized size = 2.49 \begin {gather*} \frac {\sqrt {3}\,\left (\ln \left (x-\frac {\sqrt {3}}{3}\right )-\ln \left (x+\sqrt {3}+2\,\sqrt {x^2+1}\right )\right )}{18}-\frac {4\,x}{9\,\left (x^2-\frac {1}{3}\right )}+\frac {\sqrt {3}\,\left (\ln \left (x+\frac {\sqrt {3}}{3}\right )-\ln \left (x-\sqrt {3}-2\,\sqrt {x^2+1}\right )\right )}{18}-\frac {\sqrt {3}\,\left (6\,\ln \left (x-\frac {\sqrt {3}}{3}\right )-6\,\ln \left (x+\sqrt {3}+2\,\sqrt {x^2+1}\right )\right )}{54}-\frac {\sqrt {3}\,\left (6\,\ln \left (x+\frac {\sqrt {3}}{3}\right )-6\,\ln \left (x-\sqrt {3}-2\,\sqrt {x^2+1}\right )\right )}{54}+\frac {\sqrt {3}\,\sqrt {x^2+1}}{9\,\left (x-\frac {\sqrt {3}}{3}\right )}-\frac {\sqrt {3}\,\sqrt {x^2+1}}{9\,\left (x+\frac {\sqrt {3}}{3}\right )}+\frac {\sqrt {3}\,\mathrm {atan}\left (\sqrt {3}\,x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________