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.0425593, antiderivative size = 40, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {5203, 12, 1961, 208} \[ x \tan ^{-1}\left (\sqrt{-\frac{a-x}{a+x}}\right )-a \tanh ^{-1}\left (\sqrt{-\frac{a-x}{a+x}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5203
Rule 12
Rule 1961
Rule 208
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 ) \operatorname{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.0488343, size = 71, normalized size = 1.78 \[ x \tan ^{-1}\left (\sqrt{\frac{x-a}{a+x}}\right )-\frac{a \sqrt{x-a} \tanh ^{-1}\left (\frac{\sqrt{x-a}}{\sqrt{a+x}}\right )}{\sqrt{\frac{x-a}{a+x}} \sqrt{a+x}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.013, size = 64, normalized size = 1.6 \begin{align*} x\arctan \left ( \sqrt{{\frac{-a+x}{a+x}}} \right ) -{\frac{ \left ( -a+x \right ) a}{2}\ln \left ( x+\sqrt{-{a}^{2}+{x}^{2}} \right ){\frac{1}{\sqrt{{\frac{-a+x}{a+x}}}}}{\frac{1}{\sqrt{ \left ( a+x \right ) \left ( -a+x \right ) }}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.41736, size = 120, normalized size = 3. \begin{align*} \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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.88018, size = 154, normalized size = 3.85 \begin{align*} 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{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 \operatorname{atan}{\left (\sqrt{\frac{- a + x}{a + x}} \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.11585, size = 66, normalized size = 1.65 \begin{align*} \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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]