3.179 \(\int \cos (x) \log (\frac{1}{2} (1-\cos (2 x))) \, dx\)

Optimal. Leaf size=21 \[ \sin (x) \log \left (\frac{1}{2} (1-\cos (2 x))\right )-2 \sin (x) \]

[Out]

-2*Sin[x] + Log[(1 - Cos[2*x])/2]*Sin[x]

________________________________________________________________________________________

Rubi [A]  time = 0.021194, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {2637, 2554, 12} \[ \sin (x) \log \left (\frac{1}{2} (1-\cos (2 x))\right )-2 \sin (x) \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]*Log[(1 - Cos[2*x])/2],x]

[Out]

-2*Sin[x] + Log[(1 - Cos[2*x])/2]*Sin[x]

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, 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 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 \left (\frac{1}{2} (1-\cos (2 x))\right ) \, dx &=\log \left (\frac{1}{2} (1-\cos (2 x))\right ) \sin (x)-\int 2 \cos (x) \, dx\\ &=\log \left (\frac{1}{2} (1-\cos (2 x))\right ) \sin (x)-2 \int \cos (x) \, dx\\ &=-2 \sin (x)+\log \left (\frac{1}{2} (1-\cos (2 x))\right ) \sin (x)\\ \end{align*}

Mathematica [A]  time = 0.0039362, size = 13, normalized size = 0.62 \[ \sin (x) \log \left (\sin ^2(x)\right )-2 \sin (x) \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]*Log[(1 - Cos[2*x])/2],x]

[Out]

-2*Sin[x] + Log[Sin[x]^2]*Sin[x]

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)*ln(1/2-1/2*cos(2*x)),x)

[Out]

I*ln(2)*exp(I*x)-I*ln(2)*exp(-I*x)-1/2*I*exp(I*x)*ln(2-2*cos(2*x))+1/2*I*exp(-I*x)*ln(2-2*cos(2*x))+I*exp(I*x)
-I*exp(-I*x)

________________________________________________________________________________________

Maxima [A]  time = 1.01556, size = 23, normalized size = 1.1 \begin{align*} \log \left (-\frac{1}{2} \, \cos \left (2 \, x\right ) + \frac{1}{2}\right ) \sin \left (x\right ) - 2 \, \sin \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*log(1/2-1/2*cos(2*x)),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.24085, size = 51, normalized size = 2.43 \begin{align*} \log \left (-\cos \left (x\right )^{2} + 1\right ) \sin \left (x\right ) - 2 \, \sin \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*log(1/2-1/2*cos(2*x)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \log{\left (\frac{1}{2} - \frac{\cos{\left (2 x \right )}}{2} \right )} \cos{\left (x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*ln(1/2-1/2*cos(2*x)),x)

[Out]

Integral(log(1/2 - cos(2*x)/2)*cos(x), x)

________________________________________________________________________________________

Giac [A]  time = 1.34837, size = 18, normalized size = 0.86 \begin{align*} \log \left (\sin \left (x\right )^{2}\right ) \sin \left (x\right ) - 2 \, \sin \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*log(1/2-1/2*cos(2*x)),x, algorithm="giac")

[Out]

log(sin(x)^2)*sin(x) - 2*sin(x)