\(\int \frac {1}{1-\cos (x)} \, dx\) [119]

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

Optimal result

Integrand size = 8, antiderivative size = 12 \[ \int \frac {1}{1-\cos (x)} \, dx=-\frac {\sin (x)}{1-\cos (x)} \]

[Out]

-sin(x)/(1-cos(x))

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2727} \[ \int \frac {1}{1-\cos (x)} \, dx=-\frac {\sin (x)}{1-\cos (x)} \]

[In]

Int[(1 - Cos[x])^(-1),x]

[Out]

-(Sin[x]/(1 - Cos[x]))

Rule 2727

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> Simp[-Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {\sin (x)}{1-\cos (x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.67 \[ \int \frac {1}{1-\cos (x)} \, dx=-\cot \left (\frac {x}{2}\right ) \]

[In]

Integrate[(1 - Cos[x])^(-1),x]

[Out]

-Cot[x/2]

Maple [A] (verified)

Time = 0.07 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.75

method result size
default \(-\frac {1}{\tan \left (\frac {x}{2}\right )}\) \(9\)
norman \(-\frac {1}{\tan \left (\frac {x}{2}\right )}\) \(9\)
parallelrisch \(-\frac {1}{\tan \left (\frac {x}{2}\right )}\) \(9\)
risch \(-\frac {2 i}{{\mathrm e}^{i x}-1}\) \(13\)

[In]

int(1/(1-cos(x)),x,method=_RETURNVERBOSE)

[Out]

-1/tan(1/2*x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.83 \[ \int \frac {1}{1-\cos (x)} \, dx=-\frac {\cos \left (x\right ) + 1}{\sin \left (x\right )} \]

[In]

integrate(1/(1-cos(x)),x, algorithm="fricas")

[Out]

-(cos(x) + 1)/sin(x)

Sympy [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.58 \[ \int \frac {1}{1-\cos (x)} \, dx=- \frac {1}{\tan {\left (\frac {x}{2} \right )}} \]

[In]

integrate(1/(1-cos(x)),x)

[Out]

-1/tan(x/2)

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.83 \[ \int \frac {1}{1-\cos (x)} \, dx=-\frac {\cos \left (x\right ) + 1}{\sin \left (x\right )} \]

[In]

integrate(1/(1-cos(x)),x, algorithm="maxima")

[Out]

-(cos(x) + 1)/sin(x)

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.67 \[ \int \frac {1}{1-\cos (x)} \, dx=-\frac {1}{\tan \left (\frac {1}{2} \, x\right )} \]

[In]

integrate(1/(1-cos(x)),x, algorithm="giac")

[Out]

-1/tan(1/2*x)

Mupad [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 6, normalized size of antiderivative = 0.50 \[ \int \frac {1}{1-\cos (x)} \, dx=-\mathrm {cot}\left (\frac {x}{2}\right ) \]

[In]

int(-1/(cos(x) - 1),x)

[Out]

-cot(x/2)