Optimal. Leaf size=55 \[ -\frac {\sqrt {2} a \sqrt {\frac {-a+x}{a+x}}}{\sqrt {\frac {a}{a+x}}}+(a+x) \sin ^{-1}\left (\sqrt {\frac {-a+x}{a+x}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(125\) vs. \(2(55)=110\).
time = 0.44, antiderivative size = 125, normalized size of antiderivative = 2.27, number of steps
used = 8, number of rules used = 7, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {4924, 12, 1973,
1972, 21, 393, 222} \begin {gather*} \frac {a^2 \sqrt {\frac {a+x}{a}} \sqrt {\frac {x}{a}+1} \text {ArcSin}\left (\sqrt {-\frac {a-x}{a+x}}\right )}{a+x}+x \text {ArcSin}\left (\sqrt {-\frac {a-x}{a+x}}\right )-\sqrt {2} a \sqrt {\frac {a}{a+x}} \sqrt {-\frac {a-x}{a+x}} \sqrt {\frac {a+x}{a}} \sqrt {\frac {x}{a}+1} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 21
Rule 222
Rule 393
Rule 1972
Rule 1973
Rule 4924
Rubi steps
\begin {align*} \int \sin ^{-1}\left (\sqrt {\frac {-a+x}{a+x}}\right ) \, dx &=x \sin ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right )-\int \frac {x \left (\frac {a}{a+x}\right )^{3/2}}{\sqrt {2} a \sqrt {\frac {-a+x}{a+x}}} \, dx\\ &=x \sin ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right )-\frac {\int \frac {x \left (\frac {a}{a+x}\right )^{3/2}}{\sqrt {\frac {-a+x}{a+x}}} \, dx}{\sqrt {2} a}\\ &=x \sin ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right )-\frac {\left (\sqrt {\frac {a}{a+x}} \sqrt {a+x}\right ) \int \frac {x}{\sqrt {\frac {-a+x}{a+x}} (a+x)^{3/2}} \, dx}{\sqrt {2}}\\ &=x \sin ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right )-\left (a \sqrt {\frac {a}{a+x}} \sqrt {a+x}\right ) \text {Subst}\left (\int \frac {1+x^2}{\sqrt {-\frac {a}{-1+x^2}} \left (-1+x^2\right )^2} \, dx,x,\sqrt {\frac {-a+x}{a+x}}\right )\\ &=x \sin ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right )-\frac {\left (a \sqrt {\frac {a}{a+x}}\right ) \text {Subst}\left (\int \frac {1+x^2}{\left (-1+x^2\right )^{3/2}} \, dx,x,\sqrt {\frac {-a+x}{a+x}}\right )}{\sqrt {-\frac {a}{a+x}}}\\ &=-\sqrt {2} \sqrt {\frac {a}{a+x}} \sqrt {-\frac {a-x}{a+x}} (a+x)+x \sin ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right )-\frac {\left (a \sqrt {\frac {a}{a+x}}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {-1+x^2}} \, dx,x,\sqrt {\frac {-a+x}{a+x}}\right )}{\sqrt {-\frac {a}{a+x}}}\\ &=-\sqrt {2} \sqrt {\frac {a}{a+x}} \sqrt {-\frac {a-x}{a+x}} (a+x)+x \sin ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right )-\frac {\left (a \sqrt {\frac {a}{a+x}}\right ) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {\sqrt {\frac {-a+x}{a+x}}}{\sqrt {2} \sqrt {-\frac {a}{a+x}}}\right )}{\sqrt {-\frac {a}{a+x}}}\\ &=-\sqrt {2} \sqrt {\frac {a}{a+x}} \sqrt {-\frac {a-x}{a+x}} (a+x)+x \sin ^{-1}\left (\sqrt {-\frac {a-x}{a+x}}\right )-\frac {a \sqrt {\frac {a}{a+x}} \tanh ^{-1}\left (\frac {\sqrt {-\frac {a-x}{a+x}}}{\sqrt {2} \sqrt {-\frac {a}{a+x}}}\right )}{\sqrt {-\frac {a}{a+x}}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 99, normalized size = 1.80 \begin {gather*} x \sin ^{-1}\left (\sqrt {\frac {-a+x}{a+x}}\right )+\frac {\sqrt {\frac {a}{a+x}} \left (2 a-2 x+\sqrt {2} \sqrt {a} \sqrt {-a+x} \tan ^{-1}\left (\frac {\sqrt {-a+x}}{\sqrt {2} \sqrt {a}}\right )\right )}{\sqrt {2} \sqrt {\frac {-a+x}{a+x}}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.03, size = 86, normalized size = 1.56
method | result | size |
default | \(x \arcsin \left (\sqrt {\frac {-a +x}{a +x}}\right )+\frac {\sqrt {-a +x}\, \sqrt {2}\, \sqrt {\frac {a}{a +x}}\, \left (-2 \sqrt {-a +x}+\sqrt {a}\, \sqrt {2}\, \arctan \left (\frac {\sqrt {-a +x}\, \sqrt {2}}{2 \sqrt {a}}\right )\right )}{2 \sqrt {-\frac {a -x}{a +x}}}\) | \(86\) |
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. 103 vs.
\(2 (49) = 98\).
time = 1.67, size = 103, normalized size = 1.87 \begin {gather*} a {\left (\frac {2 \, \arcsin \left (\sqrt {-\frac {a - x}{a + x}}\right )}{\frac {a - x}{a + x} + 1} + \frac {\sqrt {\frac {a - x}{a + x} + 1}}{\sqrt {-\frac {a - x}{a + x}} + 1} + \frac {\sqrt {\frac {a - x}{a + x} + 1}}{\sqrt {-\frac {a - x}{a + x}} - 1}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.72, size = 51, normalized size = 0.93 \begin {gather*} -\sqrt {2} {\left (a + x\right )} \sqrt {-\frac {a - x}{a + x}} \sqrt {\frac {a}{a + x}} + {\left (a + x\right )} \arcsin \left (\sqrt {-\frac {a - x}{a + x}}\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 {asin}{\left (\sqrt {\frac {- a + x}{a + x}} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \mathrm {asin}\left (\sqrt {-\frac {a-x}{a+x}}\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________