This learning article is currently available in English. It is not published as a translated page.

Trigonometric derivatives

Derivative of tan(x): Formula, Proof, and Examples

The tangent derivative is easiest to verify by writing tan(x)=sin(x)/cos(x). The same points excluded from tangent remain excluded from its derivative formula.

Direct answer

ddx[tan⁡x]=sec⁡2x\frac{\mathrm{d}}{\mathrm{d}x}\left[\tan x\right] = \sec^{2} x

Requires cos(x) ≠ 0; angles are measured in radians.

Proof with the quotient rule

Rewrite tangent as sin(x)/cos(x), then differentiate the quotient.

The numerator becomes cos²(x)+sin²(x), which equals 1. The denominator is cos²(x).

Thus the derivative is 1/cos²(x)=sec²(x), at points where cos(x) is nonzero.

1
(sin x / cos x)' = (cos²x + sin²x)/cos²x
2
= 1/cos²(x)
3
= sec²(x)

Worked examples

ddx[tan⁡(3 x)]\frac{\mathrm{d}}{\mathrm{d}x}\left[\tan\left(3\,x\right)\right]
3 sec2 3 x3\,\mathrm{sec}^{2}\,3\,x

Multiply by the inner derivative 3.

ddx[tan⁡(x2)]\frac{\mathrm{d}}{\mathrm{d}x}\left[\tan\left(x^{2}\right)\right]
2 x sec⁡2(x2)2\,x\,\sec^{2}\left(x^{2}\right)

Keep the whole inner input inside sec².

ddx[tan⁡2x]\frac{\mathrm{d}}{\mathrm{d}x}\left[\tan^{2} x\right]
2 tan⁡x sec⁡2x2\,\tan x\,\sec^{2} x

Use the power rule followed by the tangent rule.

Common mistakes

  • • Writing sec(x) instead of sec²(x).
  • • Omitting the restriction cos(x) ≠ 0.
  • • Forgetting the inner derivative in tan(g(x)).

Try the worked examples in the calculator

Each link opens the matching calculator with the expression, variable and required conditions already filled in.

Open the calculator without a preset: Derivadas