Derivative of tan x
The derivative of tan x is sec^2 x, by the quotient rule. The second derivative is 2 sec^2 x tan x. Defined where cos x ≠ 0.
📐 The quotient rule
d/dx tan x = sec2 x.
d/dx tan x = sec2 x, and d²/dx² tan x = 2 sec2 x tan x.
✍️ Differentiating tan x
- Write tan x = sin x / cos x.
- Quotient rule: (u/v)′ = (u′v − uv′)/v2.
- Work it: (cos x · cos x − sin x · (−sin x)) / cos2 x = (cos2 x + sin2 x) / cos2 x = 1/cos2 x = sec2 x.
- So d/dx tan x = sec2 x.
🔍 Where the rule comes from
tan x = sin x/cos x, so its derivative comes from the quotient rule and the identity sin2 x + cos2 x = 1. The result sec2 x is always at least 1: tan x never has a slope below 1, which is why its graph is steep everywhere and vertical at the asymptotes.
📍 The slope of tan x at a point, and the tangent line
f′(a) is the slope of the graph at x = a, and the tangent line there is y = f′(a)(x − a) + f(a). Values to four decimal places; the calculator below gives any other point.
| Point | tan x | sec2 x | Tangent line |
|---|---|---|---|
| x = −2 | 2.185 | 5.7744 | y = 5.7744x + 13.7338 |
| x = −1 | −1.5574 | 3.4255 | y = 3.4255x + 1.8681 |
| x = −0.5 | −0.5463 | 1.2984 | y = 1.2984x + 0.1029 |
| x = 0 | 0 | 1 | y = x |
| x = 0.5 | 0.5463 | 1.2984 | y = 1.2984x − 0.1029 |
| x = 1 | 1.5574 | 3.4255 | y = 3.4255x − 1.8681 |
| x = 2 | −2.185 | 5.7744 | y = 5.7744x − 13.7338 |
| x = 3 | −0.1425 | 1.0203 | y = 1.0203x − 3.2035 |
👪 Trigonometric functions: the derivatives side by side
The same rule, or the same trap, runs through the whole family; each row has its own worked page.
⚠️ The mistakes that lose the marks
- Guessing a pattern from sin and cos: the derivative of tan x is sec2 x, which has to be derived, not remembered as a swap.
- Dropping the minus sign on the co-functions (cos, csc, cot): each of their derivatives is negative.
🧮 Calculator
The answer appears here, with the working in words.
✏️ Five questions, answers hidden
1. Differentiate tan(2x).
Answer: 2 sec^2(2x)
2. Differentiate 3 tan x.
Answer: 3 sec^2 x
3. Differentiate x·tan x.
Answer: tan x + x·sec^2 x
4. What is the slope of y = tan x at x = π/4?
Answer: 2
5. Find the second derivative of tan x.
Answer: 2 sec^2 x tan x
📚 The class this belongs to
Derivatives are taught in AP Calculus AB and BC and in Calculus 1 in the US (the power, product, quotient and chain rules, trigonometric, exponential and logarithmic derivatives, implicit differentiation), in A-level Maths (Year 12 and 13, Pure) in the UK, in IB Mathematics Analysis and Approaches (Topic 5), in Class 11 and 12 in CBSE (NCERT Limits and Derivatives, Continuity and Differentiability) and in Mathematical Methods (Units 3 and 4) and Specialist Mathematics in Australia.
If this page is the homework and the method is not sticking, that is what a 1-on-1 class fixes: one tutor with a master's degree, one child, on a shared whiteboard, in your time zone, about US$10 to $13 an hour. How 1-on-1 online tutoring works.
