### 3.194 $$\int \csc ^2(x) \log (\sin (x)) \, dx$$

Optimal. Leaf size=15 $-x-\cot (x)-\cot (x) \log (\sin (x))$

[Out]

-x - Cot[x] - Cot[x]*Log[Sin[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.0205751, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 4, integrand size = 8, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.5, Rules used = {3767, 8, 2554, 3473} $-x-\cot (x)-\cot (x) \log (\sin (x))$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-x - Cot[x] - Cot[x]*Log[Sin[x]]

Rule 3767

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]

Rule 8

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

Rule 2554

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[(w*D[u, x]
)/u, x], x] /; InverseFunctionFreeQ[w, x]] /; InverseFunctionFreeQ[u, 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]

Rubi steps

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

Mathematica [A]  time = 0.0143132, size = 15, normalized size = 1. $-x-\cot (x)-\cot (x) \log (\sin (x))$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-x - Cot[x] - Cot[x]*Log[Sin[x]]

________________________________________________________________________________________

Maple [C]  time = 0.055, size = 72, normalized size = 4.8 \begin{align*}{\frac{-2\,i\ln \left ( 2\,\sin \left ( x \right ) \right ){{\rm e}^{2\,ix}}}{{{\rm e}^{2\,ix}}-1}}-{\frac{2\,i}{{{\rm e}^{2\,ix}}-1}}+i\ln \left ({{\rm e}^{ix}}-1 \right ) +i\ln \left ({{\rm e}^{ix}}+1 \right ) +{\frac{2\,i\ln \left ( 2 \right ) }{{{\rm e}^{2\,ix}}-1}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*I/(exp(2*I*x)-1)*ln(2*sin(x))*exp(2*I*x)-2*I/(exp(2*I*x)-1)+I*ln(exp(I*x)-1)+I*ln(exp(I*x)+1)+2*I*ln(2)/(ex
p(2*I*x)-1)

________________________________________________________________________________________

Maxima [B]  time = 1.50098, size = 109, normalized size = 7.27 \begin{align*} -\frac{1}{2} \,{\left (\frac{\cos \left (x\right ) + 1}{\sin \left (x\right )} - \frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )} \log \left (\frac{2 \, \sin \left (x\right )}{{\left (\frac{\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1\right )}{\left (\cos \left (x\right ) + 1\right )}}\right ) - \frac{\cos \left (x\right ) + 1}{2 \, \sin \left (x\right )} + \frac{\sin \left (x\right )}{2 \,{\left (\cos \left (x\right ) + 1\right )}} - 2 \, \arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*((cos(x) + 1)/sin(x) - sin(x)/(cos(x) + 1))*log(2*sin(x)/((sin(x)^2/(cos(x) + 1)^2 + 1)*(cos(x) + 1))) -
1/2*(cos(x) + 1)/sin(x) + 1/2*sin(x)/(cos(x) + 1) - 2*arctan(sin(x)/(cos(x) + 1))

________________________________________________________________________________________

Fricas [A]  time = 2.22429, size = 68, normalized size = 4.53 \begin{align*} -\frac{\cos \left (x\right ) \log \left (\sin \left (x\right )\right ) + x \sin \left (x\right ) + \cos \left (x\right )}{\sin \left (x\right )} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(cos(x)*log(sin(x)) + x*sin(x) + cos(x))/sin(x)

________________________________________________________________________________________

Sympy [A]  time = 106.402, size = 17, normalized size = 1.13 \begin{align*} - x - \log{\left (\sin{\left (x \right )} \right )} \cot{\left (x \right )} - \frac{\cos{\left (x \right )}}{\sin{\left (x \right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x - log(sin(x))*cot(x) - cos(x)/sin(x)

________________________________________________________________________________________

Giac [A]  time = 1.30822, size = 26, normalized size = 1.73 \begin{align*} -x - \frac{\log \left (\sin \left (x\right )\right )}{\tan \left (x\right )} - \frac{1}{\tan \left (x\right )} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x - log(sin(x))/tan(x) - 1/tan(x)