Optimal. Leaf size=33 \[ \frac {x^2}{2}-\frac {1}{2} \sqrt {x-1} \sqrt {x+1} x+\frac {1}{2} \cosh ^{-1}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 4, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {2104, 6742, 38, 52} \[ \frac {x^2}{2}-\frac {1}{2} \sqrt {x-1} \sqrt {x+1} x+\frac {1}{2} \cosh ^{-1}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 38
Rule 52
Rule 2104
Rule 6742
Rubi steps
\begin {align*} \int \frac {-\sqrt {-1+x}+\sqrt {1+x}}{\sqrt {-1+x}+\sqrt {1+x}} \, dx &=-\left (\frac {1}{2} \int \sqrt {-1+x} \left (-\sqrt {-1+x}+\sqrt {1+x}\right ) \, dx\right )+\frac {1}{2} \int \sqrt {1+x} \left (-\sqrt {-1+x}+\sqrt {1+x}\right ) \, dx\\ &=\frac {1}{2} \int \left (1+x-\sqrt {-1+x} \sqrt {1+x}\right ) \, dx-\frac {1}{2} \int \left (1-x+\sqrt {-1+x} \sqrt {1+x}\right ) \, dx\\ &=\frac {x^2}{2}-2 \left (\frac {1}{2} \int \sqrt {-1+x} \sqrt {1+x} \, dx\right )\\ &=\frac {x^2}{2}-2 \left (\frac {1}{4} \sqrt {-1+x} x \sqrt {1+x}-\frac {1}{4} \int \frac {1}{\sqrt {-1+x} \sqrt {1+x}} \, dx\right )\\ &=\frac {x^2}{2}-2 \left (\frac {1}{4} \sqrt {-1+x} x \sqrt {1+x}-\frac {1}{4} \cosh ^{-1}(x)\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.16, size = 58, normalized size = 1.76 \[ \frac {1}{2} \left (x^2-\sqrt {x-1} \sqrt {x+1} x+\frac {2 (x-1) \sin ^{-1}\left (\frac {\sqrt {1-x}}{\sqrt {2}}\right )}{\sqrt {-(x-1)^2}}+1\right ) \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 37, normalized size = 1.12 \[ -\frac {1}{2} \, \sqrt {x + 1} \sqrt {x - 1} x + \frac {1}{2} \, x^{2} - \frac {1}{2} \, \log \left (\sqrt {x + 1} \sqrt {x - 1} - x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.38, size = 41, normalized size = 1.24 \[ \frac {1}{2} \, {\left (x + 1\right )}^{2} - \frac {1}{2} \, \sqrt {x + 1} \sqrt {x - 1} x - x - \log \left (\sqrt {x + 1} - \sqrt {x - 1}\right ) - 1 \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.01, size = 62, normalized size = 1.88 \[ \frac {x^{2}}{2}+\frac {\sqrt {\left (x -1\right ) \left (x +1\right )}\, \ln \left (x +\sqrt {x^{2}-1}\right )}{2 \sqrt {x +1}\, \sqrt {x -1}}-\frac {\sqrt {x -1}\, \left (x +1\right )^{\frac {3}{2}}}{2}+\frac {\sqrt {x -1}\, \sqrt {x +1}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {x + 1} - \sqrt {x - 1}}{\sqrt {x + 1} + \sqrt {x - 1}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 10.85, size = 200, normalized size = 6.06 \[ \mathrm {acosh}\relax (x)-2\,\mathrm {atanh}\left (\frac {\sqrt {x-1}-\mathrm {i}}{\sqrt {x+1}-1}\right )+\frac {\frac {14\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^3}{{\left (\sqrt {x+1}-1\right )}^3}+\frac {14\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^5}{{\left (\sqrt {x+1}-1\right )}^5}+\frac {2\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^7}{{\left (\sqrt {x+1}-1\right )}^7}+\frac {2\,\left (\sqrt {x-1}-\mathrm {i}\right )}{\sqrt {x+1}-1}}{1+\frac {6\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^4}{{\left (\sqrt {x+1}-1\right )}^4}-\frac {4\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^6}{{\left (\sqrt {x+1}-1\right )}^6}+\frac {{\left (\sqrt {x-1}-\mathrm {i}\right )}^8}{{\left (\sqrt {x+1}-1\right )}^8}-\frac {4\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {x+1}-1\right )}^2}}+\frac {x^2}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 31.39, size = 226, normalized size = 6.85 \[ - \frac {\left (x - 1\right )^{\frac {5}{2}}}{4 \sqrt {x + 1}} - \frac {3 \left (x - 1\right )^{\frac {3}{2}}}{4 \sqrt {x + 1}} - \frac {\sqrt {x - 1}}{2 \sqrt {x + 1}} + \frac {\left (x - 1\right )^{2}}{4} + 2 \left (\begin {cases} \frac {\left (x + 1\right )^{2}}{8} + \frac {\operatorname {acosh}{\left (\frac {\sqrt {2} \sqrt {x + 1}}{2} \right )}}{4} - \frac {\left (x + 1\right )^{\frac {5}{2}}}{8 \sqrt {x - 1}} + \frac {3 \left (x + 1\right )^{\frac {3}{2}}}{8 \sqrt {x - 1}} - \frac {\sqrt {x + 1}}{4 \sqrt {x - 1}} & \text {for}\: \frac {\left |{x + 1}\right |}{2} > 1 \\\frac {\left (x + 1\right )^{2}}{8} - \frac {i \operatorname {asin}{\left (\frac {\sqrt {2} \sqrt {x + 1}}{2} \right )}}{4} + \frac {i \left (x + 1\right )^{\frac {5}{2}}}{8 \sqrt {1 - x}} - \frac {3 i \left (x + 1\right )^{\frac {3}{2}}}{8 \sqrt {1 - x}} + \frac {i \sqrt {x + 1}}{4 \sqrt {1 - x}} & \text {otherwise} \end {cases}\right ) + \frac {\operatorname {asinh}{\left (\frac {\sqrt {2} \sqrt {x - 1}}{2} \right )}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________