3.98 \(\int \cot ^2(x) \, dx\)

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

[Out]

-x - Cot[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0052417, antiderivative size = 8, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 4, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {3473, 8} \[ -x-\cot (x) \]

Antiderivative was successfully verified.

[In]

Int[Cot[x]^2,x]

[Out]

-x - Cot[x]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

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

Rubi steps

\begin{align*} \int \cot ^2(x) \, dx &=-\cot (x)-\int 1 \, dx\\ &=-x-\cot (x)\\ \end{align*}

Mathematica [A]  time = 0.0022213, size = 8, normalized size = 1. \[ -x-\cot (x) \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[x]^2,x]

[Out]

-x - Cot[x]

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 12, normalized size = 1.5 \begin{align*} -\cot \left ( x \right ) +{\frac{\pi }{2}}-x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(x)^2,x)

[Out]

-cot(x)+1/2*Pi-x

________________________________________________________________________________________

Maxima [A]  time = 1.40877, size = 14, normalized size = 1.75 \begin{align*} -x - \frac{1}{\tan \left (x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^2,x, algorithm="maxima")

[Out]

-x - 1/tan(x)

________________________________________________________________________________________

Fricas [B]  time = 2.09818, size = 53, normalized size = 6.62 \begin{align*} -\frac{x \sin \left (2 \, x\right ) + \cos \left (2 \, x\right ) + 1}{\sin \left (2 \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^2,x, algorithm="fricas")

[Out]

-(x*sin(2*x) + cos(2*x) + 1)/sin(2*x)

________________________________________________________________________________________

Sympy [A]  time = 0.059427, size = 8, normalized size = 1. \begin{align*} - x - \frac{\cos{\left (x \right )}}{\sin{\left (x \right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)**2,x)

[Out]

-x - cos(x)/sin(x)

________________________________________________________________________________________

Giac [B]  time = 1.06771, size = 24, normalized size = 3. \begin{align*} -x - \frac{1}{2 \, \tan \left (\frac{1}{2} \, x\right )} + \frac{1}{2} \, \tan \left (\frac{1}{2} \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^2,x, algorithm="giac")

[Out]

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