3.1.7 \(\int \csc ^2(x) \, dx\) [7]

Optimal. Leaf size=4 \[ -\cot (x) \]

[Out]

-cot(x)

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Int[Csc[x]^2,x]

[Out]

-Cot[x]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

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 {gather*} \begin {aligned} \text {Integral} &=-\text {Subst}(\int 1 \, dx,x,\cot (x))\\ &=-\cot (x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 4, normalized size = 1.00 \begin {gather*} -\cot (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^2,x]

[Out]

-Cot[x]

________________________________________________________________________________________

Maple [A]
time = 0.05, size = 5, normalized size = 1.25

method result size
default \(-\cot \left (x \right )\) \(5\)
parallelrisch \(-\cot \left (x \right )\) \(5\)
risch \(-\frac {2 i}{{\mathrm e}^{2 i x}-1}\) \(13\)
norman \(\frac {-\frac {1}{2}+\frac {\left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{2}}{\tan \left (\frac {x}{2}\right )}\) \(18\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-cot(x)

________________________________________________________________________________________

Maxima [A]
time = 0.38, size = 6, normalized size = 1.50 \begin {gather*} -\frac {1}{\tan \left (x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/tan(x)

________________________________________________________________________________________

Fricas [A]
time = 0.57, size = 8, normalized size = 2.00 \begin {gather*} -\frac {\cos \left (x\right )}{\sin \left (x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-cos(x)/sin(x)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 7 vs. \(2 (3) = 6\).
time = 0.02, size = 7, normalized size = 1.75 \begin {gather*} - \frac {\cos {\left (x \right )}}{\sin {\left (x \right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-cos(x)/sin(x)

________________________________________________________________________________________

Giac [A]
time = 0.45, size = 6, normalized size = 1.50 \begin {gather*} -\frac {1}{\tan \left (x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/tan(x)

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 4, normalized size = 1.00 \begin {gather*} -\mathrm {cot}\left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-cot(x)

________________________________________________________________________________________