\(\int \cot ^4(x) \csc ^3(x) \, dx\) [361]

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

Optimal result

Integrand size = 9, antiderivative size = 38 \[ \int \cot ^4(x) \csc ^3(x) \, dx=-\frac {1}{16} \text {arctanh}(\cos (x))-\frac {1}{16} \cot (x) \csc (x)+\frac {1}{8} \cot (x) \csc ^3(x)-\frac {1}{6} \cot ^3(x) \csc ^3(x) \]

[Out]

-1/16*arctanh(cos(x))-1/16*cot(x)*csc(x)+1/8*cot(x)*csc(x)^3-1/6*cot(x)^3*csc(x)^3

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2691, 3853, 3855} \[ \int \cot ^4(x) \csc ^3(x) \, dx=-\frac {1}{16} \text {arctanh}(\cos (x))-\frac {1}{6} \cot ^3(x) \csc ^3(x)+\frac {1}{8} \cot (x) \csc ^3(x)-\frac {1}{16} \cot (x) \csc (x) \]

[In]

Int[Cot[x]^4*Csc[x]^3,x]

[Out]

-1/16*ArcTanh[Cos[x]] - (Cot[x]*Csc[x])/16 + (Cot[x]*Csc[x]^3)/8 - (Cot[x]^3*Csc[x]^3)/6

Rule 2691

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*(a*Sec[e +
 f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Dist[b^2*((n - 1)/(m + n - 1)), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

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

Rubi steps \begin{align*} \text {integral}& = -\frac {1}{6} \cot ^3(x) \csc ^3(x)-\frac {1}{2} \int \cot ^2(x) \csc ^3(x) \, dx \\ & = \frac {1}{8} \cot (x) \csc ^3(x)-\frac {1}{6} \cot ^3(x) \csc ^3(x)+\frac {1}{8} \int \csc ^3(x) \, dx \\ & = -\frac {1}{16} \cot (x) \csc (x)+\frac {1}{8} \cot (x) \csc ^3(x)-\frac {1}{6} \cot ^3(x) \csc ^3(x)+\frac {1}{16} \int \csc (x) \, dx \\ & = -\frac {1}{16} \text {arctanh}(\cos (x))-\frac {1}{16} \cot (x) \csc (x)+\frac {1}{8} \cot (x) \csc ^3(x)-\frac {1}{6} \cot ^3(x) \csc ^3(x) \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(95\) vs. \(2(38)=76\).

Time = 0.04 (sec) , antiderivative size = 95, normalized size of antiderivative = 2.50 \[ \int \cot ^4(x) \csc ^3(x) \, dx=-\frac {1}{64} \csc ^2\left (\frac {x}{2}\right )+\frac {1}{64} \csc ^4\left (\frac {x}{2}\right )-\frac {1}{384} \csc ^6\left (\frac {x}{2}\right )-\frac {1}{16} \log \left (\cos \left (\frac {x}{2}\right )\right )+\frac {1}{16} \log \left (\sin \left (\frac {x}{2}\right )\right )+\frac {1}{64} \sec ^2\left (\frac {x}{2}\right )-\frac {1}{64} \sec ^4\left (\frac {x}{2}\right )+\frac {1}{384} \sec ^6\left (\frac {x}{2}\right ) \]

[In]

Integrate[Cot[x]^4*Csc[x]^3,x]

[Out]

-1/64*Csc[x/2]^2 + Csc[x/2]^4/64 - Csc[x/2]^6/384 - Log[Cos[x/2]]/16 + Log[Sin[x/2]]/16 + Sec[x/2]^2/64 - Sec[
x/2]^4/64 + Sec[x/2]^6/384

Maple [A] (verified)

Time = 0.23 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.37

method result size
default \(-\frac {\cos ^{5}\left (x \right )}{6 \sin \left (x \right )^{6}}-\frac {\cos ^{5}\left (x \right )}{24 \sin \left (x \right )^{4}}+\frac {\cos ^{5}\left (x \right )}{48 \sin \left (x \right )^{2}}+\frac {\left (\cos ^{3}\left (x \right )\right )}{48}+\frac {\cos \left (x \right )}{16}+\frac {\ln \left (\csc \left (x \right )-\cot \left (x \right )\right )}{16}\) \(52\)
risch \(\frac {3 \,{\mathrm e}^{11 i x}+47 \,{\mathrm e}^{9 i x}+78 \,{\mathrm e}^{7 i x}+78 \,{\mathrm e}^{5 i x}+47 \,{\mathrm e}^{3 i x}+3 \,{\mathrm e}^{i x}}{24 \left ({\mathrm e}^{2 i x}-1\right )^{6}}+\frac {\ln \left ({\mathrm e}^{i x}-1\right )}{16}-\frac {\ln \left ({\mathrm e}^{i x}+1\right )}{16}\) \(76\)

[In]

int(cot(x)^4*csc(x)^3,x,method=_RETURNVERBOSE)

[Out]

-1/6/sin(x)^6*cos(x)^5-1/24/sin(x)^4*cos(x)^5+1/48/sin(x)^2*cos(x)^5+1/48*cos(x)^3+1/16*cos(x)+1/16*ln(csc(x)-
cot(x))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 93 vs. \(2 (30) = 60\).

Time = 0.25 (sec) , antiderivative size = 93, normalized size of antiderivative = 2.45 \[ \int \cot ^4(x) \csc ^3(x) \, dx=\frac {6 \, \cos \left (x\right )^{5} + 16 \, \cos \left (x\right )^{3} - 3 \, {\left (\cos \left (x\right )^{6} - 3 \, \cos \left (x\right )^{4} + 3 \, \cos \left (x\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + 3 \, {\left (\cos \left (x\right )^{6} - 3 \, \cos \left (x\right )^{4} + 3 \, \cos \left (x\right )^{2} - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - 6 \, \cos \left (x\right )}{96 \, {\left (\cos \left (x\right )^{6} - 3 \, \cos \left (x\right )^{4} + 3 \, \cos \left (x\right )^{2} - 1\right )}} \]

[In]

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

[Out]

1/96*(6*cos(x)^5 + 16*cos(x)^3 - 3*(cos(x)^6 - 3*cos(x)^4 + 3*cos(x)^2 - 1)*log(1/2*cos(x) + 1/2) + 3*(cos(x)^
6 - 3*cos(x)^4 + 3*cos(x)^2 - 1)*log(-1/2*cos(x) + 1/2) - 6*cos(x))/(cos(x)^6 - 3*cos(x)^4 + 3*cos(x)^2 - 1)

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.47 \[ \int \cot ^4(x) \csc ^3(x) \, dx=- \frac {- 3 \cos ^{5}{\left (x \right )} - 8 \cos ^{3}{\left (x \right )} + 3 \cos {\left (x \right )}}{48 \cos ^{6}{\left (x \right )} - 144 \cos ^{4}{\left (x \right )} + 144 \cos ^{2}{\left (x \right )} - 48} + \frac {\log {\left (\cos {\left (x \right )} - 1 \right )}}{32} - \frac {\log {\left (\cos {\left (x \right )} + 1 \right )}}{32} \]

[In]

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

[Out]

-(-3*cos(x)**5 - 8*cos(x)**3 + 3*cos(x))/(48*cos(x)**6 - 144*cos(x)**4 + 144*cos(x)**2 - 48) + log(cos(x) - 1)
/32 - log(cos(x) + 1)/32

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.42 \[ \int \cot ^4(x) \csc ^3(x) \, dx=\frac {3 \, \cos \left (x\right )^{5} + 8 \, \cos \left (x\right )^{3} - 3 \, \cos \left (x\right )}{48 \, {\left (\cos \left (x\right )^{6} - 3 \, \cos \left (x\right )^{4} + 3 \, \cos \left (x\right )^{2} - 1\right )}} - \frac {1}{32} \, \log \left (\cos \left (x\right ) + 1\right ) + \frac {1}{32} \, \log \left (\cos \left (x\right ) - 1\right ) \]

[In]

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

[Out]

1/48*(3*cos(x)^5 + 8*cos(x)^3 - 3*cos(x))/(cos(x)^6 - 3*cos(x)^4 + 3*cos(x)^2 - 1) - 1/32*log(cos(x) + 1) + 1/
32*log(cos(x) - 1)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.16 \[ \int \cot ^4(x) \csc ^3(x) \, dx=\frac {3 \, \cos \left (x\right )^{5} + 8 \, \cos \left (x\right )^{3} - 3 \, \cos \left (x\right )}{48 \, {\left (\cos \left (x\right )^{2} - 1\right )}^{3}} - \frac {1}{32} \, \log \left (\cos \left (x\right ) + 1\right ) + \frac {1}{32} \, \log \left (-\cos \left (x\right ) + 1\right ) \]

[In]

integrate(cot(x)^4*csc(x)^3,x, algorithm="giac")

[Out]

1/48*(3*cos(x)^5 + 8*cos(x)^3 - 3*cos(x))/(cos(x)^2 - 1)^3 - 1/32*log(cos(x) + 1) + 1/32*log(-cos(x) + 1)

Mupad [B] (verification not implemented)

Time = 0.32 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.50 \[ \int \cot ^4(x) \csc ^3(x) \, dx=\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{16}+\frac {\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^4}{128}+\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{128}-\frac {1}{384}}{{\mathrm {tan}\left (\frac {x}{2}\right )}^6}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{128}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^4}{128}+\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^6}{384} \]

[In]

int(cot(x)^4/sin(x)^3,x)

[Out]

log(tan(x/2))/16 + (tan(x/2)^2/128 + tan(x/2)^4/128 - 1/384)/tan(x/2)^6 - tan(x/2)^2/128 - tan(x/2)^4/128 + ta
n(x/2)^6/384