Optimal. Leaf size=41 \[ \sqrt {-\frac {a-x}{a+x}} (a+x)-2 a \tanh ^{-1}\left (\sqrt {-\frac {a-x}{a+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, 212}
\begin {gather*} \sqrt {-\frac {a-x}{a+x}} (a+x)-2 a \tanh ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 294
Rule 1979
Rubi steps
\begin {align*} \int \sqrt {\frac {-a+x}{a+x}} \, dx &=(4 a) \text {Subst}\left (\int \frac {x^2}{\left (1-x^2\right )^2} \, dx,x,\sqrt {\frac {-a+x}{a+x}}\right )\\ &=\sqrt {-\frac {a-x}{a+x}} (a+x)-(2 a) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {\frac {-a+x}{a+x}}\right )\\ &=\sqrt {-\frac {a-x}{a+x}} (a+x)-2 a \tanh ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 67, normalized size = 1.63 \begin {gather*} \frac {\sqrt {\frac {-a+x}{a+x}} \left (\sqrt {-a+x} (a+x)-2 a \sqrt {a+x} \tanh ^{-1}\left (\frac {\sqrt {a+x}}{\sqrt {-a+x}}\right )\right )}{\sqrt {-a+x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 60, normalized size = 1.46
method | result | size |
default | \(\frac {\sqrt {-\frac {a -x}{a +x}}\, \left (a +x \right ) \left (\sqrt {-a^{2}+x^{2}}-a \ln \left (x +\sqrt {-a^{2}+x^{2}}\right )\right )}{\sqrt {-\left (a -x \right ) \left (a +x \right )}}\) | \(60\) |
risch | \(\frac {\left (a +x \right ) \sqrt {-\frac {a -x}{a +x}}\, \sqrt {-\left (a -x \right ) \left (a +x \right )}}{\sqrt {\left (-a +x \right ) \left (a +x \right )}}+\frac {a \ln \left (x +\sqrt {-a^{2}+x^{2}}\right ) \sqrt {-\frac {a -x}{a +x}}\, \sqrt {-\left (a -x \right ) \left (a +x \right )}}{a -x}\) | \(92\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 70, normalized size = 1.71 \begin {gather*} a {\left (\frac {2 \, \sqrt {-\frac {a - x}{a + x}}}{\frac {a - x}{a + x} + 1} - \log \left (\sqrt {-\frac {a - x}{a + x}} + 1\right ) + \log \left (\sqrt {-\frac {a - x}{a + x}} - 1\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 58, normalized size = 1.41 \begin {gather*} -a \log \left (\sqrt {-\frac {a - x}{a + x}} + 1\right ) + a \log \left (\sqrt {-\frac {a - x}{a + x}} - 1\right ) + {\left (a + x\right )} \sqrt {-\frac {a - x}{a + 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 \sqrt {\frac {- a + x}{a + x}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 6.90, size = 40, normalized size = 0.98 \begin {gather*} a \log \left ({\left | -x + \sqrt {-a^{2} + x^{2}} \right |}\right ) \mathrm {sgn}\left (a + x\right ) + \sqrt {-a^{2} + x^{2}} \mathrm {sgn}\left (a + x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.05, size = 51, normalized size = 1.24 \begin {gather*} \frac {2\,a\,\sqrt {-\frac {a-x}{a+x}}}{\frac {a-x}{a+x}+1}-2\,a\,\mathrm {atanh}\left (\sqrt {-\frac {a-x}{a+x}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________