3.82 \(\int \csc (x) \, dx\)

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

[Out]

-arctanh(cos(x))

________________________________________________________________________________________

Rubi [A]  time = 0.00, antiderivative size = 5, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3770} \[ -\tanh ^{-1}(\cos (x)) \]

Antiderivative was successfully verified.

[In]

Int[Csc[x],x]

[Out]

-ArcTanh[Cos[x]]

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 \csc (x) \, dx &=-\tanh ^{-1}(\cos (x))\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.00, size = 17, normalized size = 3.40 \[ \log \left (\sin \left (\frac {x}{2}\right )\right )-\log \left (\cos \left (\frac {x}{2}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x],x]

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.42, size = 19, normalized size = 3.80 \[ -\frac {1}{2} \, \log \left (\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) + \frac {1}{2} \, \log \left (-\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/sin(x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [B]  time = 1.18, size = 17, normalized size = 3.40 \[ -\frac {1}{2} \, \log \left (\cos \relax (x) + 1\right ) + \frac {1}{2} \, \log \left (-\cos \relax (x) + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/sin(x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.02, size = 9, normalized size = 1.80 \[ \ln \left (-\cot \relax (x )+\csc \relax (x )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/sin(x),x)

[Out]

ln(csc(x)-cot(x))

________________________________________________________________________________________

maxima [B]  time = 0.42, size = 15, normalized size = 3.00 \[ -\frac {1}{2} \, \log \left (\cos \relax (x) + 1\right ) + \frac {1}{2} \, \log \left (\cos \relax (x) - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/sin(x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 5, normalized size = 1.00 \[ \ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/sin(x),x)

[Out]

log(tan(x/2))

________________________________________________________________________________________

sympy [B]  time = 0.11, size = 15, normalized size = 3.00 \[ \frac {\log {\left (\cos {\relax (x )} - 1 \right )}}{2} - \frac {\log {\left (\cos {\relax (x )} + 1 \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/sin(x),x)

[Out]

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

________________________________________________________________________________________