3.184 \(\int \cos (x) \log (\sin (x)) \sin ^2(x) \, dx\)

Optimal. Leaf size=20 \[ \frac{1}{3} \sin ^3(x) \log (\sin (x))-\frac{\sin ^3(x)}{9} \]

[Out]

-Sin[x]^3/9 + (Log[Sin[x]]*Sin[x]^3)/3

________________________________________________________________________________________

Rubi [A]  time = 0.0388632, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.4, Rules used = {2564, 30, 2554, 12} \[ \frac{1}{3} \sin ^3(x) \log (\sin (x))-\frac{\sin ^3(x)}{9} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-Sin[x]^3/9 + (Log[Sin[x]]*Sin[x]^3)/3

Rule 2564

Int[cos[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(a*f), Subst[Int[
x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Sin[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2] &&
 !(IntegerQ[(m - 1)/2] && LtQ[0, m, n])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

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 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rubi steps

\begin{align*} \int \cos (x) \log (\sin (x)) \sin ^2(x) \, dx &=\frac{1}{3} \log (\sin (x)) \sin ^3(x)-\int \frac{1}{3} \cos (x) \sin ^2(x) \, dx\\ &=\frac{1}{3} \log (\sin (x)) \sin ^3(x)-\frac{1}{3} \int \cos (x) \sin ^2(x) \, dx\\ &=\frac{1}{3} \log (\sin (x)) \sin ^3(x)-\frac{1}{3} \operatorname{Subst}\left (\int x^2 \, dx,x,\sin (x)\right )\\ &=-\frac{1}{9} \sin ^3(x)+\frac{1}{3} \log (\sin (x)) \sin ^3(x)\\ \end{align*}

Mathematica [A]  time = 0.0145919, size = 15, normalized size = 0.75 \[ \frac{1}{9} \sin ^3(x) (3 \log (\sin (x))-1) \]

Antiderivative was successfully verified.

[In]

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

[Out]

((-1 + 3*Log[Sin[x]])*Sin[x]^3)/9

________________________________________________________________________________________

Maple [A]  time = 0.007, size = 17, normalized size = 0.9 \begin{align*} -{\frac{ \left ( \sin \left ( x \right ) \right ) ^{3}}{9}}+{\frac{\ln \left ( \sin \left ( x \right ) \right ) \left ( \sin \left ( x \right ) \right ) ^{3}}{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/9*sin(x)^3+1/3*ln(sin(x))*sin(x)^3

________________________________________________________________________________________

Maxima [A]  time = 0.995932, size = 22, normalized size = 1.1 \begin{align*} \frac{1}{3} \, \log \left (\sin \left (x\right )\right ) \sin \left (x\right )^{3} - \frac{1}{9} \, \sin \left (x\right )^{3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*log(sin(x))*sin(x)^3 - 1/9*sin(x)^3

________________________________________________________________________________________

Fricas [A]  time = 2.2643, size = 92, normalized size = 4.6 \begin{align*} -\frac{1}{3} \,{\left (\cos \left (x\right )^{2} - 1\right )} \log \left (\sin \left (x\right )\right ) \sin \left (x\right ) + \frac{1}{9} \,{\left (\cos \left (x\right )^{2} - 1\right )} \sin \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 5.832, size = 17, normalized size = 0.85 \begin{align*} \frac{\log{\left (\sin{\left (x \right )} \right )} \sin ^{3}{\left (x \right )}}{3} - \frac{\sin ^{3}{\left (x \right )}}{9} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(sin(x))*sin(x)**3/3 - sin(x)**3/9

________________________________________________________________________________________

Giac [A]  time = 1.17397, size = 22, normalized size = 1.1 \begin{align*} \frac{1}{3} \, \log \left (\sin \left (x\right )\right ) \sin \left (x\right )^{3} - \frac{1}{9} \, \sin \left (x\right )^{3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*log(sin(x))*sin(x)^3 - 1/9*sin(x)^3