Optimal. Leaf size=21 \[ \tanh ^{-1}\left (\frac {x^2+1}{\sqrt {x^4+3 x^2+1}}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {1251, 838, 206} \[ \tanh ^{-1}\left (\frac {x^2+1}{\sqrt {x^4+3 x^2+1}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 838
Rule 1251
Rubi steps
\begin {align*} \int \frac {-1+x^2}{x \sqrt {1+3 x^2+x^4}} \, dx &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {-1+x}{x \sqrt {1+3 x+x^2}} \, dx,x,x^2\right )\\ &=2 \operatorname {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {2 \left (1+x^2\right )}{\sqrt {1+3 x^2+x^4}}\right )\\ &=\tanh ^{-1}\left (\frac {1+x^2}{\sqrt {1+3 x^2+x^4}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.02, size = 57, normalized size = 2.71 \[ \frac {1}{2} \left (\tanh ^{-1}\left (\frac {2 x^2+3}{2 \sqrt {x^4+3 x^2+1}}\right )+\tanh ^{-1}\left (\frac {3 x^2+2}{2 \sqrt {x^4+3 x^2+1}}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [B] time = 0.23, size = 52, normalized size = 2.48 \[ -\frac {1}{2} \log \left (-2 x^2+2 \sqrt {x^4+3 x^2+1}-3\right )-\tanh ^{-1}\left (x^2-\sqrt {x^4+3 x^2+1}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.61, size = 59, normalized size = 2.81 \[ -\frac {1}{2} \, \log \left (4 \, x^{4} + 11 \, x^{2} - \sqrt {x^{4} + 3 \, x^{2} + 1} {\left (4 \, x^{2} + 5\right )} + 5\right ) + \frac {1}{2} \, \log \left (-x^{2} + \sqrt {x^{4} + 3 \, x^{2} + 1} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.63, size = 69, normalized size = 3.29 \[ -\frac {1}{2} \, \log \left (2 \, x^{2} - 2 \, \sqrt {x^{4} + 3 \, x^{2} + 1} + 3\right ) + \frac {1}{2} \, \log \left (-x^{2} + \sqrt {x^{4} + 3 \, x^{2} + 1} + 1\right ) - \frac {1}{2} \, \log \left (-x^{2} + \sqrt {x^{4} + 3 \, x^{2} + 1} - 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.20, size = 27, normalized size = 1.29
method | result | size |
trager | \(-\ln \left (\frac {-x^{2}+\sqrt {x^{4}+3 x^{2}+1}-1}{x}\right )\) | \(27\) |
default | \(\frac {\ln \left (\frac {3}{2}+x^{2}+\sqrt {x^{4}+3 x^{2}+1}\right )}{2}+\frac {\arctanh \left (\frac {3 x^{2}+2}{2 \sqrt {x^{4}+3 x^{2}+1}}\right )}{2}\) | \(46\) |
elliptic | \(\frac {\ln \left (\frac {3}{2}+x^{2}+\sqrt {x^{4}+3 x^{2}+1}\right )}{2}+\frac {\arctanh \left (\frac {3 x^{2}+2}{2 \sqrt {x^{4}+3 x^{2}+1}}\right )}{2}\) | \(46\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.48, size = 52, normalized size = 2.48 \[ \frac {1}{2} \, \log \left (2 \, x^{2} + 2 \, \sqrt {x^{4} + 3 \, x^{2} + 1} + 3\right ) + \frac {1}{2} \, \log \left (\frac {2 \, \sqrt {x^{4} + 3 \, x^{2} + 1}}{x^{2}} + \frac {2}{x^{2}} + 3\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.81, size = 49, normalized size = 2.33 \[ \frac {\ln \left (\frac {1}{x^2}\right )}{2}+\frac {\ln \left (\sqrt {x^4+3\,x^2+1}+x^2+\frac {3}{2}\right )}{2}+\frac {\ln \left (\frac {2\,\sqrt {x^4+3\,x^2+1}}{3}+x^2+\frac {2}{3}\right )}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (x - 1\right ) \left (x + 1\right )}{x \sqrt {x^{4} + 3 x^{2} + 1}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________