Optimal. Leaf size=131 \[ \frac {2 \sqrt {x^2+1} (3 x-6)+2 \left (3 x^2-6 x+1\right )}{3 \left (\sqrt {x^2+1}+x\right )^{3/2}}-4 \sqrt {\sqrt {2}-1} \tan ^{-1}\left (\frac {\sqrt {\sqrt {x^2+1}+x}}{\sqrt {1+\sqrt {2}}}\right )+4 \sqrt {1+\sqrt {2}} \tanh ^{-1}\left (\frac {\sqrt {\sqrt {x^2+1}+x}}{\sqrt {\sqrt {2}-1}}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.37, antiderivative size = 134, normalized size of antiderivative = 1.02, number of steps used = 13, number of rules used = 10, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {6742, 2117, 14, 2119, 1628, 828, 826, 1166, 207, 203} \begin {gather*} \sqrt {\sqrt {x^2+1}+x}-\frac {4}{\sqrt {\sqrt {x^2+1}+x}}-\frac {1}{3 \left (\sqrt {x^2+1}+x\right )^{3/2}}-\frac {4 \tan ^{-1}\left (\sqrt {\sqrt {2}-1} \sqrt {\sqrt {x^2+1}+x}\right )}{\sqrt {1+\sqrt {2}}}+\frac {4 \tanh ^{-1}\left (\sqrt {1+\sqrt {2}} \sqrt {\sqrt {x^2+1}+x}\right )}{\sqrt {\sqrt {2}-1}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
Rule 14
Rule 203
Rule 207
Rule 826
Rule 828
Rule 1166
Rule 1628
Rule 2117
Rule 2119
Rule 6742
Rubi steps
\begin {align*} \int \frac {-1+x}{(1+x) \sqrt {x+\sqrt {1+x^2}}} \, dx &=\int \left (\frac {1}{\sqrt {x+\sqrt {1+x^2}}}-\frac {2}{(1+x) \sqrt {x+\sqrt {1+x^2}}}\right ) \, dx\\ &=-\left (2 \int \frac {1}{(1+x) \sqrt {x+\sqrt {1+x^2}}} \, dx\right )+\int \frac {1}{\sqrt {x+\sqrt {1+x^2}}} \, dx\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {1+x^2}{x^{5/2}} \, dx,x,x+\sqrt {1+x^2}\right )-2 \operatorname {Subst}\left (\int \frac {1+x^2}{x^{3/2} \left (-1+2 x+x^2\right )} \, dx,x,x+\sqrt {1+x^2}\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \left (\frac {1}{x^{5/2}}+\frac {1}{\sqrt {x}}\right ) \, dx,x,x+\sqrt {1+x^2}\right )-2 \operatorname {Subst}\left (\int \left (\frac {1}{x^{3/2}}+\frac {2 (1-x)}{x^{3/2} \left (-1+2 x+x^2\right )}\right ) \, dx,x,x+\sqrt {1+x^2}\right )\\ &=-\frac {1}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}+\frac {4}{\sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^2}}-4 \operatorname {Subst}\left (\int \frac {1-x}{x^{3/2} \left (-1+2 x+x^2\right )} \, dx,x,x+\sqrt {1+x^2}\right )\\ &=-\frac {1}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}-\frac {4}{\sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^2}}+4 \operatorname {Subst}\left (\int \frac {-1-x}{\sqrt {x} \left (-1+2 x+x^2\right )} \, dx,x,x+\sqrt {1+x^2}\right )\\ &=-\frac {1}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}-\frac {4}{\sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^2}}+8 \operatorname {Subst}\left (\int \frac {-1-x^2}{-1+2 x^2+x^4} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )\\ &=-\frac {1}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}-\frac {4}{\sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^2}}-4 \operatorname {Subst}\left (\int \frac {1}{1-\sqrt {2}+x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )-4 \operatorname {Subst}\left (\int \frac {1}{1+\sqrt {2}+x^2} \, dx,x,\sqrt {x+\sqrt {1+x^2}}\right )\\ &=-\frac {1}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}-\frac {4}{\sqrt {x+\sqrt {1+x^2}}}+\sqrt {x+\sqrt {1+x^2}}-\frac {4 \tan ^{-1}\left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {1+\sqrt {2}}}\right )}{\sqrt {1+\sqrt {2}}}+\frac {4 \tanh ^{-1}\left (\frac {\sqrt {x+\sqrt {1+x^2}}}{\sqrt {-1+\sqrt {2}}}\right )}{\sqrt {-1+\sqrt {2}}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.36, size = 148, normalized size = 1.13 \begin {gather*} \sqrt {\sqrt {x^2+1}+x}-\frac {4}{\sqrt {\sqrt {x^2+1}+x}}-\frac {1}{3 \left (\sqrt {x^2+1}+x\right )^{3/2}}+4 \left (\sqrt {2}-1\right ) \sqrt {1+\sqrt {2}} \tan ^{-1}\left (\frac {1}{\sqrt {\sqrt {2}-1} \sqrt {\sqrt {x^2+1}+x}}\right )+4 \sqrt {\sqrt {2}-1} \left (1+\sqrt {2}\right ) \tanh ^{-1}\left (\frac {1}{\sqrt {1+\sqrt {2}} \sqrt {\sqrt {x^2+1}+x}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.21, size = 131, normalized size = 1.00 \begin {gather*} \frac {2 (-6+3 x) \sqrt {1+x^2}+2 \left (1-6 x+3 x^2\right )}{3 \left (x+\sqrt {1+x^2}\right )^{3/2}}-4 \sqrt {-1+\sqrt {2}} \tan ^{-1}\left (\sqrt {-1+\sqrt {2}} \sqrt {x+\sqrt {1+x^2}}\right )+4 \sqrt {1+\sqrt {2}} \tanh ^{-1}\left (\sqrt {1+\sqrt {2}} \sqrt {x+\sqrt {1+x^2}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 164, normalized size = 1.25 \begin {gather*} -\frac {2}{3} \, {\left (x^{2} - \sqrt {x^{2} + 1} {\left (x - 6\right )} - 6 \, x - 1\right )} \sqrt {x + \sqrt {x^{2} + 1}} + 8 \, \sqrt {\sqrt {2} - 1} \arctan \left (\sqrt {x + \sqrt {2} + \sqrt {x^{2} + 1} + 1} \sqrt {\sqrt {2} - 1} - \sqrt {x + \sqrt {x^{2} + 1}} \sqrt {\sqrt {2} - 1}\right ) + 2 \, \sqrt {\sqrt {2} + 1} \log \left (4 \, \sqrt {\sqrt {2} + 1} {\left (\sqrt {2} - 1\right )} + 4 \, \sqrt {x + \sqrt {x^{2} + 1}}\right ) - 2 \, \sqrt {\sqrt {2} + 1} \log \left (-4 \, \sqrt {\sqrt {2} + 1} {\left (\sqrt {2} - 1\right )} + 4 \, \sqrt {x + \sqrt {x^{2} + 1}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x - 1}{\sqrt {x + \sqrt {x^{2} + 1}} {\left (x + 1\right )}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.03, size = 0, normalized size = 0.00 \[\int \frac {-1+x}{\left (1+x \right ) \sqrt {x +\sqrt {x^{2}+1}}}\, dx\]
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*} \int \frac {x - 1}{\sqrt {x + \sqrt {x^{2} + 1}} {\left (x + 1\right )}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x-1}{\sqrt {x+\sqrt {x^2+1}}\,\left (x+1\right )} \,d x \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 - 1}{\left (x + 1\right ) \sqrt {x + \sqrt {x^{2} + 1}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________