3.2.54 \(\int (1-\cot (x)) \, dx\) [154]

Optimal. Leaf size=7 \[ x-\log (\sin (x)) \]

[Out]

x-ln(sin(x))

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 7, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3556} \begin {gather*} x-\log (\sin (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1 - Cot[x],x]

[Out]

x - Log[Sin[x]]

Rule 3556

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

Rubi steps

\begin {gather*} \begin {aligned} \text {Integral} &=x-\int \cot (x) \, dx\\ &=x-\log (\sin (x))\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 7, normalized size = 1.00 \begin {gather*} x-\log (\sin (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1 - Cot[x],x]

[Out]

x - Log[Sin[x]]

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 8, normalized size = 1.14

method result size
default \(x -\ln \left (\sin \left (x \right )\right )\) \(8\)
parts \(x -\ln \left (\sin \left (x \right )\right )\) \(8\)
risch \(x +i x -\ln \left ({\mathrm e}^{2 i x}-1\right )\) \(17\)
norman \(x -\ln \left (\tan \left (\frac {x}{2}\right )\right )+\ln \left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )\) \(19\)
parallelrisch \(-\ln \left (-\frac {\cot \left (x \right )}{2}+\frac {\csc \left (x \right )}{2}\right )+\ln \left (\frac {1}{1+\cos \left (x \right )}\right )+x\) \(22\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x-ln(sin(x))

________________________________________________________________________________________

Maxima [A]
time = 0.32, size = 7, normalized size = 1.00 \begin {gather*} x - \log \left (\sin \left (x\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - log(sin(x))

________________________________________________________________________________________

Fricas [A]
time = 0.62, size = 9, normalized size = 1.29 \begin {gather*} x - \log \left (\frac {1}{2} \, \sin \left (x\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - log(1/2*sin(x))

________________________________________________________________________________________

Sympy [A]
time = 0.01, size = 5, normalized size = 0.71 \begin {gather*} x - \log {\left (\sin {\left (x \right )} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - log(sin(x))

________________________________________________________________________________________

Giac [A]
time = 0.47, size = 8, normalized size = 1.14 \begin {gather*} x - \log \left ({\left | \sin \left (x\right ) \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - log(abs(sin(x)))

________________________________________________________________________________________

Mupad [B]
time = 0.17, size = 26, normalized size = 3.71 \begin {gather*} -\ln \left (\mathrm {tan}\left (x\right )\right )+\ln \left (\mathrm {tan}\left (x\right )-\mathrm {i}\right )\,\left (\frac {1}{2}-\frac {1}{2}{}\mathrm {i}\right )+\ln \left (\mathrm {tan}\left (x\right )+1{}\mathrm {i}\right )\,\left (\frac {1}{2}+\frac {1}{2}{}\mathrm {i}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(tan(x) - 1i)*(1/2 - 1i/2) - log(tan(x)) + log(tan(x) + 1i)*(1/2 + 1i/2)

________________________________________________________________________________________

Chatgpt [F] Failed to verify
time = 1.00, size = 8, normalized size = 1.14 \begin {gather*} \ln \left (\frac {\sin \left (x \right )}{\cos \left (x \right )}\right ) \end {gather*}

Warning: Unable to verify antiderivative.

[In]

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

[Out]

ln(sin(x)/cos(x))

________________________________________________________________________________________