3.2.92 \(\int \log (\sin (x)) \sin ^3(x) \, dx\) [192]

3.2.92.1 Optimal result
3.2.92.2 Mathematica [A] (verified)
3.2.92.3 Rubi [A] (verified)
3.2.92.4 Maple [A] (verified)
3.2.92.5 Fricas [A] (verification not implemented)
3.2.92.6 Sympy [B] (verification not implemented)
3.2.92.7 Maxima [B] (verification not implemented)
3.2.92.8 Giac [A] (verification not implemented)
3.2.92.9 Mupad [F(-1)]

3.2.92.1 Optimal result

Integrand size = 8, antiderivative size = 40 \[ \int \log (\sin (x)) \sin ^3(x) \, dx=-\frac {2}{3} \text {arctanh}(\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)) \]

output
-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))
 
3.2.92.2 Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.18 \[ \int \log (\sin (x)) \sin ^3(x) \, dx=\frac {1}{36} \left (24 \left (-\log \left (\cos \left (\frac {x}{2}\right )\right )+\log \left (\sin \left (\frac {x}{2}\right )\right )\right )+\cos (3 x) (-1+3 \log (\sin (x)))-3 \cos (x) (-7+9 \log (\sin (x)))\right ) \]

input
Integrate[Log[Sin[x]]*Sin[x]^3,x]
 
output
(24*(-Log[Cos[x/2]] + Log[Sin[x/2]]) + Cos[3*x]*(-1 + 3*Log[Sin[x]]) - 3*C 
os[x]*(-7 + 9*Log[Sin[x]]))/36
 
3.2.92.3 Rubi [A] (verified)

Time = 0.29 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.05, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.125, Rules used = {3034, 27, 25, 3042, 4866, 27, 363, 262, 219}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

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

\(\Big \downarrow \) 3034

\(\displaystyle -\int \frac {1}{6} \cos (x) (\cos (2 x)-5) \cot (x)dx+\frac {1}{3} \cos ^3(x) \log (\sin (x))-\cos (x) \log (\sin (x))\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {1}{6} \int -\cos (x) (5-\cos (2 x)) \cot (x)dx+\frac {1}{3} \cos ^3(x) \log (\sin (x))-\cos (x) \log (\sin (x))\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{6} \int \cos (x) (5-\cos (2 x)) \cot (x)dx+\frac {1}{3} \cos ^3(x) \log (\sin (x))-\cos (x) \log (\sin (x))\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{6} \int \frac {\cos (x)^2 (5-\cos (2 x))}{\sin (x)}dx+\frac {1}{3} \cos ^3(x) \log (\sin (x))-\cos (x) \log (\sin (x))\)

\(\Big \downarrow \) 4866

\(\displaystyle -\frac {1}{6} \int \frac {2 \cos ^2(x) \left (3-\cos ^2(x)\right )}{1-\cos ^2(x)}d\cos (x)+\frac {1}{3} \cos ^3(x) \log (\sin (x))-\cos (x) \log (\sin (x))\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {1}{3} \int \frac {\cos ^2(x) \left (3-\cos ^2(x)\right )}{1-\cos ^2(x)}d\cos (x)+\frac {1}{3} \cos ^3(x) \log (\sin (x))-\cos (x) \log (\sin (x))\)

\(\Big \downarrow \) 363

\(\displaystyle \frac {1}{3} \left (-2 \int \frac {\cos ^2(x)}{1-\cos ^2(x)}d\cos (x)-\frac {1}{3} \cos ^3(x)\right )+\frac {1}{3} \cos ^3(x) \log (\sin (x))-\cos (x) \log (\sin (x))\)

\(\Big \downarrow \) 262

\(\displaystyle \frac {1}{3} \left (-2 \left (\int \frac {1}{1-\cos ^2(x)}d\cos (x)-\cos (x)\right )-\frac {1}{3} \cos ^3(x)\right )+\frac {1}{3} \cos ^3(x) \log (\sin (x))-\cos (x) \log (\sin (x))\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {1}{3} \left (-2 (\text {arctanh}(\cos (x))-\cos (x))-\frac {1}{3} \cos ^3(x)\right )+\frac {1}{3} \cos ^3(x) \log (\sin (x))-\cos (x) \log (\sin (x))\)

input
Int[Log[Sin[x]]*Sin[x]^3,x]
 
output
(-2*(ArcTanh[Cos[x]] - Cos[x]) - Cos[x]^3/3)/3 - Cos[x]*Log[Sin[x]] + (Cos 
[x]^3*Log[Sin[x]])/3
 

3.2.92.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

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

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

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

rule 3034
Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Simp[Log[u]   w, x 
] - Int[SimplifyIntegrand[w*(D[u, x]/u), x], x] /; InverseFunctionFreeQ[w, 
x]] /; InverseFunctionFreeQ[u, x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4866
Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))]^(n_), x_Symbol] :> With[{d = Free 
Factors[Cos[c*(a + b*x)], x]}, Simp[-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] && Intege 
rQ[(n - 1)/2] && NonsumQ[u] && (EqQ[F, Sin] || EqQ[F, sin])
 
3.2.92.4 Maple [A] (verified)

Time = 1.23 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.32

method result size
parallelrisch \(\ln \left (2 \left (\frac {1}{\cos \left (2 x \right )+3+4 \cos \left (x \right )}\right )^{\frac {1}{3}}\right )+\cos \left (3 x \right ) \ln \left (\sin ^{\frac {1}{12}}\left (x \right )\right )+\cos \left (x \right ) \ln \left (\frac {1}{\sin \left (x \right )^{\frac {3}{4}}}\right )+\ln \left (\sin ^{\frac {2}{3}}\left (x \right )\right )-\frac {\cos \left (3 x \right )}{36}+\frac {7 \cos \left (x \right )}{12}+\frac {1}{3}\) \(53\)
default \(\frac {{\mathrm e}^{3 i x} \ln \left (i \left (1-{\mathrm e}^{2 i x}\right ) {\mathrm e}^{-i x}\right )}{24}-\frac {{\mathrm e}^{3 i x}}{72}+\frac {7 \,{\mathrm e}^{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}-\frac {3 \,{\mathrm e}^{i x} \ln \left (i \left (1-{\mathrm e}^{2 i x}\right ) {\mathrm e}^{-i x}\right )}{8}-\frac {3 \,{\mathrm e}^{-i x} \ln \left (i \left (1-{\mathrm e}^{2 i x}\right ) {\mathrm e}^{-i x}\right )}{8}+\frac {7 \,{\mathrm e}^{-i x}}{24}+\frac {{\mathrm e}^{-3 i x} \ln \left (i \left (1-{\mathrm e}^{2 i x}\right ) {\mathrm e}^{-i x}\right )}{24}-\frac {{\mathrm e}^{-3 i x}}{72}-\frac {\ln \left (2\right ) \left (\frac {{\mathrm e}^{3 i x}}{3}-3 \,{\mathrm e}^{i x}-3 \,{\mathrm e}^{-i x}+\frac {{\mathrm e}^{-3 i x}}{3}\right )}{8}\) \(211\)
risch \(\text {Expression too large to display}\) \(611\)

input
int(ln(sin(x))*sin(x)^3,x,method=_RETURNVERBOSE)
 
output
ln(2*(1/(cos(2*x)+3+4*cos(x)))^(1/3))+cos(3*x)*ln(sin(x)^(1/12))+cos(x)*ln 
(1/sin(x)^(3/4))+ln(sin(x)^(2/3))-1/36*cos(3*x)+7/12*cos(x)+1/3
 
3.2.92.5 Fricas [A] (verification not implemented)

Time = 0.35 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.08 \[ \int \log (\sin (x)) \sin ^3(x) \, dx=-\frac {1}{9} \, \cos \left (x\right )^{3} + \frac {1}{3} \, {\left (\cos \left (x\right )^{3} - 3 \, \cos \left (x\right )\right )} \log \left (\sin \left (x\right )\right ) + \frac {2}{3} \, \cos \left (x\right ) - \frac {1}{3} \, \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + \frac {1}{3} \, \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) \]

input
integrate(log(sin(x))*sin(x)^3,x, algorithm="fricas")
 
output
-1/9*cos(x)^3 + 1/3*(cos(x)^3 - 3*cos(x))*log(sin(x)) + 2/3*cos(x) - 1/3*l 
og(1/2*cos(x) + 1/2) + 1/3*log(-1/2*cos(x) + 1/2)
 
3.2.92.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 456 vs. \(2 (41) = 82\).

Time = 3.61 (sec) , antiderivative size = 456, normalized size of antiderivative = 11.40 \[ \int \log (\sin (x)) \sin ^3(x) \, dx=\frac {12 \log {\left (\frac {\tan {\left (\frac {x}{2} \right )}}{\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 {36 \log {\left (\frac {\tan {\left (\frac {x}{2} \right )}}{\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 {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 (2 \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 {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 {\left (2 \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 {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} \]

input
integrate(ln(sin(x))*sin(x)**3,x)
 
output
12*log(tan(x/2)/(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) + 36*log(tan(x/2)/(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) + 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(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*tan(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)
 
3.2.92.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 179 vs. \(2 (32) = 64\).

Time = 0.21 (sec) , antiderivative size = 179, normalized size of antiderivative = 4.48 \[ \int \log (\sin (x)) \sin ^3(x) \, dx=-\frac {4 \, {\left (\frac {3 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 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 )}{3 \, {\left (\frac {3 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {3 \, \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} + \frac {\sin \left (x\right )^{6}}{{\left (\cos \left (x\right ) + 1\right )}^{6}} + 1\right )}} + \frac {2 \, {\left (\frac {12 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {3 \, \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} + 5\right )}}{9 \, {\left (\frac {3 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {3 \, \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} + \frac {\sin \left (x\right )^{6}}{{\left (\cos \left (x\right ) + 1\right )}^{6}} + 1\right )}} - \frac {2}{3} \, \log \left (\frac {\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1\right ) + \frac {2}{3} \, \log \left (\frac {\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}\right ) \]

input
integrate(log(sin(x))*sin(x)^3,x, algorithm="maxima")
 
output
-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/(cos(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*si 
n(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)
 
3.2.92.8 Giac [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.02 \[ \int \log (\sin (x)) \sin ^3(x) \, dx=-\frac {1}{9} \, \cos \left (x\right )^{3} + \frac {1}{3} \, {\left (\cos \left (x\right )^{3} - 3 \, \cos \left (x\right )\right )} \log \left (\sin \left (x\right )\right ) + \frac {2}{3} \, \cos \left (x\right ) - \frac {1}{3} \, \log \left (\cos \left (x\right ) + 1\right ) + \frac {1}{3} \, \log \left (-\cos \left (x\right ) + 1\right ) \]

input
integrate(log(sin(x))*sin(x)^3,x, algorithm="giac")
 
output
-1/9*cos(x)^3 + 1/3*(cos(x)^3 - 3*cos(x))*log(sin(x)) + 2/3*cos(x) - 1/3*l 
og(cos(x) + 1) + 1/3*log(-cos(x) + 1)
 
3.2.92.9 Mupad [F(-1)]

Timed out. \[ \int \log (\sin (x)) \sin ^3(x) \, dx=\int \ln \left (\sin \left (x\right )\right )\,{\sin \left (x\right )}^3 \,d x \]

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