3.2.27 \(\int \cot ^3(x) \, dx\) [127]

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.01, 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]]

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 22, normalized size = 1.57

method result size
derivativedivides \(\frac {\ln \left (1+\tan ^{2}\left (x \right )\right )}{2}-\frac {1}{2 \tan \left (x \right )^{2}}-\ln \left (\tan \left (x \right )\right )\) \(22\)
default \(\frac {\ln \left (1+\tan ^{2}\left (x \right )\right )}{2}-\frac {1}{2 \tan \left (x \right )^{2}}-\ln \left (\tan \left (x \right )\right )\) \(22\)
norman \(\frac {\ln \left (1+\tan ^{2}\left (x \right )\right )}{2}-\frac {1}{2 \tan \left (x \right )^{2}}-\ln \left (\tan \left (x \right )\right )\) \(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(1/tan(x)^3,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 2.57, 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(1/tan(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. 31 vs. \(2 (12) = 24\).
time = 1.02, size = 31, normalized size = 2.21 \begin {gather*} -\frac {\log \left (\frac {\tan \left (x\right )^{2}}{\tan \left (x\right )^{2} + 1}\right ) \tan \left (x\right )^{2} + \tan \left (x\right )^{2} + 1}{2 \, \tan \left (x\right )^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.03, 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(1/tan(x)**3,x)

[Out]

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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 29 vs. \(2 (12) = 24\).
time = 1.03, size = 29, normalized size = 2.07 \begin {gather*} \frac {\tan \left (x\right )^{2} - 1}{2 \, \tan \left (x\right )^{2}} + \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)^3,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/tan(x)^3,x)

[Out]

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

________________________________________________________________________________________