\(\int \cos (x) \log (\frac {1}{2} (1-\cos (2 x))) \, dx\) [179]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 16, antiderivative size = 21 \[ \int \cos (x) \log \left (\frac {1}{2} (1-\cos (2 x))\right ) \, dx=-2 \sin (x)+\log \left (\frac {1}{2} (1-\cos (2 x))\right ) \sin (x) \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {2717, 2634, 12} \[ \int \cos (x) \log \left (\frac {1}{2} (1-\cos (2 x))\right ) \, dx=\sin (x) \log \left (\frac {1}{2} (1-\cos (2 x))\right )-2 \sin (x) \]

[In]

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

[Out]

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

Rule 12

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

Rule 2634

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 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \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] (verified)

Time = 0.01 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.62 \[ \int \cos (x) \log \left (\frac {1}{2} (1-\cos (2 x))\right ) \, dx=-2 \sin (x)+\log \left (\sin ^2(x)\right ) \sin (x) \]

[In]

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

[Out]

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

Maple [C] (verified)

Result contains complex when optimal does not.

Time = 6.89 (sec) , antiderivative size = 111, normalized size of antiderivative = 5.29

method result size
default \(-\frac {i \left ({\mathrm e}^{i x} \ln \left (\left (-{\mathrm e}^{4 i x}+2 \,{\mathrm e}^{2 i x}-1\right ) {\mathrm e}^{-2 i x}\right )-2 \,{\mathrm e}^{i x}-{\mathrm e}^{-i x} \ln \left (\left (-{\mathrm e}^{4 i x}+2 \,{\mathrm e}^{2 i x}-1\right ) {\mathrm e}^{-2 i x}\right )+2 \,{\mathrm e}^{-i x}-2 \ln \left (2\right ) \left ({\mathrm e}^{i x}-{\mathrm e}^{-i x}\right )\right )}{2}\) \(111\)
risch \(\text {Expression too large to display}\) \(796\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \cos (x) \log \left (\frac {1}{2} (1-\cos (2 x))\right ) \, dx=\log \left (-\cos \left (x\right )^{2} + 1\right ) \sin \left (x\right ) - 2 \, \sin \left (x\right ) \]

[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]

\[ \int \cos (x) \log \left (\frac {1}{2} (1-\cos (2 x))\right ) \, dx=\int \log {\left (\frac {1}{2} - \frac {\cos {\left (2 x \right )}}{2} \right )} \cos {\left (x \right )}\, dx \]

[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)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \cos (x) \log \left (\frac {1}{2} (1-\cos (2 x))\right ) \, dx=\log \left (-\frac {1}{2} \, \cos \left (2 \, x\right ) + \frac {1}{2}\right ) \sin \left (x\right ) - 2 \, \sin \left (x\right ) \]

[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)

Giac [A] (verification not implemented)

none

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

[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)

Mupad [F(-1)]

Timed out. \[ \int \cos (x) \log \left (\frac {1}{2} (1-\cos (2 x))\right ) \, dx=\int \ln \left (\frac {1}{2}-\frac {\cos \left (2\,x\right )}{2}\right )\,\cos \left (x\right ) \,d x \]

[In]

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

[Out]

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