3.1.100 \(\int \cot ^4(x) \csc ^4(x) \, dx\) [100]

Optimal. Leaf size=17 \[ -\frac {1}{5} \cot ^5(x)-\frac {\cot ^7(x)}{7} \]

[Out]

-1/5*cot(x)^5-1/7*cot(x)^7

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2687, 14} \begin {gather*} -\frac {1}{7} \cot ^7(x)-\frac {\cot ^5(x)}{5} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-1/5*Cot[x]^5 - Cot[x]^7/7

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2687

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rubi steps

\begin {align*} \int \cot ^4(x) \csc ^4(x) \, dx &=\text {Subst}\left (\int x^4 \left (1+x^2\right ) \, dx,x,-\cot (x)\right )\\ &=\text {Subst}\left (\int \left (x^4+x^6\right ) \, dx,x,-\cot (x)\right )\\ &=-\frac {1}{5} \cot ^5(x)-\frac {\cot ^7(x)}{7}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(37\) vs. \(2(17)=34\).
time = 0.02, size = 37, normalized size = 2.18 \begin {gather*} -\frac {2 \cot (x)}{35}-\frac {1}{35} \cot (x) \csc ^2(x)+\frac {8}{35} \cot (x) \csc ^4(x)-\frac {1}{7} \cot (x) \csc ^6(x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-2*Cot[x])/35 - (Cot[x]*Csc[x]^2)/35 + (8*Cot[x]*Csc[x]^4)/35 - (Cot[x]*Csc[x]^6)/7

________________________________________________________________________________________

Mathics [A]
time = 2.02, size = 17, normalized size = 1.00 \begin {gather*} -\frac {\text {Cos}\left [x\right ]^5}{5 \text {Sin}\left [x\right ]^7}+\frac {2}{35 \text {Tan}\left [x\right ]^7} \end {gather*}

Antiderivative was successfully verified.

[In]

mathics('Integrate[Cot[x]^4*Csc[x]^4,x]')

[Out]

-Cos[x] ^ 5 / (5 Sin[x] ^ 7) + 2 / (35 Tan[x] ^ 7)

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 22, normalized size = 1.29

method result size
default \(-\frac {\cos ^{5}\left (x \right )}{7 \sin \left (x \right )^{7}}-\frac {2 \left (\cos ^{5}\left (x \right )\right )}{35 \sin \left (x \right )^{5}}\) \(22\)
risch \(\frac {4 i \left (35 \,{\mathrm e}^{10 i x}+35 \,{\mathrm e}^{8 i x}+70 \,{\mathrm e}^{6 i x}+14 \,{\mathrm e}^{4 i x}+7 \,{\mathrm e}^{2 i x}-1\right )}{35 \left ({\mathrm e}^{2 i x}-1\right )^{7}}\) \(50\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/7/sin(x)^7*cos(x)^5-2/35/sin(x)^5*cos(x)^5

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 14, normalized size = 0.82 \begin {gather*} -\frac {7 \, \tan \left (x\right )^{2} + 5}{35 \, \tan \left (x\right )^{7}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/35*(7*tan(x)^2 + 5)/tan(x)^7

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 39 vs. \(2 (13) = 26\).
time = 0.34, size = 39, normalized size = 2.29 \begin {gather*} -\frac {2 \, \cos \left (x\right )^{7} - 7 \, \cos \left (x\right )^{5}}{35 \, {\left (\cos \left (x\right )^{6} - 3 \, \cos \left (x\right )^{4} + 3 \, \cos \left (x\right )^{2} - 1\right )} \sin \left (x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/35*(2*cos(x)^7 - 7*cos(x)^5)/((cos(x)^6 - 3*cos(x)^4 + 3*cos(x)^2 - 1)*sin(x))

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 41 vs. \(2 (14) = 28\)
time = 0.03, size = 41, normalized size = 2.41 \begin {gather*} - \frac {2 \cos {\left (x \right )}}{35 \sin {\left (x \right )}} - \frac {\cos {\left (x \right )}}{35 \sin ^{3}{\left (x \right )}} + \frac {8 \cos {\left (x \right )}}{35 \sin ^{5}{\left (x \right )}} - \frac {\cos {\left (x \right )}}{7 \sin ^{7}{\left (x \right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*cos(x)/(35*sin(x)) - cos(x)/(35*sin(x)**3) + 8*cos(x)/(35*sin(x)**5) - cos(x)/(7*sin(x)**7)

________________________________________________________________________________________

Giac [A]
time = 0.01, size = 18, normalized size = 1.06 \begin {gather*} \frac {2 \left (-7 \tan ^{2}x-5\right )}{70 \tan ^{7}x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/35*(7*tan(x)^2 + 5)/tan(x)^7

________________________________________________________________________________________

Mupad [B]
time = 0.18, size = 14, normalized size = 0.82 \begin {gather*} -\frac {{\mathrm {cot}\left (x\right )}^5\,\left (5\,{\mathrm {cot}\left (x\right )}^2+7\right )}{35} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(cot(x)^5*(5*cot(x)^2 + 7))/35

________________________________________________________________________________________