\(\int \csc ^4(x) \, dx\) [105]

   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 [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 4, antiderivative size = 13 \[ \int \csc ^4(x) \, dx=-\cot (x)-\frac {\cot ^3(x)}{3} \]

[Out]

-cot(x)-1/3*cot(x)^3

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3852} \[ \int \csc ^4(x) \, dx=-\frac {1}{3} \cot ^3(x)-\cot (x) \]

[In]

Int[Csc[x]^4,x]

[Out]

-Cot[x] - Cot[x]^3/3

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (x)\right ) \\ & = -\cot (x)-\frac {\cot ^3(x)}{3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.31 \[ \int \csc ^4(x) \, dx=-\frac {2 \cot (x)}{3}-\frac {1}{3} \cot (x) \csc ^2(x) \]

[In]

Integrate[Csc[x]^4,x]

[Out]

(-2*Cot[x])/3 - (Cot[x]*Csc[x]^2)/3

Maple [A] (verified)

Time = 0.24 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.92

method result size
default \(\left (-\frac {2}{3}-\frac {\left (\csc ^{2}\left (x \right )\right )}{3}\right ) \cot \left (x \right )\) \(12\)
parallelrisch \(\frac {2 \left (\cot ^{3}\left (x \right )\right )}{3}-\cot \left (x \right ) \left (\csc ^{2}\left (x \right )\right )\) \(16\)
risch \(\frac {4 i \left (3 \,{\mathrm e}^{2 i x}-1\right )}{3 \left ({\mathrm e}^{2 i x}-1\right )^{3}}\) \(22\)
norman \(\frac {-\frac {1}{24}-\frac {3 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{8}+\frac {3 \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{8}+\frac {\left (\tan ^{6}\left (\frac {x}{2}\right )\right )}{24}}{\tan \left (\frac {x}{2}\right )^{3}}\) \(34\)

[In]

int(1/sin(x)^4,x,method=_RETURNVERBOSE)

[Out]

(-2/3-1/3*csc(x)^2)*cot(x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 25 vs. \(2 (11) = 22\).

Time = 0.24 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.92 \[ \int \csc ^4(x) \, dx=-\frac {2 \, \cos \left (x\right )^{3} - 3 \, \cos \left (x\right )}{3 \, {\left (\cos \left (x\right )^{2} - 1\right )} \sin \left (x\right )} \]

[In]

integrate(1/sin(x)^4,x, algorithm="fricas")

[Out]

-1/3*(2*cos(x)^3 - 3*cos(x))/((cos(x)^2 - 1)*sin(x))

Sympy [A] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.54 \[ \int \csc ^4(x) \, dx=- \frac {2 \cos {\left (x \right )}}{3 \sin {\left (x \right )}} - \frac {\cos {\left (x \right )}}{3 \sin ^{3}{\left (x \right )}} \]

[In]

integrate(1/sin(x)**4,x)

[Out]

-2*cos(x)/(3*sin(x)) - cos(x)/(3*sin(x)**3)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.08 \[ \int \csc ^4(x) \, dx=-\frac {3 \, \tan \left (x\right )^{2} + 1}{3 \, \tan \left (x\right )^{3}} \]

[In]

integrate(1/sin(x)^4,x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.08 \[ \int \csc ^4(x) \, dx=-\frac {3 \, \tan \left (x\right )^{2} + 1}{3 \, \tan \left (x\right )^{3}} \]

[In]

integrate(1/sin(x)^4,x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.31 \[ \int \csc ^4(x) \, dx=-\frac {2\,\cos \left (x\right )\,{\sin \left (x\right )}^2+\cos \left (x\right )}{3\,{\sin \left (x\right )}^3} \]

[In]

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

[Out]

-(cos(x) + 2*cos(x)*sin(x)^2)/(3*sin(x)^3)