Integral of tan x
Write tan x = sin x / cos x and substitute u = cos x: the numerator is −du, which gives −ln|cos x|, equivalently ln|sec x|.
Step by step
Trig rule
∫tan u du = −ln|cos u|.
- f(x) = tan x
- F(x) + C
Every choice of C gives a valid antiderivative, since shifting up or down doesn’t change the slope.
Open in the integral calculator
Questions students ask
What is the integral of tan x?
.
How do you integrate tan x?
Write tan x = sin x / cos x and substitute u = cos x: the numerator is −du, which gives −ln|cos x|, equivalently ln|sec x|.
How can I check the answer?
Differentiate it: the derivative of is . CalcViz checks every antiderivative this way before showing it.