3.318 \(\int \frac {1}{\sqrt {\csc (x)-\sin (x)}} \, dx\)

Optimal. Leaf size=60 \[ \frac {\cos (x) \tan ^{-1}\left (\sqrt {-\sin (x)}\right )}{\sqrt {-\sin (x)} \sqrt {\cos (x) \cot (x)}}-\frac {\cos (x) \tanh ^{-1}\left (\sqrt {-\sin (x)}\right )}{\sqrt {-\sin (x)} \sqrt {\cos (x) \cot (x)}} \]

[Out]

arctan((-sin(x))^(1/2))*cos(x)/(cos(x)*cot(x))^(1/2)/(-sin(x))^(1/2)-arctanh((-sin(x))^(1/2))*cos(x)/(cos(x)*c
ot(x))^(1/2)/(-sin(x))^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.727, Rules used = {4397, 4400, 2601, 2564, 329, 298, 203, 206} \[ \frac {\cos (x) \tan ^{-1}\left (\sqrt {-\sin (x)}\right )}{\sqrt {-\sin (x)} \sqrt {\cos (x) \cot (x)}}-\frac {\cos (x) \tanh ^{-1}\left (\sqrt {-\sin (x)}\right )}{\sqrt {-\sin (x)} \sqrt {\cos (x) \cot (x)}} \]

Antiderivative was successfully verified.

[In]

Int[1/Sqrt[Csc[x] - Sin[x]],x]

[Out]

(ArcTan[Sqrt[-Sin[x]]]*Cos[x])/(Sqrt[Cos[x]*Cot[x]]*Sqrt[-Sin[x]]) - (ArcTanh[Sqrt[-Sin[x]]]*Cos[x])/(Sqrt[Cos
[x]*Cot[x]]*Sqrt[-Sin[x]])

Rule 203

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

Rule 206

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

Rule 298

Int[(x_)^2/((a_) + (b_.)*(x_)^4), x_Symbol] :> With[{r = Numerator[Rt[-(a/b), 2]], s = Denominator[Rt[-(a/b),
2]]}, Dist[s/(2*b), Int[1/(r + s*x^2), x], x] - Dist[s/(2*b), Int[1/(r - s*x^2), x], x]] /; FreeQ[{a, b}, x] &
&  !GtQ[a/b, 0]

Rule 329

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = Denominator[m]}, Dist[k/c, Subst[I
nt[x^(k*(m + 1) - 1)*(a + (b*x^(k*n))/c^n)^p, x], x, (c*x)^(1/k)], x]] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0]
 && FractionQ[m] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 2564

Int[cos[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(a*f), Subst[Int[
x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Sin[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2] &&
 !(IntegerQ[(m - 1)/2] && LtQ[0, m, n])

Rule 2601

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[(Cos[e + f*x
]^n*(b*Tan[e + f*x])^n)/(a*Sin[e + f*x])^n, Int[(a*Sin[e + f*x])^(m + n)/Cos[e + f*x]^n, x], x] /; FreeQ[{a, b
, e, f, m, n}, x] &&  !IntegerQ[n] && (ILtQ[m, 0] || (EqQ[m, 1] && EqQ[n, -2^(-1)]) || IntegersQ[m - 1/2, n -
1/2])

Rule 4397

Int[u_, x_Symbol] :> Int[TrigSimplify[u], x] /; TrigSimplifyQ[u]

Rule 4400

Int[(u_.)*((v_)^(m_.)*(w_)^(n_.))^(p_), x_Symbol] :> With[{uu = ActivateTrig[u], vv = ActivateTrig[v], ww = Ac
tivateTrig[w]}, Dist[(vv^m*ww^n)^FracPart[p]/(vv^(m*FracPart[p])*ww^(n*FracPart[p])), Int[uu*vv^(m*p)*ww^(n*p)
, x], x]] /; FreeQ[{m, n, p}, x] &&  !IntegerQ[p] && ( !InertTrigFreeQ[v] ||  !InertTrigFreeQ[w])

Rubi steps

\begin {align*} \int \frac {1}{\sqrt {\csc (x)-\sin (x)}} \, dx &=\int \frac {1}{\sqrt {\cos (x) \cot (x)}} \, dx\\ &=\frac {\left (\sqrt {\cos (x)} \sqrt {\cot (x)}\right ) \int \frac {1}{\sqrt {\cos (x)} \sqrt {\cot (x)}} \, dx}{\sqrt {\cos (x) \cot (x)}}\\ &=\frac {\cos (x) \int \sec (x) \sqrt {-\sin (x)} \, dx}{\sqrt {\cos (x) \cot (x)} \sqrt {-\sin (x)}}\\ &=-\frac {\cos (x) \operatorname {Subst}\left (\int \frac {\sqrt {x}}{1-x^2} \, dx,x,-\sin (x)\right )}{\sqrt {\cos (x) \cot (x)} \sqrt {-\sin (x)}}\\ &=-\frac {(2 \cos (x)) \operatorname {Subst}\left (\int \frac {x^2}{1-x^4} \, dx,x,\sqrt {-\sin (x)}\right )}{\sqrt {\cos (x) \cot (x)} \sqrt {-\sin (x)}}\\ &=-\frac {\cos (x) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {-\sin (x)}\right )}{\sqrt {\cos (x) \cot (x)} \sqrt {-\sin (x)}}+\frac {\cos (x) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {-\sin (x)}\right )}{\sqrt {\cos (x) \cot (x)} \sqrt {-\sin (x)}}\\ &=\frac {\tan ^{-1}\left (\sqrt {-\sin (x)}\right ) \cos (x)}{\sqrt {\cos (x) \cot (x)} \sqrt {-\sin (x)}}-\frac {\tanh ^{-1}\left (\sqrt {-\sin (x)}\right ) \cos (x)}{\sqrt {\cos (x) \cot (x)} \sqrt {-\sin (x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.27, size = 44, normalized size = 0.73 \[ -\frac {\sin (x) \tan (x) \sqrt {\cos (x) \cot (x)} \left (\tan ^{-1}\left (\sqrt [4]{\sin ^2(x)}\right )-\tanh ^{-1}\left (\sqrt [4]{\sin ^2(x)}\right )\right )}{\sin ^2(x)^{3/4}} \]

Antiderivative was successfully verified.

[In]

Integrate[1/Sqrt[Csc[x] - Sin[x]],x]

[Out]

-(((ArcTan[(Sin[x]^2)^(1/4)] - ArcTanh[(Sin[x]^2)^(1/4)])*Sqrt[Cos[x]*Cot[x]]*Sin[x]*Tan[x])/(Sin[x]^2)^(3/4))

________________________________________________________________________________________

fricas [B]  time = 1.06, size = 124, normalized size = 2.07 \[ \frac {1}{2} \, \arctan \left (\frac {2 \, \sqrt {\frac {\cos \relax (x)^{2}}{\sin \relax (x)}} \sin \relax (x)}{\cos \relax (x) \sin \relax (x) - \cos \relax (x)}\right ) + \frac {1}{4} \, \log \left (\frac {\cos \relax (x)^{3} - 5 \, \cos \relax (x)^{2} - {\left (\cos \relax (x)^{2} + 6 \, \cos \relax (x) + 4\right )} \sin \relax (x) + 4 \, {\left (\cos \relax (x)^{2} - {\left (\cos \relax (x) + 1\right )} \sin \relax (x) - 1\right )} \sqrt {\frac {\cos \relax (x)^{2}}{\sin \relax (x)}} - 2 \, \cos \relax (x) + 4}{\cos \relax (x)^{3} + 3 \, \cos \relax (x)^{2} - {\left (\cos \relax (x)^{2} - 2 \, \cos \relax (x) - 4\right )} \sin \relax (x) - 2 \, \cos \relax (x) - 4}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(csc(x)-sin(x))^(1/2),x, algorithm="fricas")

[Out]

1/2*arctan(2*sqrt(cos(x)^2/sin(x))*sin(x)/(cos(x)*sin(x) - cos(x))) + 1/4*log((cos(x)^3 - 5*cos(x)^2 - (cos(x)
^2 + 6*cos(x) + 4)*sin(x) + 4*(cos(x)^2 - (cos(x) + 1)*sin(x) - 1)*sqrt(cos(x)^2/sin(x)) - 2*cos(x) + 4)/(cos(
x)^3 + 3*cos(x)^2 - (cos(x)^2 - 2*cos(x) - 4)*sin(x) - 2*cos(x) - 4))

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sqrt {\csc \relax (x) - \sin \relax (x)}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(csc(x)-sin(x))^(1/2),x, algorithm="giac")

[Out]

integrate(1/sqrt(csc(x) - sin(x)), x)

________________________________________________________________________________________

maple [F]  time = 0.26, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sqrt {\csc \relax (x )-\sin \relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(csc(x)-sin(x))^(1/2),x)

[Out]

int(1/(csc(x)-sin(x))^(1/2),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sqrt {\csc \relax (x) - \sin \relax (x)}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(csc(x)-sin(x))^(1/2),x, algorithm="maxima")

[Out]

integrate(1/sqrt(csc(x) - sin(x)), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {1}{\sqrt {\frac {1}{\sin \relax (x)}-\sin \relax (x)}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(1/sin(x) - sin(x))^(1/2),x)

[Out]

int(1/(1/sin(x) - sin(x))^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sqrt {- \sin {\relax (x )} + \csc {\relax (x )}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(csc(x)-sin(x))**(1/2),x)

[Out]

Integral(1/sqrt(-sin(x) + csc(x)), x)

________________________________________________________________________________________