3.187 \(\int \log (\cos (x)) \tan (x) \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0148105, antiderivative size = 9, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 3, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {3475, 4339, 2301} \[ -\frac{1}{2} \log ^2(\cos (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 3475

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

Rule 4339

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

Rule 2301

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]

Rubi steps

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

Mathematica [A]  time = 0.003192, size = 9, normalized size = 1. \[ -\frac{1}{2} \log ^2(\cos (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.009, size = 8, normalized size = 0.9 \begin{align*} -{\frac{ \left ( \ln \left ( \cos \left ( x \right ) \right ) \right ) ^{2}}{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.994473, size = 9, normalized size = 1. \begin{align*} -\frac{1}{2} \, \log \left (\cos \left (x\right )\right )^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.15888, size = 27, normalized size = 3. \begin{align*} -\frac{1}{2} \, \log \left (\cos \left (x\right )\right )^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 7.45885, size = 8, normalized size = 0.89 \begin{align*} - \frac{\log{\left (\cos{\left (x \right )} \right )}^{2}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.25589, size = 9, normalized size = 1. \begin{align*} -\frac{1}{2} \, \log \left (\cos \left (x\right )\right )^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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