Optimal. Leaf size=220 \[ \frac{2-4 x}{5 \left (\sqrt{x^2-1}+\sqrt{x}\right )}-\frac{1}{50} \sqrt{50 \sqrt{5}-110} \tan ^{-1}\left (\frac{\sqrt{2 \sqrt{5}-2} \sqrt{x^2-1}}{2-\left (1-\sqrt{5}\right ) x}\right )-\frac{1}{50} \sqrt{110+50 \sqrt{5}} \tanh ^{-1}\left (\frac{\sqrt{2+2 \sqrt{5}} \sqrt{x^2-1}}{-\sqrt{5} x-x+2}\right )+\frac{1}{25} \sqrt{50 \sqrt{5}-110} \tan ^{-1}\left (\frac{1}{2} \sqrt{2+2 \sqrt{5}} \sqrt{x}\right )-\frac{1}{25} \sqrt{110+50 \sqrt{5}} \tanh ^{-1}\left (\frac{1}{2} \sqrt{2 \sqrt{5}-2} \sqrt{x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.505796, antiderivative size = 365, normalized size of antiderivative = 1.66, number of steps used = 18, number of rules used = 12, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.444, Rules used = {6742, 736, 826, 1166, 207, 203, 1018, 1034, 725, 206, 204, 985} \[ -\frac{2 \sqrt{x^2-1} (1-2 x)}{5 \left (-x^2+x+1\right )}+\frac{2 \sqrt{x} (1-2 x)}{5 \left (-x^2+x+1\right )}-\frac{2}{5} \sqrt{\frac{1}{5} \left (5 \sqrt{5}-2\right )} \tan ^{-1}\left (\frac{2-\left (1-\sqrt{5}\right ) x}{\sqrt{2 \left (\sqrt{5}-1\right )} \sqrt{x^2-1}}\right )+\sqrt{\frac{2}{5 \left (\sqrt{5}-1\right )}} \tan ^{-1}\left (\frac{2-\left (1-\sqrt{5}\right ) x}{\sqrt{2 \left (\sqrt{5}-1\right )} \sqrt{x^2-1}}\right )-\frac{2}{5} \sqrt{\frac{1}{5} \left (2+5 \sqrt{5}\right )} \tanh ^{-1}\left (\frac{2-\left (1+\sqrt{5}\right ) x}{\sqrt{2 \left (1+\sqrt{5}\right )} \sqrt{x^2-1}}\right )+\sqrt{\frac{2}{5 \left (1+\sqrt{5}\right )}} \tanh ^{-1}\left (\frac{2-\left (1+\sqrt{5}\right ) x}{\sqrt{2 \left (1+\sqrt{5}\right )} \sqrt{x^2-1}}\right )+\frac{1}{5} \sqrt{\frac{2}{5} \left (5 \sqrt{5}-11\right )} \tan ^{-1}\left (\sqrt{\frac{2}{\sqrt{5}-1}} \sqrt{x}\right )-\frac{1}{5} \sqrt{\frac{2}{5} \left (11+5 \sqrt{5}\right )} \tanh ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} \sqrt{x}\right ) \]
Warning: Unable to verify antiderivative.
[In]
[Out]
Rule 6742
Rule 736
Rule 826
Rule 1166
Rule 207
Rule 203
Rule 1018
Rule 1034
Rule 725
Rule 206
Rule 204
Rule 985
Rubi steps
\begin{align*} \int \frac{1}{\sqrt{-1+x^2} \left (\sqrt{x}+\sqrt{-1+x^2}\right )^2} \, dx &=\int \left (-\frac{2 \sqrt{x}}{\left (-1-x+x^2\right )^2}+\frac{2 x}{\sqrt{-1+x^2} \left (-1-x+x^2\right )^2}+\frac{1}{\sqrt{-1+x^2} \left (-1-x+x^2\right )}\right ) \, dx\\ &=-\left (2 \int \frac{\sqrt{x}}{\left (-1-x+x^2\right )^2} \, dx\right )+2 \int \frac{x}{\sqrt{-1+x^2} \left (-1-x+x^2\right )^2} \, dx+\int \frac{1}{\sqrt{-1+x^2} \left (-1-x+x^2\right )} \, dx\\ &=\frac{2 (1-2 x) \sqrt{x}}{5 \left (1+x-x^2\right )}-\frac{2 (1-2 x) \sqrt{-1+x^2}}{5 \left (1+x-x^2\right )}-\frac{2}{5} \int \frac{-\frac{1}{2}-x}{\sqrt{x} \left (-1-x+x^2\right )} \, dx+\frac{2}{5} \int \frac{-3-x}{\sqrt{-1+x^2} \left (-1-x+x^2\right )} \, dx+\frac{2 \int \frac{1}{\left (-1-\sqrt{5}+2 x\right ) \sqrt{-1+x^2}} \, dx}{\sqrt{5}}-\frac{2 \int \frac{1}{\left (-1+\sqrt{5}+2 x\right ) \sqrt{-1+x^2}} \, dx}{\sqrt{5}}\\ &=\frac{2 (1-2 x) \sqrt{x}}{5 \left (1+x-x^2\right )}-\frac{2 (1-2 x) \sqrt{-1+x^2}}{5 \left (1+x-x^2\right )}-\frac{4}{5} \operatorname{Subst}\left (\int \frac{-\frac{1}{2}-x^2}{-1-x^2+x^4} \, dx,x,\sqrt{x}\right )-\frac{2 \operatorname{Subst}\left (\int \frac{1}{-4+\left (-1-\sqrt{5}\right )^2-x^2} \, dx,x,\frac{-2-\left (-1-\sqrt{5}\right ) x}{\sqrt{-1+x^2}}\right )}{\sqrt{5}}+\frac{2 \operatorname{Subst}\left (\int \frac{1}{-4+\left (-1+\sqrt{5}\right )^2-x^2} \, dx,x,\frac{-2-\left (-1+\sqrt{5}\right ) x}{\sqrt{-1+x^2}}\right )}{\sqrt{5}}-\frac{1}{25} \left (2 \left (5-7 \sqrt{5}\right )\right ) \int \frac{1}{\left (-1+\sqrt{5}+2 x\right ) \sqrt{-1+x^2}} \, dx-\frac{1}{25} \left (2 \left (5+7 \sqrt{5}\right )\right ) \int \frac{1}{\left (-1-\sqrt{5}+2 x\right ) \sqrt{-1+x^2}} \, dx\\ &=\frac{2 (1-2 x) \sqrt{x}}{5 \left (1+x-x^2\right )}-\frac{2 (1-2 x) \sqrt{-1+x^2}}{5 \left (1+x-x^2\right )}+\sqrt{\frac{2}{5 \left (-1+\sqrt{5}\right )}} \tan ^{-1}\left (\frac{2-\left (1-\sqrt{5}\right ) x}{\sqrt{2 \left (-1+\sqrt{5}\right )} \sqrt{-1+x^2}}\right )+\sqrt{\frac{2}{5 \left (1+\sqrt{5}\right )}} \tanh ^{-1}\left (\frac{2-\left (1+\sqrt{5}\right ) x}{\sqrt{2 \left (1+\sqrt{5}\right )} \sqrt{-1+x^2}}\right )+\frac{1}{25} \left (2 \left (5-7 \sqrt{5}\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-4+\left (-1+\sqrt{5}\right )^2-x^2} \, dx,x,\frac{-2-\left (-1+\sqrt{5}\right ) x}{\sqrt{-1+x^2}}\right )+\frac{1}{25} \left (2 \left (5-2 \sqrt{5}\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{1}{2}+\frac{\sqrt{5}}{2}+x^2} \, dx,x,\sqrt{x}\right )+\frac{1}{25} \left (2 \left (5+2 \sqrt{5}\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{1}{2}-\frac{\sqrt{5}}{2}+x^2} \, dx,x,\sqrt{x}\right )+\frac{1}{25} \left (2 \left (5+7 \sqrt{5}\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-4+\left (-1-\sqrt{5}\right )^2-x^2} \, dx,x,\frac{-2-\left (-1-\sqrt{5}\right ) x}{\sqrt{-1+x^2}}\right )\\ &=\frac{2 (1-2 x) \sqrt{x}}{5 \left (1+x-x^2\right )}-\frac{2 (1-2 x) \sqrt{-1+x^2}}{5 \left (1+x-x^2\right )}+\frac{1}{5} \sqrt{\frac{2}{5} \left (-11+5 \sqrt{5}\right )} \tan ^{-1}\left (\sqrt{\frac{2}{-1+\sqrt{5}}} \sqrt{x}\right )+\sqrt{\frac{2}{5 \left (-1+\sqrt{5}\right )}} \tan ^{-1}\left (\frac{2-\left (1-\sqrt{5}\right ) x}{\sqrt{2 \left (-1+\sqrt{5}\right )} \sqrt{-1+x^2}}\right )-\frac{2}{5} \sqrt{\frac{1}{5} \left (-2+5 \sqrt{5}\right )} \tan ^{-1}\left (\frac{2-\left (1-\sqrt{5}\right ) x}{\sqrt{2 \left (-1+\sqrt{5}\right )} \sqrt{-1+x^2}}\right )-\frac{1}{5} \sqrt{\frac{2}{5} \left (11+5 \sqrt{5}\right )} \tanh ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} \sqrt{x}\right )+\sqrt{\frac{2}{5 \left (1+\sqrt{5}\right )}} \tanh ^{-1}\left (\frac{2-\left (1+\sqrt{5}\right ) x}{\sqrt{2 \left (1+\sqrt{5}\right )} \sqrt{-1+x^2}}\right )-\frac{2}{5} \sqrt{\frac{1}{5} \left (2+5 \sqrt{5}\right )} \tanh ^{-1}\left (\frac{2-\left (1+\sqrt{5}\right ) x}{\sqrt{2 \left (1+\sqrt{5}\right )} \sqrt{-1+x^2}}\right )\\ \end{align*}
Mathematica [A] time = 0.687549, size = 340, normalized size = 1.55 \[ \frac{2}{5} \left (\frac{\sqrt{x} (1-2 x)}{-x^2+x+1}+\frac{\sqrt{x^2-1} (1-2 x)}{x^2-x-1}-\frac{1}{2} \sqrt{\frac{5}{2} \left (1+\sqrt{5}\right )} \tan ^{-1}\left (\frac{-\sqrt{5} x+x-2}{\sqrt{2 \left (\sqrt{5}-1\right )} \sqrt{x^2-1}}\right )-\sqrt{\sqrt{5}-\frac{2}{5}} \tan ^{-1}\left (\frac{\left (\sqrt{5}-1\right ) x+2}{\sqrt{2 \left (\sqrt{5}-1\right )} \sqrt{x^2-1}}\right )-\sqrt{\frac{5}{2 \left (1+\sqrt{5}\right )}} \tanh ^{-1}\left (\frac{\sqrt{5} x+x-2}{\sqrt{2 \left (1+\sqrt{5}\right )} \sqrt{x^2-1}}\right )-\sqrt{\frac{2}{5}+\sqrt{5}} \tanh ^{-1}\left (\frac{2-\left (1+\sqrt{5}\right ) x}{\sqrt{2 \left (1+\sqrt{5}\right )} \sqrt{x^2-1}}\right )+\sqrt{\frac{1}{10} \left (5 \sqrt{5}-11\right )} \tan ^{-1}\left (\sqrt{\frac{2}{\sqrt{5}-1}} \sqrt{x}\right )-\sqrt{\frac{1}{10} \left (11+5 \sqrt{5}\right )} \tanh ^{-1}\left (\sqrt{\frac{2}{1+\sqrt{5}}} \sqrt{x}\right )\right ) \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.123, size = 902, normalized size = 4.1 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{x^{2} - 1}{\left (\sqrt{x^{2} - 1} + \sqrt{x}\right )}^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.29054, size = 1287, normalized size = 5.85 \begin{align*} \frac{4 \, \sqrt{5}{\left (x^{2} - x - 1\right )} \sqrt{10 \, \sqrt{5} - 22} \arctan \left (\frac{1}{2} \, \sqrt{2 \, x^{2} - \sqrt{x^{2} - 1}{\left (2 \, x + \sqrt{5} - 1\right )} + \sqrt{5} x - x} \sqrt{10 \, \sqrt{5} - 22}{\left (\sqrt{5} + 2\right )} + \frac{1}{4} \,{\left (\sqrt{5}{\left (2 \, x + 1\right )} - 2 \, \sqrt{x^{2} - 1}{\left (\sqrt{5} + 2\right )} + 4 \, x + 3\right )} \sqrt{10 \, \sqrt{5} - 22}\right ) - 4 \, \sqrt{5}{\left (x^{2} - x - 1\right )} \sqrt{10 \, \sqrt{5} - 22} \arctan \left (\frac{1}{4} \,{\left (\sqrt{2} \sqrt{2 \, x + \sqrt{5} - 1}{\left (\sqrt{5} + 2\right )} - 2 \, \sqrt{x}{\left (\sqrt{5} + 2\right )}\right )} \sqrt{10 \, \sqrt{5} - 22}\right ) - \sqrt{5}{\left (x^{2} - x - 1\right )} \sqrt{10 \, \sqrt{5} + 22} \log \left (\sqrt{10 \, \sqrt{5} + 22}{\left (\sqrt{5} - 3\right )} - 4 \, x + 2 \, \sqrt{5} + 4 \, \sqrt{x^{2} - 1} + 2\right ) + \sqrt{5}{\left (x^{2} - x - 1\right )} \sqrt{10 \, \sqrt{5} + 22} \log \left (\sqrt{10 \, \sqrt{5} + 22}{\left (\sqrt{5} - 3\right )} + 4 \, \sqrt{x}\right ) + \sqrt{5}{\left (x^{2} - x - 1\right )} \sqrt{10 \, \sqrt{5} + 22} \log \left (-\sqrt{10 \, \sqrt{5} + 22}{\left (\sqrt{5} - 3\right )} - 4 \, x + 2 \, \sqrt{5} + 4 \, \sqrt{x^{2} - 1} + 2\right ) - \sqrt{5}{\left (x^{2} - x - 1\right )} \sqrt{10 \, \sqrt{5} + 22} \log \left (-\sqrt{10 \, \sqrt{5} + 22}{\left (\sqrt{5} - 3\right )} + 4 \, \sqrt{x}\right ) - 40 \, x^{2} - 20 \, \sqrt{x^{2} - 1}{\left (2 \, x - 1\right )} + 20 \,{\left (2 \, x - 1\right )} \sqrt{x} + 40 \, x + 40}{50 \,{\left (x^{2} - x - 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{\left (x - 1\right ) \left (x + 1\right )} \left (\sqrt{x} + \sqrt{x^{2} - 1}\right )^{2}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{x^{2} - 1}{\left (\sqrt{x^{2} - 1} + \sqrt{x}\right )}^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]