Optimal. Leaf size=65 \[ \frac {1}{2} \sqrt {x^2+1} x+\sqrt {x^2+1}+\frac {\sqrt {x^2+1}}{x}-\log \left (\sqrt {x^2+1}+1\right )-x-\frac {1}{x}-\frac {1}{2} \sinh ^{-1}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.16, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 7, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {6742, 277, 215, 1591, 190, 43, 195} \[ \frac {1}{2} \sqrt {x^2+1} x+\sqrt {x^2+1}+\frac {\sqrt {x^2+1}}{x}-\log \left (\sqrt {x^2+1}+1\right )-x-\frac {1}{x}-\frac {1}{2} \sinh ^{-1}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 190
Rule 195
Rule 215
Rule 277
Rule 1591
Rule 6742
Rubi steps
\begin {align*} \int \frac {-1+x+x^2}{1+\sqrt {1+x^2}} \, dx &=\int \left (-\frac {1}{1+\sqrt {1+x^2}}+\frac {x}{1+\sqrt {1+x^2}}+\frac {x^2}{1+\sqrt {1+x^2}}\right ) \, dx\\ &=-\int \frac {1}{1+\sqrt {1+x^2}} \, dx+\int \frac {x}{1+\sqrt {1+x^2}} \, dx+\int \frac {x^2}{1+\sqrt {1+x^2}} \, dx\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{1+\sqrt {x}} \, dx,x,1+x^2\right )+\int \left (-1+\sqrt {1+x^2}\right ) \, dx-\int \left (-\frac {1}{x^2}+\frac {\sqrt {1+x^2}}{x^2}\right ) \, dx\\ &=-\frac {1}{x}-x+\int \sqrt {1+x^2} \, dx-\int \frac {\sqrt {1+x^2}}{x^2} \, dx+\operatorname {Subst}\left (\int \frac {x}{1+x} \, dx,x,\sqrt {1+x^2}\right )\\ &=-\frac {1}{x}-x+\frac {\sqrt {1+x^2}}{x}+\frac {1}{2} x \sqrt {1+x^2}+\frac {1}{2} \int \frac {1}{\sqrt {1+x^2}} \, dx-\int \frac {1}{\sqrt {1+x^2}} \, dx+\operatorname {Subst}\left (\int \left (1+\frac {1}{-1-x}\right ) \, dx,x,\sqrt {1+x^2}\right )\\ &=-\frac {1}{x}-x+\sqrt {1+x^2}+\frac {\sqrt {1+x^2}}{x}+\frac {1}{2} x \sqrt {1+x^2}-\frac {1}{2} \sinh ^{-1}(x)-\log \left (1+\sqrt {1+x^2}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 65, normalized size = 1.00 \[ \frac {1}{2} \sqrt {x^2+1} x+\sqrt {x^2+1}+\frac {\sqrt {x^2+1}}{x}-\log \left (\sqrt {x^2+1}+1\right )-x-\frac {1}{x}-\frac {1}{2} \sinh ^{-1}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.40, size = 84, normalized size = 1.29 \[ -\frac {2 \, x^{2} + 2 \, x \log \relax (x) + 2 \, x \log \left (-x + \sqrt {x^{2} + 1} + 1\right ) - x \log \left (-x + \sqrt {x^{2} + 1}\right ) - 2 \, x \log \left (-x + \sqrt {x^{2} + 1} - 1\right ) - {\left (x^{2} + 2 \, x + 2\right )} \sqrt {x^{2} + 1} - 2 \, x + 2}{2 \, x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.42, size = 89, normalized size = 1.37 \[ \frac {1}{2} \, \sqrt {x^{2} + 1} {\left (x + 2\right )} - x - \frac {2}{{\left (x - \sqrt {x^{2} + 1}\right )}^{2} - 1} - \frac {1}{x} + \frac {1}{2} \, \log \left (-x + \sqrt {x^{2} + 1}\right ) - \log \left ({\left | x \right |}\right ) - \log \left ({\left | -x + \sqrt {x^{2} + 1} + 1 \right |}\right ) + \log \left ({\left | -x + \sqrt {x^{2} + 1} - 1 \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 56, normalized size = 0.86 \[ -x -\frac {\sqrt {x^{2}+1}\, x}{2}-\frac {\arcsinh \relax (x )}{2}-\arctanh \left (\frac {1}{\sqrt {x^{2}+1}}\right )-\ln \relax (x )-\frac {1}{x}+\frac {\left (x^{2}+1\right )^{\frac {3}{2}}}{x}+\sqrt {x^{2}+1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ 2 \, x - 5 \, \arctan \left (\frac {1}{2} \, x\right ) + \int \frac {x^{6} + x^{5} - x^{4}}{3 \, x^{4} + 16 \, x^{2} + {\left (x^{4} + 8 \, x^{2} + 16\right )} \sqrt {x^{2} + 1} + 16}\,{d x} + \log \left (x^{2} + 4\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.04, size = 55, normalized size = 0.85 \[ \left (\frac {x}{2}+1\right )\,\sqrt {x^2+1}-\frac {\mathrm {asinh}\relax (x)}{2}-\ln \relax (x)-x+\frac {\sqrt {x^2+1}}{x}-\frac {1}{x}+\mathrm {atan}\left (\sqrt {x^2+1}\,1{}\mathrm {i}\right )\,1{}\mathrm {i} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 4.51, size = 63, normalized size = 0.97 \[ \frac {x \sqrt {x^{2} + 1}}{2} - x + \frac {x}{\sqrt {x^{2} + 1}} + \sqrt {x^{2} + 1} - \log {\left (\sqrt {x^{2} + 1} + 1 \right )} - \frac {\operatorname {asinh}{\relax (x )}}{2} - \frac {1}{x} + \frac {1}{x \sqrt {x^{2} + 1}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________