Skip to content
ihateDesmos

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.

−1.0−0.50.51.0−10100
Open in calculator
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.

  1. 1
    Write the function as (tan x)², with u = tan x.
  2. 2
    The power rule on the outside gives 2u = 2 tan x.
  3. 3
    The derivative of the inside is sec²x.
  4. 4
    Multiply 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.

Values of tan²x and its derivative
xtan²x2 tan x sec²xSlope, measured
−12.42552−10.6699−10.6699
−1/20.298446−1.41869−1.41869
0000
1/20.2984461.418691.41869
12.4255210.669910.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.

Open the derivative calculator