3.78 \(\int \tan (x) \, dx\)

Optimal. Leaf size=5 \[ -\log (\cos (x)) \]

[Out]

-ln(cos(x))

________________________________________________________________________________________

Rubi [A]  time = 0.00, antiderivative size = 5, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3475} \[ -\log (\cos (x)) \]

Antiderivative was successfully verified.

[In]

Int[Tan[x],x]

[Out]

-Log[Cos[x]]

Rule 3475

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

Rubi steps

\begin {align*} \int \tan (x) \, dx &=-\log (\cos (x))\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 5, normalized size = 1.00 \[ -\log (\cos (x)) \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[x],x]

[Out]

-Log[Cos[x]]

________________________________________________________________________________________

fricas [B]  time = 0.43, size = 11, normalized size = 2.20 \[ -\frac {1}{2} \, \log \left (\frac {1}{\tan \relax (x)^{2} + 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x),x, algorithm="fricas")

[Out]

-1/2*log(1/(tan(x)^2 + 1))

________________________________________________________________________________________

giac [A]  time = 1.04, size = 6, normalized size = 1.20 \[ -\log \left ({\left | \cos \relax (x) \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x),x, algorithm="giac")

[Out]

-log(abs(cos(x)))

________________________________________________________________________________________

maple [A]  time = 0.00, size = 6, normalized size = 1.20 \[ -\ln \left (\cos \relax (x )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x),x)

[Out]

-ln(cos(x))

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 3, normalized size = 0.60 \[ \log \left (\sec \relax (x)\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x),x, algorithm="maxima")

[Out]

log(sec(x))

________________________________________________________________________________________

mupad [B]  time = 0.03, size = 5, normalized size = 1.00 \[ -\ln \left (\cos \relax (x)\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x),x)

[Out]

-log(cos(x))

________________________________________________________________________________________

sympy [A]  time = 0.06, size = 5, normalized size = 1.00 \[ - \log {\left (\cos {\relax (x )} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x),x)

[Out]

-log(cos(x))

________________________________________________________________________________________