3.123 \(\int \cos (x) \csc (2 x) \, dx\)

Optimal. Leaf size=7 \[ -\frac{1}{2} \tanh ^{-1}(\cos (x)) \]

[Out]

-ArcTanh[Cos[x]]/2

________________________________________________________________________________________

Rubi [A]  time = 0.0112712, antiderivative size = 7, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 7, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {4287, 3770} \[ -\frac{1}{2} \tanh ^{-1}(\cos (x)) \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]*Csc[2*x],x]

[Out]

-ArcTanh[Cos[x]]/2

Rule 4287

Int[(cos[(a_.) + (b_.)*(x_)]*(e_.))^(m_.)*sin[(c_.) + (d_.)*(x_)]^(p_.), x_Symbol] :> Dist[2^p/e^p, Int[(e*Cos
[a + b*x])^(m + p)*Sin[a + b*x]^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && EqQ[b*c - a*d, 0] && EqQ[d/b, 2]
&& IntegerQ[p]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \cos (x) \csc (2 x) \, dx &=\frac{1}{2} \int \csc (x) \, dx\\ &=-\frac{1}{2} \tanh ^{-1}(\cos (x))\\ \end{align*}

Mathematica [B]  time = 0.0031234, size = 21, normalized size = 3. \[ \frac{1}{2} \left (\log \left (\sin \left (\frac{x}{2}\right )\right )-\log \left (\cos \left (\frac{x}{2}\right )\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]*Csc[2*x],x]

[Out]

(-Log[Cos[x/2]] + Log[Sin[x/2]])/2

________________________________________________________________________________________

Maple [A]  time = 0.017, size = 11, normalized size = 1.6 \begin{align*}{\frac{\ln \left ( \csc \left ( x \right ) -\cot \left ( x \right ) \right ) }{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)*csc(2*x),x)

[Out]

1/2*ln(csc(x)-cot(x))

________________________________________________________________________________________

Maxima [B]  time = 0.988998, size = 47, normalized size = 6.71 \begin{align*} -\frac{1}{4} \, \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) + \frac{1}{4} \, \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*csc(2*x),x, algorithm="maxima")

[Out]

-1/4*log(cos(x)^2 + sin(x)^2 + 2*cos(x) + 1) + 1/4*log(cos(x)^2 + sin(x)^2 - 2*cos(x) + 1)

________________________________________________________________________________________

Fricas [B]  time = 2.48182, size = 77, normalized size = 11. \begin{align*} -\frac{1}{4} \, \log \left (\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) + \frac{1}{4} \, \log \left (-\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*csc(2*x),x, algorithm="fricas")

[Out]

-1/4*log(1/2*cos(x) + 1/2) + 1/4*log(-1/2*cos(x) + 1/2)

________________________________________________________________________________________

Sympy [B]  time = 7.94328, size = 15, normalized size = 2.14 \begin{align*} \frac{\log{\left (\cos{\left (x \right )} - 1 \right )}}{4} - \frac{\log{\left (\cos{\left (x \right )} + 1 \right )}}{4} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*csc(2*x),x)

[Out]

log(cos(x) - 1)/4 - log(cos(x) + 1)/4

________________________________________________________________________________________

Giac [A]  time = 1.11464, size = 11, normalized size = 1.57 \begin{align*} \frac{1}{2} \, \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*csc(2*x),x, algorithm="giac")

[Out]

1/2*log(abs(tan(1/2*x)))