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
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.
Derivative of tan(2x)
The derivative is 2 sec²(2x). The outer tangent gives sec²(2x), and the inner angle 2x contributes a factor of 2 by the chain rule. At x=0 the slope is 2. The derivative exists where cos(2x) is nonzero.
Derivative of tan(u)
With respect to u, the derivative is sec²(u). If u=u(x) is differentiable and you are differentiating with respect to x, multiply by du/dx. For example, if u=x²+1, the derivative with respect to x is 2x sec²(x²+1), where cos(x²+1) is nonzero.
Derivative of inverse tangent, arctan(x)
The derivative of arctan(x) is 1/(1+x²) for every real x. If y=arctan(x), then tan(y)=x. Implicit differentiation gives sec²(y)·dy/dx=1, and sec²(y)=1+tan²(y)=1+x². In trigonometry, tan⁻¹(x) denotes arctan(x). The reciprocal 1/tan(x) equals cot(x) on the domain of 1/tan(x), where its derivative is −csc²(x).
Worked example with a negative inner derivative
For f(x)=tan(π/4−2x), keep the entire angle inside sec². Its inner derivative is −2, so the tangent slope at x=0 is −4. The formula applies only where cos(π/4−2x) is nonzero.
Differentiate the angle.
Multiply secant squared by the inner derivative.
Use cos(π/4)=√2/2.
Worked examples
Multiply by the inner derivative 3.
Keep the whole inner input inside sec².
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: Derivatives