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

Optimal. Leaf size=13 \[ -\cot (x)-\frac {\cot ^3(x)}{3} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3852} \begin {gather*} -\frac {1}{3} \cot ^3(x)-\cot (x) \end {gather*}

Antiderivative was successfully verified.

[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*} \int \csc ^4(x) \, dx &=-\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]
time = 0.00, size = 17, normalized size = 1.31 \begin {gather*} -\frac {2 \cot (x)}{3}-\frac {1}{3} \cot (x) \csc ^2(x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^4,x]

[Out]

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

________________________________________________________________________________________

Mathics [A]
time = 1.96, size = 15, normalized size = 1.15 \begin {gather*} \frac {-2}{3 \text {Tan}\left [x\right ]}-\frac {\text {Cos}\left [x\right ]}{3 \text {Sin}\left [x\right ]^3} \end {gather*}

Antiderivative was successfully verified.

[In]

mathics('Integrate[1/Sin[x]^4,x]')

[Out]

-2 / (3 Tan[x]) - Cos[x] / (3 Sin[x] ^ 3)

________________________________________________________________________________________

Maple [A]
time = 0.05, size = 12, normalized size = 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\)
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\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 14, normalized size = 1.08 \begin {gather*} -\frac {3 \, \tan \left (x\right )^{2} + 1}{3 \, \tan \left (x\right )^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 25 vs. \(2 (11) = 22\).
time = 0.33, size = 25, normalized size = 1.92 \begin {gather*} -\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 )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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]
time = 0.03, size = 20, normalized size = 1.54 \begin {gather*} - \frac {2 \cos {\left (x \right )}}{3 \sin {\left (x \right )}} - \frac {\cos {\left (x \right )}}{3 \sin ^{3}{\left (x \right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.00, size = 18, normalized size = 1.38 \begin {gather*} \frac {2 \left (-3 \tan ^{2}x-1\right )}{6 \tan ^{3}x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 17, normalized size = 1.31 \begin {gather*} -\frac {2\,\cos \left (x\right )\,{\sin \left (x\right )}^2+\cos \left (x\right )}{3\,{\sin \left (x\right )}^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________