d/dxDerivCalc

Derivative of tan(x)

The derivative of tangent is the first trig result that doesn't come from memorizing a wave — it falls out of the quotient rule in three lines.

Answer
d/dx [tan(x)]  =  sec2(x)
Rule used: Quotient rule (derived), standard result
Open tan(x) in the calculator →

Step-by-step solution

1
Rewrite tangent as a quotient

tan(x) = sin(x) / cos(x), so the quotient rule applies with u = sin(x) and v = cos(x).

2
Apply the quotient rule

(u/v)′ = (u′v − uv′)/v² gives [cos(x)·cos(x) − sin(x)·(−sin(x))] / cos²(x) = [cos²(x) + sin²(x)] / cos²(x).

3
Simplify with the Pythagorean identity

The numerator is cos² + sin² = 1, leaving 1/cos²(x) = sec²(x).

Why it works

Notice that sec²(x) is always at least 1 (secant is never smaller than 1 in absolute value). That tells you tangent is always increasing on every interval where it's defined — its graph has no peaks or valleys, just branches that climb from −∞ to +∞ between the vertical asymptotes at odd multiples of π/2.

This derivation is also a template worth remembering: any time you can express a function as a ratio of things you already know how to differentiate, the quotient rule plus an identity often collapses the answer to something short. The derivatives of cot, sec, and csc all fall out of the same three-line pattern.

Common mistakes

Practice problems

Find the derivative of tan(x) + x

Answer: sec²(x) + 1.

Find the slope of tan(x) at x = 0

Answer: sec²(0) = 1 — same slope as sin(x) at the origin.

Differentiate 5 tan(x)

Answer: 5 sec²(x).

Related derivatives

sec(x)sin(x)cos(x)arctan(x)