\(\int \csc (2 x) \sin (x) \, dx\) [90]

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

Optimal result

Integrand size = 7, antiderivative size = 7 \[ \int \csc (2 x) \sin (x) \, dx=\frac {1}{2} \text {arctanh}(\sin (x)) \]

[Out]

1/2*arctanh(sin(x))

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 7, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {4373, 3855} \[ \int \csc (2 x) \sin (x) \, dx=\frac {1}{2} \text {arctanh}(\sin (x)) \]

[In]

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

[Out]

ArcTanh[Sin[x]]/2

Rule 3855

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

Rule 4373

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

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} \int \sec (x) \, dx \\ & = \frac {1}{2} \text {arctanh}(\sin (x)) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 7, normalized size of antiderivative = 1.00 \[ \int \csc (2 x) \sin (x) \, dx=\frac {1}{2} \text {arctanh}(\sin (x)) \]

[In]

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

[Out]

ArcTanh[Sin[x]]/2

Maple [A] (verified)

Time = 0.29 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.29

method result size
default \(\frac {\ln \left (\sec \left (x \right )+\tan \left (x \right )\right )}{2}\) \(9\)
risch \(\frac {\ln \left (i+{\mathrm e}^{i x}\right )}{2}-\frac {\ln \left ({\mathrm e}^{i x}-i\right )}{2}\) \(24\)

[In]

int(csc(2*x)*sin(x),x,method=_RETURNVERBOSE)

[Out]

1/2*ln(sec(x)+tan(x))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 17 vs. \(2 (5) = 10\).

Time = 0.24 (sec) , antiderivative size = 17, normalized size of antiderivative = 2.43 \[ \int \csc (2 x) \sin (x) \, dx=\frac {1}{4} \, \log \left (\sin \left (x\right ) + 1\right ) - \frac {1}{4} \, \log \left (-\sin \left (x\right ) + 1\right ) \]

[In]

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

[Out]

1/4*log(sin(x) + 1) - 1/4*log(-sin(x) + 1)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 15 vs. \(2 (5) = 10\).

Time = 0.40 (sec) , antiderivative size = 15, normalized size of antiderivative = 2.14 \[ \int \csc (2 x) \sin (x) \, dx=- \frac {\log {\left (\sin {\left (x \right )} - 1 \right )}}{4} + \frac {\log {\left (\sin {\left (x \right )} + 1 \right )}}{4} \]

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 35 vs. \(2 (5) = 10\).

Time = 0.30 (sec) , antiderivative size = 35, normalized size of antiderivative = 5.00 \[ \int \csc (2 x) \sin (x) \, dx=\frac {1}{4} \, \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \sin \left (x\right ) + 1\right ) - \frac {1}{4} \, \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \sin \left (x\right ) + 1\right ) \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 17 vs. \(2 (5) = 10\).

Time = 0.26 (sec) , antiderivative size = 17, normalized size of antiderivative = 2.43 \[ \int \csc (2 x) \sin (x) \, dx=\frac {1}{4} \, \log \left (\sin \left (x\right ) + 1\right ) - \frac {1}{4} \, \log \left (-\sin \left (x\right ) + 1\right ) \]

[In]

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

[Out]

1/4*log(sin(x) + 1) - 1/4*log(-sin(x) + 1)

Mupad [B] (verification not implemented)

Time = 26.99 (sec) , antiderivative size = 5, normalized size of antiderivative = 0.71 \[ \int \csc (2 x) \sin (x) \, dx=\frac {\mathrm {atanh}\left (\sin \left (x\right )\right )}{2} \]

[In]

int(sin(x)/sin(2*x),x)

[Out]

atanh(sin(x))/2