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

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

[Out]

-Log[Cos[x]]

_______________________________________________________________________________________

Rubi [A]  time = 0.00331054, antiderivative size = 5, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 2, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5 \[ -\log (\cos (x)) \]

Antiderivative was successfully verified.

[In]  Int[Tan[x],x]

[Out]

-Log[Cos[x]]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 0.032367, size = 5, normalized size = 1. \[ - \log{\left (\cos{\left (x \right )} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(tan(x),x)

[Out]

-log(cos(x))

_______________________________________________________________________________________

Mathematica [A]  time = 0.00322319, size = 5, normalized size = 1. \[ -\log (\cos (x)) \]

Antiderivative was successfully verified.

[In]  Integrate[Tan[x],x]

[Out]

-Log[Cos[x]]

_______________________________________________________________________________________

Maple [A]  time = 0.001, size = 6, normalized size = 1.2 \[ -\ln \left ( \cos \left ( x \right ) \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(tan(x),x)

[Out]

-ln(cos(x))

_______________________________________________________________________________________

Maxima [A]  time = 1.47927, size = 4, normalized size = 0.8 \[ \log \left (\sec \left (x\right )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(tan(x),x, algorithm="maxima")

[Out]

log(sec(x))

_______________________________________________________________________________________

Fricas [A]  time = 0.250653, size = 15, normalized size = 3. \[ -\frac{1}{2} \, \log \left (\frac{1}{\tan \left (x\right )^{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))

_______________________________________________________________________________________

Sympy [A]  time = 0.039097, size = 5, normalized size = 1. \[ - \log{\left (\cos{\left (x \right )} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(tan(x),x)

[Out]

-log(cos(x))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.201731, size = 8, normalized size = 1.6 \[ -{\rm ln}\left ({\left | \cos \left (x\right ) \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(tan(x),x, algorithm="giac")

[Out]

-ln(abs(cos(x)))