3.192 \(\int \log (\sin (x)) \sin ^3(x) \, dx\)

Optimal. Leaf size=40 \[ -\frac {\cos ^3(x)}{9}+\frac {2 \cos (x)}{3}-\frac {2}{3} \tanh ^{-1}(\cos (x))+\frac {1}{3} \cos ^3(x) \log (\sin (x))-\cos (x) \log (\sin (x)) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.875, Rules used = {2633, 2554, 12, 4366, 459, 321, 206} \[ -\frac {\cos ^3(x)}{9}+\frac {2 \cos (x)}{3}-\frac {2}{3} \tanh ^{-1}(\cos (x))+\frac {1}{3} \cos ^3(x) \log (\sin (x))-\cos (x) \log (\sin (x)) \]

Antiderivative was successfully verified.

[In]

Int[Log[Sin[x]]*Sin[x]^3,x]

[Out]

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

Rule 12

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

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 459

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*(e*x)^(m
+ 1)*(a + b*x^n)^(p + 1))/(b*e*(m + n*(p + 1) + 1)), x] - Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(b*(m +
 n*(p + 1) + 1)), Int[(e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && NeQ[b*c - a*d, 0]
 && NeQ[m + n*(p + 1) + 1, 0]

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 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 4366

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))]^(n_), x_Symbol] :> With[{d = FreeFactors[Cos[c*(a + b*x)], x]}, -Dis
t[d/(b*c), Subst[Int[SubstFor[(1 - d^2*x^2)^((n - 1)/2), Cos[c*(a + b*x)]/d, u, x], x], x, Cos[c*(a + b*x)]/d]
, x] /; FunctionOfQ[Cos[c*(a + b*x)]/d, u, x]] /; FreeQ[{a, b, c}, x] && IntegerQ[(n - 1)/2] && NonsumQ[u] &&
(EqQ[F, Sin] || EqQ[F, sin])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 47, normalized size = 1.18 \[ \frac {1}{36} \left (24 \left (\log \left (\sin \left (\frac {x}{2}\right )\right )-\log \left (\cos \left (\frac {x}{2}\right )\right )\right )+\cos (3 x) (3 \log (\sin (x))-1)-3 \cos (x) (9 \log (\sin (x))-7)\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Log[Sin[x]]*Sin[x]^3,x]

[Out]

(24*(-Log[Cos[x/2]] + Log[Sin[x/2]]) + Cos[3*x]*(-1 + 3*Log[Sin[x]]) - 3*Cos[x]*(-7 + 9*Log[Sin[x]]))/36

________________________________________________________________________________________

fricas [A]  time = 0.50, size = 43, normalized size = 1.08 \[ -\frac {1}{9} \, \cos \relax (x)^{3} + \frac {1}{3} \, {\left (\cos \relax (x)^{3} - 3 \, \cos \relax (x)\right )} \log \left (\sin \relax (x)\right ) + \frac {2}{3} \, \cos \relax (x) - \frac {1}{3} \, \log \left (\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) + \frac {1}{3} \, \log \left (-\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.17, size = 41, normalized size = 1.02 \[ -\frac {1}{9} \, \cos \relax (x)^{3} + \frac {1}{3} \, {\left (\cos \relax (x)^{3} - 3 \, \cos \relax (x)\right )} \log \left (\sin \relax (x)\right ) + \frac {2}{3} \, \cos \relax (x) - \frac {1}{3} \, \log \left (\cos \relax (x) + 1\right ) + \frac {1}{3} \, \log \left (-\cos \relax (x) + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [C]  time = 0.34, size = 134, normalized size = 3.35 \[ \frac {{\mathrm e}^{-3 i x} \ln \left (2 \sin \relax (x )\right )}{24}-\frac {3 \,{\mathrm e}^{-i x} \ln \left (2 \sin \relax (x )\right )}{8}-\frac {3 \,{\mathrm e}^{i x} \ln \left (2 \sin \relax (x )\right )}{8}+\frac {{\mathrm e}^{3 i x} \ln \left (2 \sin \relax (x )\right )}{24}-\frac {{\mathrm e}^{-3 i x}}{72}-\frac {\ln \relax (2) {\mathrm e}^{-3 i x}}{24}+\frac {7 \,{\mathrm e}^{-i x}}{24}+\frac {3 \ln \relax (2) {\mathrm e}^{-i x}}{8}+\frac {7 \,{\mathrm e}^{i x}}{24}+\frac {3 \ln \relax (2) {\mathrm e}^{i x}}{8}-\frac {{\mathrm e}^{3 i x}}{72}-\frac {\ln \relax (2) {\mathrm e}^{3 i x}}{24}-\frac {2 \ln \left ({\mathrm e}^{i x}+1\right )}{3}+\frac {2 \ln \left ({\mathrm e}^{i x}-1\right )}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(sin(x))*sin(x)^3,x)

[Out]

1/24*exp(3*I*x)*ln(2*sin(x))-1/72*exp(3*I*x)+7/24*exp(I*x)+2/3*ln(exp(I*x)-1)-2/3*ln(exp(I*x)+1)-3/8*exp(I*x)*
ln(2*sin(x))-3/8*exp(-I*x)*ln(2*sin(x))+7/24*exp(-I*x)+1/24*exp(-3*I*x)*ln(2*sin(x))-1/72*exp(-3*I*x)-1/24*ln(
2)*exp(3*I*x)+3/8*ln(2)*exp(I*x)+3/8*ln(2)*exp(-I*x)-1/24*ln(2)*exp(-3*I*x)

________________________________________________________________________________________

maxima [B]  time = 0.46, size = 179, normalized size = 4.48 \[ -\frac {4 \, {\left (\frac {3 \, \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + 1\right )} \log \left (\frac {2 \, \sin \relax (x)}{{\left (\frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + 1\right )} {\left (\cos \relax (x) + 1\right )}}\right )}{3 \, {\left (\frac {3 \, \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + \frac {3 \, \sin \relax (x)^{4}}{{\left (\cos \relax (x) + 1\right )}^{4}} + \frac {\sin \relax (x)^{6}}{{\left (\cos \relax (x) + 1\right )}^{6}} + 1\right )}} + \frac {2 \, {\left (\frac {12 \, \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + \frac {3 \, \sin \relax (x)^{4}}{{\left (\cos \relax (x) + 1\right )}^{4}} + 5\right )}}{9 \, {\left (\frac {3 \, \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + \frac {3 \, \sin \relax (x)^{4}}{{\left (\cos \relax (x) + 1\right )}^{4}} + \frac {\sin \relax (x)^{6}}{{\left (\cos \relax (x) + 1\right )}^{6}} + 1\right )}} - \frac {2}{3} \, \log \left (\frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + 1\right ) + \frac {2}{3} \, \log \left (\frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-4/3*(3*sin(x)^2/(cos(x) + 1)^2 + 1)*log(2*sin(x)/((sin(x)^2/(cos(x) + 1)^2 + 1)*(cos(x) + 1)))/(3*sin(x)^2/(c
os(x) + 1)^2 + 3*sin(x)^4/(cos(x) + 1)^4 + sin(x)^6/(cos(x) + 1)^6 + 1) + 2/9*(12*sin(x)^2/(cos(x) + 1)^2 + 3*
sin(x)^4/(cos(x) + 1)^4 + 5)/(3*sin(x)^2/(cos(x) + 1)^2 + 3*sin(x)^4/(cos(x) + 1)^4 + sin(x)^6/(cos(x) + 1)^6
+ 1) - 2/3*log(sin(x)^2/(cos(x) + 1)^2 + 1) + 2/3*log(sin(x)^2/(cos(x) + 1)^2)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \ln \left (\sin \relax (x)\right )\,{\sin \relax (x)}^3 \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(sin(x))*sin(x)^3,x)

[Out]

int(log(sin(x))*sin(x)^3, x)

________________________________________________________________________________________

sympy [B]  time = 7.74, size = 439, normalized size = 10.98 \[ - \frac {6 \log {\left (\tan ^{2}{\left (\frac {x}{2} \right )} + 1 \right )} \tan ^{6}{\left (\frac {x}{2} \right )}}{9 \tan ^{6}{\left (\frac {x}{2} \right )} + 27 \tan ^{4}{\left (\frac {x}{2} \right )} + 27 \tan ^{2}{\left (\frac {x}{2} \right )} + 9} - \frac {18 \log {\left (\tan ^{2}{\left (\frac {x}{2} \right )} + 1 \right )} \tan ^{4}{\left (\frac {x}{2} \right )}}{9 \tan ^{6}{\left (\frac {x}{2} \right )} + 27 \tan ^{4}{\left (\frac {x}{2} \right )} + 27 \tan ^{2}{\left (\frac {x}{2} \right )} + 9} + \frac {18 \log {\left (\tan ^{2}{\left (\frac {x}{2} \right )} + 1 \right )} \tan ^{2}{\left (\frac {x}{2} \right )}}{9 \tan ^{6}{\left (\frac {x}{2} \right )} + 27 \tan ^{4}{\left (\frac {x}{2} \right )} + 27 \tan ^{2}{\left (\frac {x}{2} \right )} + 9} + \frac {6 \log {\left (\tan ^{2}{\left (\frac {x}{2} \right )} + 1 \right )}}{9 \tan ^{6}{\left (\frac {x}{2} \right )} + 27 \tan ^{4}{\left (\frac {x}{2} \right )} + 27 \tan ^{2}{\left (\frac {x}{2} \right )} + 9} + \frac {12 \log {\left (\tan {\left (\frac {x}{2} \right )} \right )} \tan ^{6}{\left (\frac {x}{2} \right )}}{9 \tan ^{6}{\left (\frac {x}{2} \right )} + 27 \tan ^{4}{\left (\frac {x}{2} \right )} + 27 \tan ^{2}{\left (\frac {x}{2} \right )} + 9} + \frac {36 \log {\left (\tan {\left (\frac {x}{2} \right )} \right )} \tan ^{4}{\left (\frac {x}{2} \right )}}{9 \tan ^{6}{\left (\frac {x}{2} \right )} + 27 \tan ^{4}{\left (\frac {x}{2} \right )} + 27 \tan ^{2}{\left (\frac {x}{2} \right )} + 9} + \frac {12 \log {\relax (2 )} \tan ^{6}{\left (\frac {x}{2} \right )}}{9 \tan ^{6}{\left (\frac {x}{2} \right )} + 27 \tan ^{4}{\left (\frac {x}{2} \right )} + 27 \tan ^{2}{\left (\frac {x}{2} \right )} + 9} + \frac {6 \tan ^{4}{\left (\frac {x}{2} \right )}}{9 \tan ^{6}{\left (\frac {x}{2} \right )} + 27 \tan ^{4}{\left (\frac {x}{2} \right )} + 27 \tan ^{2}{\left (\frac {x}{2} \right )} + 9} + \frac {36 \log {\relax (2 )} \tan ^{4}{\left (\frac {x}{2} \right )}}{9 \tan ^{6}{\left (\frac {x}{2} \right )} + 27 \tan ^{4}{\left (\frac {x}{2} \right )} + 27 \tan ^{2}{\left (\frac {x}{2} \right )} + 9} + \frac {24 \tan ^{2}{\left (\frac {x}{2} \right )}}{9 \tan ^{6}{\left (\frac {x}{2} \right )} + 27 \tan ^{4}{\left (\frac {x}{2} \right )} + 27 \tan ^{2}{\left (\frac {x}{2} \right )} + 9} + \frac {10}{9 \tan ^{6}{\left (\frac {x}{2} \right )} + 27 \tan ^{4}{\left (\frac {x}{2} \right )} + 27 \tan ^{2}{\left (\frac {x}{2} \right )} + 9} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(sin(x))*sin(x)**3,x)

[Out]

-6*log(tan(x/2)**2 + 1)*tan(x/2)**6/(9*tan(x/2)**6 + 27*tan(x/2)**4 + 27*tan(x/2)**2 + 9) - 18*log(tan(x/2)**2
 + 1)*tan(x/2)**4/(9*tan(x/2)**6 + 27*tan(x/2)**4 + 27*tan(x/2)**2 + 9) + 18*log(tan(x/2)**2 + 1)*tan(x/2)**2/
(9*tan(x/2)**6 + 27*tan(x/2)**4 + 27*tan(x/2)**2 + 9) + 6*log(tan(x/2)**2 + 1)/(9*tan(x/2)**6 + 27*tan(x/2)**4
 + 27*tan(x/2)**2 + 9) + 12*log(tan(x/2))*tan(x/2)**6/(9*tan(x/2)**6 + 27*tan(x/2)**4 + 27*tan(x/2)**2 + 9) +
36*log(tan(x/2))*tan(x/2)**4/(9*tan(x/2)**6 + 27*tan(x/2)**4 + 27*tan(x/2)**2 + 9) + 12*log(2)*tan(x/2)**6/(9*
tan(x/2)**6 + 27*tan(x/2)**4 + 27*tan(x/2)**2 + 9) + 6*tan(x/2)**4/(9*tan(x/2)**6 + 27*tan(x/2)**4 + 27*tan(x/
2)**2 + 9) + 36*log(2)*tan(x/2)**4/(9*tan(x/2)**6 + 27*tan(x/2)**4 + 27*tan(x/2)**2 + 9) + 24*tan(x/2)**2/(9*t
an(x/2)**6 + 27*tan(x/2)**4 + 27*tan(x/2)**2 + 9) + 10/(9*tan(x/2)**6 + 27*tan(x/2)**4 + 27*tan(x/2)**2 + 9)

________________________________________________________________________________________