3.41 \(\int x \csc ^2(x) \, dx\)

Optimal. Leaf size=9 \[ \log (\sin (x))-x \cot (x) \]

[Out]

-(x*Cot[x]) + Log[Sin[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.0156671, antiderivative size = 9, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {4184, 3475} \[ \log (\sin (x))-x \cot (x) \]

Antiderivative was successfully verified.

[In]

Int[x*Csc[x]^2,x]

[Out]

-(x*Cot[x]) + Log[Sin[x]]

Rule 4184

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp[((c + d*x)^m*Cot[e + f*x])/f, x]
+ Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int x \csc ^2(x) \, dx &=-x \cot (x)+\int \cot (x) \, dx\\ &=-x \cot (x)+\log (\sin (x))\\ \end{align*}

Mathematica [A]  time = 0.0152348, size = 9, normalized size = 1. \[ \log (\sin (x))-x \cot (x) \]

Antiderivative was successfully verified.

[In]

Integrate[x*Csc[x]^2,x]

[Out]

-(x*Cot[x]) + Log[Sin[x]]

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 10, normalized size = 1.1 \begin{align*} -x\cot \left ( x \right ) +\ln \left ( \sin \left ( x \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*csc(x)^2,x)

[Out]

-x*cot(x)+ln(sin(x))

________________________________________________________________________________________

Maxima [B]  time = 0.944753, size = 140, normalized size = 15.56 \begin{align*} \frac{{\left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} - 2 \, \cos \left (2 \, x\right ) + 1\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) +{\left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} - 2 \, \cos \left (2 \, x\right ) + 1\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) - 4 \, x \sin \left (2 \, x\right )}{2 \,{\left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} - 2 \, \cos \left (2 \, x\right ) + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*((cos(2*x)^2 + sin(2*x)^2 - 2*cos(2*x) + 1)*log(cos(x)^2 + sin(x)^2 + 2*cos(x) + 1) + (cos(2*x)^2 + sin(2*
x)^2 - 2*cos(2*x) + 1)*log(cos(x)^2 + sin(x)^2 - 2*cos(x) + 1) - 4*x*sin(2*x))/(cos(2*x)^2 + sin(2*x)^2 - 2*co
s(2*x) + 1)

________________________________________________________________________________________

Fricas [B]  time = 2.61758, size = 61, normalized size = 6.78 \begin{align*} -\frac{x \cos \left (x\right ) - \log \left (\frac{1}{2} \, \sin \left (x\right )\right ) \sin \left (x\right )}{\sin \left (x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int x \csc ^{2}{\left (x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*csc(x)**2,x)

[Out]

Integral(x*csc(x)**2, x)

________________________________________________________________________________________

Giac [B]  time = 1.0947, size = 70, normalized size = 7.78 \begin{align*} \frac{x \tan \left (\frac{1}{2} \, x\right )^{2} + \log \left (\frac{16 \, \tan \left (\frac{1}{2} \, x\right )^{2}}{\tan \left (\frac{1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac{1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac{1}{2} \, x\right ) - x}{2 \, \tan \left (\frac{1}{2} \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*csc(x)^2,x, algorithm="giac")

[Out]

1/2*(x*tan(1/2*x)^2 + log(16*tan(1/2*x)^2/(tan(1/2*x)^4 + 2*tan(1/2*x)^2 + 1))*tan(1/2*x) - x)/tan(1/2*x)