\(\int \log (\cos (x)) \tan (x) \, dx\) [187]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 6, antiderivative size = 9 \[ \int \log (\cos (x)) \tan (x) \, dx=-\frac {1}{2} \log ^2(\cos (x)) \]

[Out]

-1/2*ln(cos(x))^2

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3556, 4424, 2338} \[ \int \log (\cos (x)) \tan (x) \, dx=-\frac {1}{2} \log ^2(\cos (x)) \]

[In]

Int[Log[Cos[x]]*Tan[x],x]

[Out]

-1/2*Log[Cos[x]]^2

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4424

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFactors[Cos[c*(a + b*x)], x]}, Dist[-(b*
c)^(-1), Subst[Int[SubstFor[1/x, 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, True]] /; FreeQ[{a, b, c}, x] && (EqQ[F, Tan] || EqQ[F, tan])

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,\cos (x)\right ) \\ & = -\frac {1}{2} \log ^2(\cos (x)) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.00 \[ \int \log (\cos (x)) \tan (x) \, dx=-\frac {1}{2} \log ^2(\cos (x)) \]

[In]

Integrate[Log[Cos[x]]*Tan[x],x]

[Out]

-1/2*Log[Cos[x]]^2

Maple [A] (verified)

Time = 1.13 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.89

method result size
derivativedivides \(-\frac {\ln \left (\cos \left (x \right )\right )^{2}}{2}\) \(8\)
default \(-\frac {\ln \left (\cos \left (x \right )\right )^{2}}{2}\) \(8\)
risch \(-i x \ln \left (2\right )+\frac {x \pi \,\operatorname {csgn}\left (i {\mathrm e}^{-i x}\right ) \operatorname {csgn}\left (i \left (1+{\mathrm e}^{2 i x}\right )\right ) \operatorname {csgn}\left (i \cos \left (x \right )\right )}{2}-\frac {x \pi \,\operatorname {csgn}\left (i {\mathrm e}^{-i x}\right ) \operatorname {csgn}\left (i \cos \left (x \right )\right )^{2}}{2}-\frac {x \pi \,\operatorname {csgn}\left (i \left (1+{\mathrm e}^{2 i x}\right )\right ) \operatorname {csgn}\left (i \cos \left (x \right )\right )^{2}}{2}+\frac {x \pi \operatorname {csgn}\left (i \cos \left (x \right )\right )^{3}}{2}+\frac {i \pi \ln \left (1+{\mathrm e}^{2 i x}\right ) \operatorname {csgn}\left (i {\mathrm e}^{-i x}\right ) \operatorname {csgn}\left (i \left (1+{\mathrm e}^{2 i x}\right )\right ) \operatorname {csgn}\left (i \cos \left (x \right )\right )}{2}-\frac {i \pi \ln \left (1+{\mathrm e}^{2 i x}\right ) \operatorname {csgn}\left (i \left (1+{\mathrm e}^{2 i x}\right )\right ) \operatorname {csgn}\left (i \cos \left (x \right )\right )^{2}}{2}-\frac {i \pi \ln \left (1+{\mathrm e}^{2 i x}\right ) \operatorname {csgn}\left (i {\mathrm e}^{-i x}\right ) \operatorname {csgn}\left (i \cos \left (x \right )\right )^{2}}{2}-i \left (i \ln \left (1+{\mathrm e}^{2 i x}\right )+x \right ) \ln \left ({\mathrm e}^{i x}\right )+\frac {i \pi \ln \left (1+{\mathrm e}^{2 i x}\right ) \operatorname {csgn}\left (i \cos \left (x \right )\right )^{3}}{2}+\ln \left (2\right ) \ln \left (1+{\mathrm e}^{2 i x}\right )-\frac {x^{2}}{2}-\frac {\ln \left (1+{\mathrm e}^{2 i x}\right )^{2}}{2}\) \(262\)

[In]

int(ln(cos(x))*tan(x),x,method=_RETURNVERBOSE)

[Out]

-1/2*ln(cos(x))^2

Fricas [A] (verification not implemented)

none

Time = 0.35 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.78 \[ \int \log (\cos (x)) \tan (x) \, dx=-\frac {1}{2} \, \log \left (\cos \left (x\right )\right )^{2} \]

[In]

integrate(log(cos(x))*tan(x),x, algorithm="fricas")

[Out]

-1/2*log(cos(x))^2

Sympy [A] (verification not implemented)

Time = 1.62 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.89 \[ \int \log (\cos (x)) \tan (x) \, dx=- \frac {\log {\left (\cos {\left (x \right )} \right )}^{2}}{2} \]

[In]

integrate(ln(cos(x))*tan(x),x)

[Out]

-log(cos(x))**2/2

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.78 \[ \int \log (\cos (x)) \tan (x) \, dx=-\frac {1}{2} \, \log \left (\cos \left (x\right )\right )^{2} \]

[In]

integrate(log(cos(x))*tan(x),x, algorithm="maxima")

[Out]

-1/2*log(cos(x))^2

Giac [A] (verification not implemented)

none

Time = 0.36 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.78 \[ \int \log (\cos (x)) \tan (x) \, dx=-\frac {1}{2} \, \log \left (\cos \left (x\right )\right )^{2} \]

[In]

integrate(log(cos(x))*tan(x),x, algorithm="giac")

[Out]

-1/2*log(cos(x))^2

Mupad [B] (verification not implemented)

Time = 1.68 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.78 \[ \int \log (\cos (x)) \tan (x) \, dx=-\frac {{\ln \left (\cos \left (x\right )\right )}^2}{2} \]

[In]

int(log(cos(x))*tan(x),x)

[Out]

-log(cos(x))^2/2