Optimal. Leaf size=38 \[ \sqrt{\frac{1-x}{x+1}} (x+1)-2 \tan ^{-1}\left (\sqrt{\frac{1-x}{x+1}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0136912, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {1959, 288, 204} \[ \sqrt{\frac{1-x}{x+1}} (x+1)-2 \tan ^{-1}\left (\sqrt{\frac{1-x}{x+1}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1959
Rule 288
Rule 204
Rubi steps
\begin{align*} \int \sqrt{\frac{1-x}{1+x}} \, dx &=-\left (4 \operatorname{Subst}\left (\int \frac{x^2}{\left (-1-x^2\right )^2} \, dx,x,\sqrt{\frac{1-x}{1+x}}\right )\right )\\ &=\sqrt{\frac{1-x}{1+x}} (1+x)+2 \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,\sqrt{\frac{1-x}{1+x}}\right )\\ &=\sqrt{\frac{1-x}{1+x}} (1+x)-2 \tan ^{-1}\left (\sqrt{\frac{1-x}{1+x}}\right )\\ \end{align*}
Mathematica [A] time = 0.0216509, size = 67, normalized size = 1.76 \[ \frac{\sqrt{\frac{1-x}{x+1}} \sqrt{x+1} \left (\sqrt{x+1} (x-1)+2 \sqrt{1-x} \sin ^{-1}\left (\frac{\sqrt{1-x}}{\sqrt{2}}\right )\right )}{x-1} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.004, size = 39, normalized size = 1. \begin{align*}{(1+x)\sqrt{-{\frac{x-1}{1+x}}} \left ( \sqrt{-{x}^{2}+1}+\arcsin \left ( x \right ) \right ){\frac{1}{\sqrt{- \left ( x-1 \right ) \left ( 1+x \right ) }}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.49234, size = 58, normalized size = 1.53 \begin{align*} -\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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.77437, size = 90, normalized size = 2.37 \begin{align*}{\left (x + 1\right )} \sqrt{-\frac{x - 1}{x + 1}} - 2 \, \arctan \left (\sqrt{-\frac{x - 1}{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 \sqrt{\frac{1 - x}{x + 1}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.12657, size = 39, normalized size = 1.03 \begin{align*} \frac{1}{2} \, \pi \mathrm{sgn}\left (x + 1\right ) + \arcsin \left (x\right ) \mathrm{sgn}\left (x + 1\right ) + \sqrt{-x^{2} + 1} \mathrm{sgn}\left (x + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]