3.1.79 \(\int \cot (x) \, dx\) [79]

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

[Out]

ln(sin(x))

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 3, 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 = {3556} \begin {gather*} \log (\sin (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[x],x]

[Out]

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 {align*} \int \cot (x) \, dx &=\log (\sin (x))\\ \end {align*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[Cot[x],x]

[Out]

Log[Sin[x]]

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 4, normalized size = 1.33

method result size
lookup \(\ln \left (\sin \left (x \right )\right )\) \(4\)
default \(\ln \left (\sin \left (x \right )\right )\) \(4\)
derivativedivides \(-\frac {\ln \left (1+\tan ^{2}\left (x \right )\right )}{2}+\ln \left (\tan \left (x \right )\right )\) \(14\)
norman \(-\frac {\ln \left (1+\tan ^{2}\left (x \right )\right )}{2}+\ln \left (\tan \left (x \right )\right )\) \(14\)
risch \(-i x +\ln \left ({\mathrm e}^{2 i x}-1\right )\) \(14\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/tan(x),x,method=_RETURNVERBOSE)

[Out]

ln(sin(x))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(sin(x))

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 16 vs. \(2 (3) = 6\).
time = 0.81, size = 16, normalized size = 5.33 \begin {gather*} \frac {1}{2} \, \log \left (\frac {\tan \left (x\right )^{2}}{\tan \left (x\right )^{2} + 1}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*log(tan(x)^2/(tan(x)^2 + 1))

________________________________________________________________________________________

Sympy [A]
time = 0.03, size = 3, normalized size = 1.00 \begin {gather*} \log {\left (\sin {\left (x \right )} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/tan(x),x)

[Out]

log(sin(x))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 17 vs. \(2 (3) = 6\).
time = 0.68, size = 17, normalized size = 5.67 \begin {gather*} -\frac {1}{2} \, \log \left (\tan \left (x\right )^{2} + 1\right ) + \frac {1}{2} \, \log \left (\tan \left (x\right )^{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.20, size = 13, normalized size = 4.33 \begin {gather*} \ln \left (\mathrm {tan}\left (x\right )\right )-\frac {\ln \left ({\mathrm {tan}\left (x\right )}^2+1\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/tan(x),x)

[Out]

log(tan(x)) - log(tan(x)^2 + 1)/2

________________________________________________________________________________________