MathorynMathematical Formula Database

Calculus

Integral of tan x

The integral of tangent follows from the substitution u=cos⁡xu=\cos x. It is used in standard integration tables, arc-length problems and when integrating rational functions of sine and cosine.

∫tan⁡x dx=−ln⁡∣cos⁡x∣+C=ln⁡∣sec⁡x∣+C\int\tan x\,dx=-\ln|\cos x|+C=\ln|\sec x|+C
LaTeX\int\tan x\,dx=-\ln|\cos x|+C=\ln|\sec x|+C

Variables

xx
angle in radians, cos x ≠ 0
CC
constant of integration

Example

Compute ∫0π/4tan⁡x dx\int_0^{\pi/4}\tan x\,dx.

  1. −ln⁡cos⁡π4+ln⁡cos⁡0=−ln⁡22-\ln\cos\frac{\pi}{4}+\ln\cos0=-\ln\frac{\sqrt2}{2}.
  2. =ln⁡2=12ln⁡2=\ln\sqrt2=\frac12\ln2.

Answer: ≈0.3466\approx0.3466.

Related formulas