Optimal. Leaf size=42 \[ 2 a \tan ^{-1}\left (\sqrt{\frac{a+x}{a-x}}\right )-(a-x) \sqrt{\frac{a+x}{a-x}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0161238, antiderivative size = 42, 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, 203} \[ 2 a \tan ^{-1}\left (\sqrt{\frac{a+x}{a-x}}\right )-(a-x) \sqrt{\frac{a+x}{a-x}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1959
Rule 288
Rule 203
Rubi steps
\begin{align*} \int \sqrt{\frac{a+x}{a-x}} \, dx &=(4 a) \operatorname{Subst}\left (\int \frac{x^2}{\left (1+x^2\right )^2} \, dx,x,\sqrt{\frac{a+x}{a-x}}\right )\\ &=-(a-x) \sqrt{\frac{a+x}{a-x}}+(2 a) \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\sqrt{\frac{a+x}{a-x}}\right )\\ &=-(a-x) \sqrt{\frac{a+x}{a-x}}+2 a \tan ^{-1}\left (\sqrt{\frac{a+x}{a-x}}\right )\\ \end{align*}
Mathematica [A] time = 0.0423336, size = 78, normalized size = 1.86 \[ \frac{\sqrt{\frac{a+x}{a-x}} \left (-2 a^{3/2} \sqrt{a-x} \sqrt{\frac{a+x}{a}} \sin ^{-1}\left (\frac{\sqrt{a-x}}{\sqrt{2} \sqrt{a}}\right )-a^2+x^2\right )}{a+x} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.014, size = 64, normalized size = 1.5 \begin{align*} -{(-a+x)\sqrt{-{\frac{a+x}{-a+x}}} \left ( a\arctan \left ({x{\frac{1}{\sqrt{{a}^{2}-{x}^{2}}}}} \right ) -\sqrt{{a}^{2}-{x}^{2}} \right ){\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 [A] time = 1.46206, size = 66, normalized size = 1.57 \begin{align*} -2 \, a{\left (\frac{\sqrt{\frac{a + x}{a - x}}}{\frac{a + x}{a - x} + 1} - \arctan \left (\sqrt{\frac{a + x}{a - x}}\right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.65947, size = 90, normalized size = 2.14 \begin{align*} 2 \, a \arctan \left (\sqrt{\frac{a + x}{a - x}}\right ) -{\left (a - x\right )} \sqrt{\frac{a + x}{a - x}} \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{a + x}{a - x}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.14373, size = 49, normalized size = 1.17 \begin{align*} a \arcsin \left (\frac{x}{a}\right ) \mathrm{sgn}\left (a - x\right ) \mathrm{sgn}\left (a\right ) - \sqrt{a^{2} - x^{2}} \mathrm{sgn}\left (a - x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]