Antiderivative of Trig Functions: Sin, Cos, Tan, Sec, Csc, Cot (2026)
Complete trig antiderivatives reference: sin, cos, tan, cot, sec, csc, plus 1/x, ln x, and e^x. Derivations, worked examples, and quick reference table.

Trig antiderivatives trip up more calculus students than any other integration topic. The power rule handles polynomials mechanically, but trig functions require memorizing results that do not follow an obvious pattern. Knowing why each result is what it is makes it easier to recall under pressure.
This guide covers the antiderivative of every standard trig function with derivations, worked examples, and a full reference table. For polynomial antiderivatives with step-by-step calculation, use the Antiderivative Calculator directly. The sections here focus on what that calculator does not handle: trig, exponential, and logarithmic functions.
Antiderivative Symbol and Notation
Before working through trig antiderivatives, the notation needs to be clear. The integral sign ∫ is the antiderivative symbol. A full indefinite integral is written as:
∫ f(x) dx = F(x) + C
Each part has a specific meaning:
| Symbol | Meaning |
|---|---|
| ∫ | Integral sign (elongated S, from "summa") |
| f(x) | The integrand — the function being integrated |
| dx | The variable of integration (with respect to x) |
| F(x) | The antiderivative — any function whose derivative is f(x) |
| + C | Constant of integration — represents all possible antiderivatives |
The notation ∫ f(x) dx is read as "the integral of f of x with respect to x." The dx is not optional — it tells you which variable is being integrated when more than one variable appears.
The relationship between derivative and antiderivative: if F'(x) = f(x), then ∫ f(x) dx = F(x) + C. Integration reverses differentiation.
Antiderivative of Sin x and Cos x
The simplest trig antiderivatives come from reversing the standard derivative rules for sine and cosine.
Derivative facts to remember:
- d/dx(sin x) = cos x
- d/dx(cos x) = -sin x
- d/dx(-cos x) = sin x
- d/dx(sin x) = cos x
Working backwards from these:
∫ sin x dx = -cos x + C
∫ cos x dx = sin x + C
Why -cos x for sin x? Because the derivative of -cos x is -(-sin x) = sin x. The negative sign is essential. A common exam error is writing ∫ sin x dx = cos x + C, which is wrong — differentiating cos x gives -sin x, not sin x.

Worked examples:
Find ∫ 4 sin x dx:
= 4 ∫ sin x dx [pull the constant out]
= 4(-cos x) + C
= -4 cos x + C
Verify: d/dx(-4 cos x) = -4(-sin x) = 4 sin x ✓
Find ∫ (3 cos x - sin x) dx:
= 3 ∫ cos x dx - ∫ sin x dx
= 3 sin x - (-cos x) + C
= 3 sin x + cos x + C
Verify: d/dx(3 sin x + cos x) = 3 cos x + (-sin x) = 3 cos x - sin x ✓
For compound angle forms like ∫ sin(2x) dx, a substitution is needed: let u = 2x, du = 2 dx. Then ∫ sin(2x) dx = (1/2) ∫ sin u du = -(1/2) cos(2x) + C.
Antiderivative of Tan x and Cot x
Tangent and cotangent antiderivatives both produce logarithmic results. This is because neither has a simple polynomial antiderivative — their integration requires recognizing a u-substitution pattern.
Antiderivative of tan x:
Write tan x = sin x / cos x. Let u = cos x, so du = -sin x dx, which means sin x dx = -du.
∫ tan x dx = ∫ (sin x / cos x) dx
= ∫ (-1/u) du
= -ln|u| + C
= -ln|cos x| + C
= ln|sec x| + C
Both forms (-ln|cos x| + C and ln|sec x| + C) are correct since sec x = 1/cos x.
Antiderivative of cot x:
Write cot x = cos x / sin x. Let u = sin x, so du = cos x dx.
∫ cot x dx = ∫ (cos x / sin x) dx
= ∫ (1/u) du
= ln|u| + C
= ln|sin x| + C
Quick summary:
| f(x) | ∫ f(x) dx |
|---|---|
| tan x | -ln|cos x| + C = ln|sec x| + C |
| cot x | ln|sin x| + C |
Worked example — find ∫ 5 tan x dx:
= 5 ∫ tan x dx
= 5(-ln|cos x|) + C
= -5 ln|cos x| + C
The absolute value bars matter. Without them the expression is undefined for cos x < 0.
Antiderivative of Sec x, Csc x, and Their Combinations
The antiderivatives of secant and cosecant are the most unusual results in basic calculus. They are not intuitive and must be memorized with understanding.
Antiderivative of sec²x and csc²x:
These come directly from derivative reversal:
- d/dx(tan x) = sec²x, so ∫ sec²x dx = tan x + C
- d/dx(-cot x) = csc²x, so ∫ csc²x dx = -cot x + C
Antiderivative of sec x tan x and csc x cot x:
- d/dx(sec x) = sec x tan x, so ∫ sec x tan x dx = sec x + C
- d/dx(-csc x) = csc x cot x, so ∫ csc x cot x dx = -csc x + C
Antiderivative of sec x (the full form):
The antiderivative of sec x itself requires a trick: multiply top and bottom by (sec x + tan x):
∫ sec x dx = ∫ sec x · (sec x + tan x)/(sec x + tan x) dx
= ∫ (sec²x + sec x tan x)/(sec x + tan x) dx
Let u = sec x + tan x, then du = (sec x tan x + sec²x) dx, which is exactly the numerator.
= ∫ (1/u) du
= ln|u| + C
= ln|sec x + tan x| + C
Antiderivative of csc x:
Using a similar approach with multiply by (csc x + cot x)/(csc x + cot x):
∫ csc x dx = -ln|csc x + cot x| + C
An equivalent form is ln|csc x - cot x| + C.

Complete trig antiderivative reference:
| f(x) | ∫ f(x) dx |
|---|---|
| sin x | -cos x + C |
| cos x | sin x + C |
| tan x | ln|sec x| + C |
| cot x | ln|sin x| + C |
| sec x | ln|sec x + tan x| + C |
| csc x | -ln|csc x + cot x| + C |
| sec²x | tan x + C |
| csc²x | -cot x + C |
| sec x tan x | sec x + C |
| csc x cot x | -csc x + C |
Antiderivative of 1/x and Exponential Functions
These fall outside trig but are frequently needed alongside trig integrals in calculus problems.
Antiderivative of 1/x:
∫ (1/x) dx = ln|x| + C (x not equal to 0)
This is the special case of the power rule at n = -1. The power rule gives x^(n+1)/(n+1), which requires dividing by zero when n = -1. The correct result is the natural logarithm. The absolute value is required because ln is only defined for positive arguments, but 1/x is defined for negative x too.
Antiderivative of e^x and e^(kx):
∫ e^x dx = e^x + C
∫ e^(kx) dx = (1/k) e^(kx) + C (k not equal to 0)
The factor of 1/k comes from the chain rule in reverse: d/dx[(1/k)e^(kx)] = (1/k) · k · e^(kx) = e^(kx).
Examples:
- ∫ e^(2x) dx = (1/2)e^(2x) + C
- ∫ e^(-x) dx = -e^(-x) + C
- ∫ e^(3x) dx = (1/3)e^(3x) + C
Antiderivative of ln x:
∫ ln x dx requires integration by parts (u = ln x, dv = dx):
∫ ln x dx = x ln x - x + C
Verify: d/dx(x ln x - x) = ln x + x · (1/x) - 1 = ln x + 1 - 1 = ln x ✓
Antiderivative of a^x (general exponential base):
∫ a^x dx = a^x / ln(a) + C (a > 0, a not equal to 1)
For physics problems where acceleration is a trig or polynomial function and you need to recover velocity or position by integration, the Acceleration Calculator shows how kinematic equations relate velocity and acceleration — the same relationship that integration formalizes.
Inverse Trig Antiderivatives
Two antiderivatives produce inverse trig functions and appear frequently in calculus II:
∫ 1/(1 + x²) dx = arctan x + C
∫ 1/√(1 - x²) dx = arcsin x + C
These come from reversing the derivative formulas for arctan and arcsin:
- d/dx(arctan x) = 1/(1 + x²)
- d/dx(arcsin x) = 1/√(1 - x²)
For scaled versions:
∫ 1/(a² + x²) dx = (1/a) arctan(x/a) + C
∫ 1/√(a² - x²) dx = arcsin(x/a) + C
These scaled forms appear when a substitution u = x/a is applied to the standard forms. For data fitting and function approximation methods that use polynomial bases to approximate more complex functions, the Interpolation Calculator demonstrates how polynomial approximations connect to integration.
The antiderivative of sin x is -cos x + C. This comes from reversing the derivative rule: d/dx(-cos x) = -(-sin x) = sin x. The negative sign is required. Writing cos x + C is a common error — differentiating cos x gives -sin x, not sin x.
The antiderivative of 1/x is ln|x| + C. This is the special case of the power rule at exponent -1, where the standard formula x^(n+1)/(n+1) would require dividing by zero. The absolute value is necessary because 1/x is defined for negative x but ln is only defined for positive arguments. For 1/(2x), the result is (1/2) ln|x| + C by factoring out the constant.
The antiderivative of tan x is -ln|cos x| + C, which is equivalent to ln|sec x| + C. This is found by writing tan x as sin x / cos x and applying a u-substitution with u = cos x. Both forms are correct. The absolute value bars are required since the expression is valid for values where cos x is negative.
The antiderivative symbol is ∫, called the integral sign. It is an elongated S, derived from the Latin word "summa" (sum). The full notation ∫ f(x) dx means "the antiderivative of f(x) with respect to x." The dx is not decorative — it specifies the variable of integration and is required as part of correct integral notation.
The antiderivative of ln x is x ln x - x + C. This result requires integration by parts with u = ln x and dv = dx. Verification: d/dx(x ln x - x) = ln x + x(1/x) - 1 = ln x + 1 - 1 = ln x. The result surprises many students because it involves both ln x and a polynomial term.
The antiderivative of sec²x is tan x + C. This comes from reversing the derivative rule: d/dx(tan x) = sec²x. Similarly, the antiderivative of csc²x is -cot x + C, since d/dx(-cot x) = csc²x. These two are among the most-used trig antiderivatives because sec²x and csc²x appear frequently when integrating expressions involving tangent and cotangent substitutions.


