\(\int \frac {\cot (x) \csc (x)}{\sqrt {\sin (2 x)}} \, dx\) [633]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 16 \[ \int \frac {\cot (x) \csc (x)}{\sqrt {\sin (2 x)}} \, dx=-\frac {2 \cos (x) \cot (x)}{3 \sqrt {\sin (2 x)}} \]

[Out]

-2/3*cos(x)*cot(x)/sin(2*x)^(1/2)

Rubi [A] (verified)

Time = 0.11 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {4475, 30} \[ \int \frac {\cot (x) \csc (x)}{\sqrt {\sin (2 x)}} \, dx=-\frac {2 \cos (x) \cot (x)}{3 \sqrt {\sin (2 x)}} \]

[In]

Int[(Cot[x]*Csc[x])/Sqrt[Sin[2*x]],x]

[Out]

(-2*Cos[x]*Cot[x])/(3*Sqrt[Sin[2*x]])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 4475

Int[(u_)*((c_.)*sin[v_])^(m_), x_Symbol] :> With[{w = FunctionOfTrig[u*(Sin[v/2]^(2*m)/(c*Tan[v/2])^m), x]}, D
ist[(c*Sin[v])^m*((c*Tan[v/2])^m/Sin[v/2]^(2*m)), Int[u*(Sin[v/2]^(2*m)/(c*Tan[v/2])^m), x], x] /;  !FalseQ[w]
 && FunctionOfQ[NonfreeFactors[Tan[w], x], u*(Sin[v/2]^(2*m)/(c*Tan[v/2])^m), x]] /; FreeQ[c, x] && LinearQ[v,
 x] && IntegerQ[m + 1/2] &&  !SumQ[u] && InverseFunctionFreeQ[u, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\sin (x) \int \frac {\csc ^2(x)}{\sqrt {\tan (x)}} \, dx}{\sqrt {\sin (2 x)} \sqrt {\tan (x)}} \\ & = \frac {\sin (x) \text {Subst}\left (\int \frac {1}{x^{5/2}} \, dx,x,\tan (x)\right )}{\sqrt {\sin (2 x)} \sqrt {\tan (x)}} \\ & = -\frac {2 \cos (x) \cot (x)}{3 \sqrt {\sin (2 x)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00 \[ \int \frac {\cot (x) \csc (x)}{\sqrt {\sin (2 x)}} \, dx=-\frac {1}{3} \cot (x) \csc (x) \sqrt {\sin (2 x)} \]

[In]

Integrate[(Cot[x]*Csc[x])/Sqrt[Sin[2*x]],x]

[Out]

-1/3*(Cot[x]*Csc[x]*Sqrt[Sin[2*x]])

Maple [C] (verified)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 1.27 (sec) , antiderivative size = 119, normalized size of antiderivative = 7.44

method result size
default \(\frac {\sqrt {-\frac {\tan \left (\frac {x}{2}\right )}{\tan \left (\frac {x}{2}\right )^{2}-1}}\, \left (\tan \left (\frac {x}{2}\right )^{2}-1\right ) \left (4 \sqrt {\tan \left (\frac {x}{2}\right )+1}\, \sqrt {-2 \tan \left (\frac {x}{2}\right )+2}\, \sqrt {-\tan \left (\frac {x}{2}\right )}\, \operatorname {EllipticF}\left (\sqrt {\tan \left (\frac {x}{2}\right )+1}, \frac {\sqrt {2}}{2}\right ) \tan \left (\frac {x}{2}\right )+\tan \left (\frac {x}{2}\right )^{4}-1\right )}{6 \tan \left (\frac {x}{2}\right ) \sqrt {\tan \left (\frac {x}{2}\right ) \left (\tan \left (\frac {x}{2}\right )^{2}-1\right )}\, \sqrt {\tan \left (\frac {x}{2}\right )^{3}-\tan \left (\frac {x}{2}\right )}}\) \(119\)

[In]

int(cot(x)*csc(x)/sin(2*x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/6*(-tan(1/2*x)/(tan(1/2*x)^2-1))^(1/2)*(tan(1/2*x)^2-1)/tan(1/2*x)*(4*(tan(1/2*x)+1)^(1/2)*(-2*tan(1/2*x)+2)
^(1/2)*(-tan(1/2*x))^(1/2)*EllipticF((tan(1/2*x)+1)^(1/2),1/2*2^(1/2))*tan(1/2*x)+tan(1/2*x)^4-1)/(tan(1/2*x)*
(tan(1/2*x)^2-1))^(1/2)/(tan(1/2*x)^3-tan(1/2*x))^(1/2)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 29 vs. \(2 (12) = 24\).

Time = 0.25 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.81 \[ \int \frac {\cot (x) \csc (x)}{\sqrt {\sin (2 x)}} \, dx=\frac {\sqrt {2} \sqrt {\cos \left (x\right ) \sin \left (x\right )} \cos \left (x\right ) + \cos \left (x\right )^{2} - 1}{3 \, {\left (\cos \left (x\right )^{2} - 1\right )}} \]

[In]

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

[Out]

1/3*(sqrt(2)*sqrt(cos(x)*sin(x))*cos(x) + cos(x)^2 - 1)/(cos(x)^2 - 1)

Sympy [F]

\[ \int \frac {\cot (x) \csc (x)}{\sqrt {\sin (2 x)}} \, dx=\int \frac {\cot {\left (x \right )} \csc {\left (x \right )}}{\sqrt {\sin {\left (2 x \right )}}}\, dx \]

[In]

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

[Out]

Integral(cot(x)*csc(x)/sqrt(sin(2*x)), x)

Maxima [F]

\[ \int \frac {\cot (x) \csc (x)}{\sqrt {\sin (2 x)}} \, dx=\int { \frac {\cot \left (x\right ) \csc \left (x\right )}{\sqrt {\sin \left (2 \, x\right )}} \,d x } \]

[In]

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

[Out]

integrate(cot(x)*csc(x)/sqrt(sin(2*x)), x)

Giac [F]

\[ \int \frac {\cot (x) \csc (x)}{\sqrt {\sin (2 x)}} \, dx=\int { \frac {\cot \left (x\right ) \csc \left (x\right )}{\sqrt {\sin \left (2 \, x\right )}} \,d x } \]

[In]

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

[Out]

integrate(cot(x)*csc(x)/sqrt(sin(2*x)), x)

Mupad [B] (verification not implemented)

Time = 26.37 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.88 \[ \int \frac {\cot (x) \csc (x)}{\sqrt {\sin (2 x)}} \, dx=-\frac {\sqrt {\sin \left (2\,x\right )}\,\cos \left (x\right )}{3\,{\sin \left (x\right )}^2} \]

[In]

int(cot(x)/(sin(2*x)^(1/2)*sin(x)),x)

[Out]

-(sin(2*x)^(1/2)*cos(x))/(3*sin(x)^2)