3.7.95 \(\int \sin ^{-1}(\sqrt {\frac {-a+x}{a+x}}) \, dx\) [695]

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]

(a+x)*arcsin(((-a+x)/(a+x))^(1/2))-a*2^(1/2)*((-a+x)/(a+x))^(1/2)/(a/(a+x))^(1/2)

________________________________________________________________________________________

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]

Int[ArcSin[Sqrt[(-a + x)/(a + x)]],x]

[Out]

-(Sqrt[2]*a*Sqrt[a/(a + x)]*Sqrt[-((a - x)/(a + x))]*Sqrt[(a + x)/a]*Sqrt[1 + x/a]) + x*ArcSin[Sqrt[-((a - x)/
(a + x))]] + (a^2*Sqrt[(a + x)/a]*Sqrt[1 + x/a]*ArcSin[Sqrt[-((a - x)/(a + x))]])/(a + x)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 393

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(-(b*c - a*d))*x*((a + b*x^n)^(p
 + 1)/(a*b*n*(p + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x]
 /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 1972

Int[(u_.)*((c_.)*((a_.) + (b_.)*(x_)^(n_.))^(q_))^(p_), x_Symbol] :> Dist[Simp[(c*(a + b*x^n)^q)^p/(a + b*x^n)
^(p*q)], Int[u*(a + b*x^n)^(p*q), x], x] /; FreeQ[{a, b, c, n, p, q}, x] && GeQ[a, 0]

Rule 1973

Int[(u_.)*((c_.)*((a_) + (b_.)*(x_)^(n_.))^(q_))^(p_), x_Symbol] :> Dist[Simp[(c*(a + b*x^n)^q)^p/(1 + b*(x^n/
a))^(p*q)], Int[u*(1 + b*(x^n/a))^(p*q), x], x] /; FreeQ[{a, b, c, n, p, q}, x] &&  !GeQ[a, 0]

Rule 4924

Int[ArcSin[u_], x_Symbol] :> Simp[x*ArcSin[u], x] - Int[SimplifyIntegrand[x*(D[u, x]/Sqrt[1 - u^2]), x], x] /;
 InverseFunctionFreeQ[u, x] &&  !FunctionOfExponentialQ[u, x]

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]

Integrate[ArcSin[Sqrt[(-a + x)/(a + x)]],x]

[Out]

x*ArcSin[Sqrt[(-a + x)/(a + x)]] + (Sqrt[a/(a + x)]*(2*a - 2*x + Sqrt[2]*Sqrt[a]*Sqrt[-a + x]*ArcTan[Sqrt[-a +
 x]/(Sqrt[2]*Sqrt[a])]))/(Sqrt[2]*Sqrt[(-a + x)/(a + x)])

________________________________________________________________________________________

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]

int(arcsin(((-a+x)/(a+x))^(1/2)),x,method=_RETURNVERBOSE)

[Out]

x*arcsin(((-a+x)/(a+x))^(1/2))+1/2/(-(a-x)/(a+x))^(1/2)*(-a+x)^(1/2)*2^(1/2)*(a/(a+x))^(1/2)*(-2*(-a+x)^(1/2)+
a^(1/2)*2^(1/2)*arctan(1/2*(-a+x)^(1/2)*2^(1/2)/a^(1/2)))

________________________________________________________________________________________

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]

integrate(arcsin(((-a+x)/(a+x))^(1/2)),x, algorithm="maxima")

[Out]

a*(2*arcsin(sqrt(-(a - x)/(a + x)))/((a - x)/(a + x) + 1) + sqrt((a - x)/(a + x) + 1)/(sqrt(-(a - x)/(a + x))
+ 1) + sqrt((a - x)/(a + x) + 1)/(sqrt(-(a - x)/(a + x)) - 1))

________________________________________________________________________________________

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]

integrate(arcsin(((-a+x)/(a+x))^(1/2)),x, algorithm="fricas")

[Out]

-sqrt(2)*(a + x)*sqrt(-(a - x)/(a + x))*sqrt(a/(a + x)) + (a + x)*arcsin(sqrt(-(a - x)/(a + x)))

________________________________________________________________________________________

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]

integrate(asin(((-a+x)/(a+x))**(1/2)),x)

[Out]

Integral(asin(sqrt((-a + x)/(a + x))), x)

________________________________________________________________________________________

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]

integrate(arcsin(((-a+x)/(a+x))^(1/2)),x, algorithm="giac")

[Out]

integrate(arcsin(sqrt(-(a - x)/(a + x))), x)

________________________________________________________________________________________

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]

int(asin((-(a - x)/(a + x))^(1/2)),x)

[Out]

int(asin((-(a - x)/(a + x))^(1/2)), x)

________________________________________________________________________________________