3.1.99 \(\int \cot ^3(x) \, dx\) [99]

Optimal. Leaf size=14 \[ -\frac {1}{2} \cot ^2(x)-\log (\sin (x)) \]

[Out]

-1/2*cot(x)^2-ln(sin(x))

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Int[Cot[x]^3,x]

[Out]

-1/2*Cot[x]^2 - Log[Sin[x]]

Rule 3554

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d*x])^(n - 1)/(d*(n - 1))), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

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

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 14, normalized size = 1.00 \begin {gather*} -\frac {1}{2} \csc ^2(x)-\log (\sin (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[x]^3,x]

[Out]

-1/2*Csc[x]^2 - Log[Sin[x]]

________________________________________________________________________________________

Mathics [A]
time = 1.80, size = 12, normalized size = 0.86 \begin {gather*} -\text {Log}\left [\text {Sin}\left [x\right ]\right ]-\frac {1}{2 \text {Sin}\left [x\right ]^2} \end {gather*}

Antiderivative was successfully verified.

[In]

mathics('Integrate[Cot[x]^3,x]')

[Out]

-Log[Sin[x]] - 1 / (2 Sin[x] ^ 2)

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 17, normalized size = 1.21

method result size
derivativedivides \(-\frac {\left (\cot ^{2}\left (x \right )\right )}{2}+\frac {\ln \left (\cot ^{2}\left (x \right )+1\right )}{2}\) \(17\)
default \(-\frac {\left (\cot ^{2}\left (x \right )\right )}{2}+\frac {\ln \left (\cot ^{2}\left (x \right )+1\right )}{2}\) \(17\)
norman \(-\frac {1}{2 \tan \left (x \right )^{2}}-\ln \left (\tan \left (x \right )\right )+\frac {\ln \left (1+\tan ^{2}\left (x \right )\right )}{2}\) \(22\)
risch \(i x +\frac {2 \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}-\ln \left ({\mathrm e}^{2 i x}-1\right )\) \(32\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(x)^3,x,method=_RETURNVERBOSE)

[Out]

-1/2*cot(x)^2+1/2*ln(cot(x)^2+1)

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 14, normalized size = 1.00 \begin {gather*} -\frac {1}{2 \, \sin \left (x\right )^{2}} - \frac {1}{2} \, \log \left (\sin \left (x\right )^{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^3,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 28 vs. \(2 (12) = 24\).
time = 0.35, size = 28, normalized size = 2.00 \begin {gather*} -\frac {{\left (\cos \left (2 \, x\right ) - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (2 \, x\right ) + \frac {1}{2}\right ) - 2}{2 \, {\left (\cos \left (2 \, x\right ) - 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^3,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.05, size = 14, normalized size = 1.00 \begin {gather*} - \log {\left (\sin {\left (x \right )} \right )} - \frac {1}{2 \sin ^{2}{\left (x \right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)**3,x)

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.00, size = 23, normalized size = 1.64 \begin {gather*} \frac {1}{2 \left (\cos ^{2}x-1\right )}-\frac {\ln \left (-\cos ^{2}x+1\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^3,x)

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 18, normalized size = 1.29 \begin {gather*} \frac {{\sin \left (x\right )}^2-1}{2\,{\sin \left (x\right )}^2}-\ln \left (\sin \left (x\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(x)^3,x)

[Out]

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

________________________________________________________________________________________