Optimal. Leaf size=41 \[ -\left ((1-x) \sqrt {\frac {1+x}{1-x}}\right )+2 \tan ^{-1}\left (\sqrt {\frac {1+x}{1-x}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {1979, 294, 209}
\begin {gather*} 2 \tan ^{-1}\left (\sqrt {\frac {x+1}{1-x}}\right )-(1-x) \sqrt {\frac {x+1}{1-x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 294
Rule 1979
Rubi steps
\begin {align*} \int \sqrt {\frac {1+x}{1-x}} \, dx &=4 \text {Subst}\left (\int \frac {x^2}{\left (1+x^2\right )^2} \, dx,x,\sqrt {\frac {1+x}{1-x}}\right )\\ &=-(1-x) \sqrt {\frac {1+x}{1-x}}+2 \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {\frac {1+x}{1-x}}\right )\\ &=-(1-x) \sqrt {\frac {1+x}{1-x}}+2 \tan ^{-1}\left (\sqrt {\frac {1+x}{1-x}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 64, normalized size = 1.56 \begin {gather*} \frac {\sqrt {\frac {1+x}{1-x}} \left ((-1+x) \sqrt {1+x}+2 \sqrt {1-x} \tan ^{-1}\left (\frac {\sqrt {1+x}}{\sqrt {1-x}}\right )\right )}{\sqrt {1+x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {cought exception: maximum recursion depth exceeded while calling a Python object} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 41, normalized size = 1.00
method | result | size |
default | \(\frac {\sqrt {-\frac {1+x}{-1+x}}\, \left (-1+x \right ) \left (\sqrt {-x^{2}+1}-\arcsin \left (x \right )\right )}{\sqrt {-\left (1+x \right ) \left (-1+x \right )}}\) | \(41\) |
risch | \(\left (-1+x \right ) \sqrt {-\frac {1+x}{-1+x}}+\frac {\arcsin \left (x \right ) \sqrt {-\frac {1+x}{-1+x}}\, \sqrt {-\left (1+x \right ) \left (-1+x \right )}}{1+x}\) | \(48\) |
trager | \(\left (-1+x \right ) \sqrt {-\frac {1+x}{-1+x}}+\RootOf \left (\textit {\_Z}^{2}+1\right ) \ln \left (-\RootOf \left (\textit {\_Z}^{2}+1\right ) \sqrt {-\frac {1+x}{-1+x}}\, x +\RootOf \left (\textit {\_Z}^{2}+1\right ) \sqrt {-\frac {1+x}{-1+x}}+x \right )\) | \(68\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.34, size = 43, normalized size = 1.05 \begin {gather*} \frac {2 \, \sqrt {-\frac {x + 1}{x - 1}}}{\frac {x + 1}{x - 1} - 1} + 2 \, \arctan \left (\sqrt {-\frac {x + 1}{x - 1}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 32, normalized size = 0.78 \begin {gather*} {\left (x - 1\right )} \sqrt {-\frac {x + 1}{x - 1}} + 2 \, \arctan \left (\sqrt {-\frac {x + 1}{x - 1}}\right ) \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 \sqrt {\frac {x + 1}{1 - x}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 32, normalized size = 0.78 \begin {gather*} \sqrt {-x^{2}+1} \mathrm {sign}\left (x-1\right )-\mathrm {sign}\left (x-1\right ) \arcsin x+\frac {1}{2} \pi \mathrm {sign}\left (x-1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.05, size = 43, normalized size = 1.05 \begin {gather*} 2\,\mathrm {atan}\left (\sqrt {-\frac {x+1}{x-1}}\right )+\frac {2\,\sqrt {-\frac {x+1}{x-1}}}{\frac {x+1}{x-1}-1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________