\(\int \cot ^5(x) \, dx\) [342]

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

Optimal result

Integrand size = 4, antiderivative size = 20 \[ \int \cot ^5(x) \, dx=\frac {\cot ^2(x)}{2}-\frac {\cot ^4(x)}{4}+\log (\sin (x)) \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3554, 3556} \[ \int \cot ^5(x) \, dx=-\frac {1}{4} \cot ^4(x)+\frac {\cot ^2(x)}{2}+\log (\sin (x)) \]

[In]

Int[Cot[x]^5,x]

[Out]

Cot[x]^2/2 - Cot[x]^4/4 + 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*} \text {integral}& = -\frac {1}{4} \cot ^4(x)-\int \cot ^3(x) \, dx \\ & = \frac {\cot ^2(x)}{2}-\frac {\cot ^4(x)}{4}+\int \cot (x) \, dx \\ & = \frac {\cot ^2(x)}{2}-\frac {\cot ^4(x)}{4}+\log (\sin (x)) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.15 \[ \int \cot ^5(x) \, dx=\frac {\cot ^2(x)}{2}-\frac {\cot ^4(x)}{4}+\log (\cos (x))+\log (\tan (x)) \]

[In]

Integrate[Cot[x]^5,x]

[Out]

Cot[x]^2/2 - Cot[x]^4/4 + Log[Cos[x]] + Log[Tan[x]]

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.30

method result size
derivativedivides \(-\frac {1}{4 \tan \left (x \right )^{4}}+\ln \left (\tan \left (x \right )\right )+\frac {1}{2 \tan \left (x \right )^{2}}-\frac {\ln \left (1+\tan ^{2}\left (x \right )\right )}{2}\) \(26\)
default \(-\frac {1}{4 \tan \left (x \right )^{4}}+\ln \left (\tan \left (x \right )\right )+\frac {1}{2 \tan \left (x \right )^{2}}-\frac {\ln \left (1+\tan ^{2}\left (x \right )\right )}{2}\) \(26\)
norman \(\frac {-\frac {1}{4}+\frac {\left (\tan ^{2}\left (x \right )\right )}{2}}{\tan \left (x \right )^{4}}-\frac {\ln \left (1+\tan ^{2}\left (x \right )\right )}{2}+\ln \left (\tan \left (x \right )\right )\) \(27\)
parallelrisch \(\frac {4 \ln \left (\tan \left (x \right )\right ) \left (\tan ^{4}\left (x \right )\right )-2 \ln \left (1+\tan ^{2}\left (x \right )\right ) \left (\tan ^{4}\left (x \right )\right )-1+2 \left (\tan ^{2}\left (x \right )\right )}{4 \tan \left (x \right )^{4}}\) \(37\)
risch \(-i x -\frac {4 \left ({\mathrm e}^{6 i x}-{\mathrm e}^{4 i x}+{\mathrm e}^{2 i x}\right )}{\left ({\mathrm e}^{2 i x}-1\right )^{4}}+\ln \left ({\mathrm e}^{2 i x}-1\right )\) \(43\)

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 40 vs. \(2 (16) = 32\).

Time = 0.25 (sec) , antiderivative size = 40, normalized size of antiderivative = 2.00 \[ \int \cot ^5(x) \, dx=\frac {2 \, \log \left (\frac {\tan \left (x\right )^{2}}{\tan \left (x\right )^{2} + 1}\right ) \tan \left (x\right )^{4} + 3 \, \tan \left (x\right )^{4} + 2 \, \tan \left (x\right )^{2} - 1}{4 \, \tan \left (x\right )^{4}} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.95 \[ \int \cot ^5(x) \, dx=\frac {4 \sin ^{2}{\left (x \right )} - 1}{4 \sin ^{4}{\left (x \right )}} + \log {\left (\sin {\left (x \right )} \right )} \]

[In]

integrate(1/tan(x)**5,x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.10 \[ \int \cot ^5(x) \, dx=\frac {4 \, \sin \left (x\right )^{2} - 1}{4 \, \sin \left (x\right )^{4}} + \frac {1}{2} \, \log \left (\sin \left (x\right )^{2}\right ) \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 37 vs. \(2 (16) = 32\).

Time = 0.29 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.85 \[ \int \cot ^5(x) \, dx=-\frac {3 \, \tan \left (x\right )^{4} - 2 \, \tan \left (x\right )^{2} + 1}{4 \, \tan \left (x\right )^{4}} - \frac {1}{2} \, \log \left (\tan \left (x\right )^{2} + 1\right ) + \frac {1}{2} \, \log \left (\tan \left (x\right )^{2}\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.30 \[ \int \cot ^5(x) \, dx=\ln \left (\mathrm {tan}\left (x\right )\right )-\frac {\ln \left ({\mathrm {tan}\left (x\right )}^2+1\right )}{2}+\frac {\frac {{\mathrm {tan}\left (x\right )}^2}{2}-\frac {1}{4}}{{\mathrm {tan}\left (x\right )}^4} \]

[In]

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

[Out]

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