Optimal. Leaf size=40 \[ x \tan ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right )-a \tanh ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {5311, 12, 1983,
214} \begin {gather*} x \text {ArcTan}\left (\sqrt {-\frac {a-x}{a+x}}\right )-a \tanh ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 214
Rule 1983
Rule 5311
Rubi steps
\begin {align*} \int \tan ^{-1}\left (\sqrt {\frac {-a+x}{a+x}}\right ) \, dx &=x \tan ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right )-\int \frac {a}{2 \sqrt {\frac {-a+x}{a+x}} (a+x)} \, dx\\ &=x \tan ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right )-\frac {1}{2} a \int \frac {1}{\sqrt {\frac {-a+x}{a+x}} (a+x)} \, dx\\ &=x \tan ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right )-\left (2 a^2\right ) \text {Subst}\left (\int \frac {1}{2 a-2 a x^2} \, dx,x,\sqrt {\frac {-a+x}{a+x}}\right )\\ &=x \tan ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right )-a \tanh ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 71, normalized size = 1.78 \begin {gather*} x \tan ^{-1}\left (\sqrt {\frac {-a+x}{a+x}}\right )-\frac {a \sqrt {-a+x} \tanh ^{-1}\left (\frac {\sqrt {-a+x}}{\sqrt {a+x}}\right )}{\sqrt {\frac {-a+x}{a+x}} \sqrt {a+x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, size = 66, normalized size = 1.65
method | result | size |
default | \(x \arctan \left (\sqrt {\frac {-a +x}{a +x}}\right )+\frac {\left (a -x \right ) a \ln \left (x +\sqrt {-a^{2}+x^{2}}\right )}{2 \sqrt {-\frac {a -x}{a +x}}\, \sqrt {-\left (a -x \right ) \left (a +x \right )}}\) | \(66\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 89 vs.
\(2 (36) = 72\).
time = 1.82, size = 89, normalized size = 2.22 \begin {gather*} \frac {1}{2} \, a {\left (\frac {4 \, \arctan \left (\sqrt {-\frac {a - x}{a + x}}\right )}{\frac {a - x}{a + x} + 1} - 2 \, \arctan \left (\sqrt {-\frac {a - x}{a + x}}\right ) - \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.75, size = 58, normalized size = 1.45 \begin {gather*} x \arctan \left (\sqrt {-\frac {a - x}{a + x}}\right ) - \frac {1}{2} \, a \log \left (\sqrt {-\frac {a - x}{a + x}} + 1\right ) + \frac {1}{2} \, a \log \left (\sqrt {-\frac {a - x}{a + 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 \operatorname {atan}{\left (\sqrt {\frac {- a + x}{a + x}} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.17, size = 49, normalized size = 1.22 \begin {gather*} \frac {1}{2} \, a \log \left ({\left | -x + \sqrt {-a^{2} + x^{2}} \right |}\right ) \mathrm {sgn}\left (a + x\right ) + x \arctan \left (\frac {\sqrt {-a^{2} + x^{2}} \mathrm {sgn}\left (a + x\right )}{a + x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.36, size = 36, normalized size = 0.90 \begin {gather*} x\,\mathrm {atan}\left (\sqrt {-\frac {a-x}{a+x}}\right )-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]
________________________________________________________________________________________