Derivative of tan²x
Updated 6 November 2026 · Checked numerically by the ihateDesmos engine
The derivative of tan²x
ddx(tan(x)2)=2tan(x)sec(x)2
The derivative of tan²x is 2 tan x sec²x. It is the same as the derivative of sec²x, because the two differ by a constant: sec²x = tan²x + 1.
y=tan(x)2
in blue and its derivative y=2tan(x)sec(x)2
in red. Defined for x ≠ π/2 + nπ.How to find the derivative of tan²x
Method: chain rule.
- 1Write the function as (tan x)², with u = tan x.
- 2The power rule on the outside gives 2u = 2 tan x.
- 3The derivative of the inside is sec²x.
- 4Multiply them: 2 tan x sec²x.
What it means on the graph
tan²x is never negative and has a minimum of 0 at x = 0. The derivative is negative to the left of that minimum and positive to the right, with vertical asymptotes wherever tan x has them.
In the window shown, the derivative is zero at x = 0. Those are the points where the graph of tan²x has a horizontal tangent.
Table of values
The derivative column uses the formula. The last column estimates the slope directly from the original function, as an independent check.
| x | tan²x | 2 tan x sec²x | Slope, measured |
|---|---|---|---|
| −1 | 2.42552 | −10.6699 | −10.6699 |
| −1/2 | 0.298446 | −1.41869 | −1.41869 |
| 0 | 0 | 0 | 0 |
| 1/2 | 0.298446 | 1.41869 | 1.41869 |
| 1 | 2.42552 | 10.6699 | 10.6699 |
Common mistakes
- Writing 2 tan x, by forgetting the factor of sec²x.
Frequently asked questions
What is the derivative of tan²x?
The derivative of tan²x is 2 tan x sec²x, for x ≠ π/2 + nπ.
Keep going
Differentiate any function
Type your own function into the derivative calculator and see every rule applied, step by step.