---
title: "Finding the Derivatives of Tangent, Cotangent, Secant, and Cosecant | FiveStudy"
description: "Two results to memorise; the other two are their mirrors with a minus sign."
url: https://fivestudy.com/guides/ap-calculus-bc-2-10-derivatives-of-tangent-cotangent-secant-cosecant
---

[AP Calculus BC](https://fivestudy.com/ap-calculus-bc) · Study guide

# Finding the Derivatives of Tangent, Cotangent, Secant, and Cosecant

[Figure: FiveStudy]

FiveStudy

AP® Calculus BC · Unit 2 · Differentiation: Definition and Fundamental Properties

AP® Calculus BC · Unit 2 · Differentiation: Definition and Fundamental Properties

# Derivatives of *tan, cot, sec and csc*

The other four trig functions are built from sine and cosine, so their derivatives come from the quotient rule. This guide derives them, shows a pattern that makes the signs easy to remember, and uses them in tangent lines and products.

1. The four rules 2. Where they come from 3. Using the rules 4. Simplify first

The idea in one paragraph

\(\dfrac{d}{dx}[\tan x] = \sec^2 x\), \(\dfrac{d}{dx}[\cot x] = -\csc^2 x\), \(\dfrac{d}{dx}[\sec x] = \sec x\tan x\), and \(\dfrac{d}{dx}[\csc x] = -\csc x\cot x\). Each one follows from writing the function in terms of sine and cosine and using the quotient rule. The “co” functions (cotangent and cosecant) get minus signs, matching \(\frac{d}{dx}[\cos x] = -\sin x\).

## 1 The four rules

| Function | Derivative | As sine and cosine |
| --- | --- | --- |
| \(\tan x\) | \(\sec^2 x\) | \(\frac{\sin x}{\cos x}\) |
| \(\cot x\) | \(-\csc^2 x\) | \(\frac{\cos x}{\sin x}\) |
| \(\sec x\) | \(\sec x\tan x\) | \(\frac{1}{\cos x}\) |
| \(\csc x\) | \(-\csc x\cot x\) | \(\frac{1}{\sin x}\) |

A pattern for the signs

Pair each function with its “co” partner: tan with cot, sec with csc. The co-function’s derivative is the partner’s derivative with every function swapped for its co-version and a minus sign added: \(\sec^2 x \rightarrow -\csc^2 x\) and \(\sec x\tan x \rightarrow -\csc x\cot x\).

**Figure 1.** The slope of tan x is sec² x, which is never less than 1. The graph is least steep at x = 0 (slope 1) and gets steeper toward the asymptotes at ±π/2.

## 2 Where they come from

Worked Example 1 Derive the tangent rule

### \(\dfrac{d}{dx}[\tan x]\)

1. 1

   Rewrite: \(\tan x = \dfrac{\sin x}{\cos x}\). Use the quotient rule.

2. 2

   \(\dfrac{\cos x \cdot \cos x - \sin x \cdot (-\sin x)}{\cos^2 x} = \dfrac{\cos^2 x + \sin^2 x}{\cos^2 x}\).

3. 3

   The top is 1 (Pythagorean identity), so the result is \(\dfrac{1}{\cos^2 x} = \sec^2 x\).

**Answer:** \(\dfrac{d}{dx}[\tan x] = \sec^2 x\)

Worked Example 2 Derive the secant rule

### \(\dfrac{d}{dx}[\sec x]\)

1. 1

   \(\sec x = \dfrac{1}{\cos x}\). Quotient rule with top 1 (derivative 0):

2. 2

   \(\dfrac{0 \cdot \cos x - 1 \cdot (-\sin x)}{\cos^2 x} = \dfrac{\sin x}{\cos^2 x}\).

3. 3

   Split it: \(\dfrac{1}{\cos x} \cdot \dfrac{\sin x}{\cos x} = \sec x \tan x\).

**Answer:** \(\dfrac{d}{dx}[\sec x] = \sec x\tan x\)

Common Mistake 1 · Mixing up sec² x and sec x tan x

\(\tan x\) gives \(\sec^2 x\); \(\sec x\) gives \(\sec x\tan x\). One way to keep them apart: the derivative of tangent “squares the secant,” and the derivative of secant “keeps the secant and brings in the tangent.”

## 3 Using the rules

Worked Example 3 Product with tangent

### \(y = x\tan x\) at \(x = \frac{\pi}{4}\)

1. 1

   Product rule: \(y' = \tan x + x\sec^2 x\).

2. 2

   At \(\frac{\pi}{4}\): \(\tan\frac{\pi}{4} = 1\) and \(\sec^2\frac{\pi}{4} = (\sqrt2)^2 = 2\).

3. 3

   \(y' = 1 + \frac{\pi}{4} \cdot 2 = 1 + \frac{\pi}{2}\).

**Answer:** \(1 + \dfrac{\pi}{2} \approx 2.571\)

Worked Example 4 Tangent line

### \(y = \sec x\) at \(x = \frac{\pi}{3}\)

1. 1

   Point: \(\sec\frac{\pi}{3} = \dfrac{1}{\cos\frac{\pi}{3}} = \dfrac{1}{1/2} = 2\), so \(\left(\frac{\pi}{3}, 2\right)\).

2. 2

   Slope: \(\sec\frac{\pi}{3}\tan\frac{\pi}{3} = 2\sqrt3\).

**Answer:** \(y = 2 + 2\sqrt{3}\left(x - \dfrac{\pi}{3}\right)\)

**Figure 2.** At x = π/3, sec x = 2 and the slope is sec x tan x = 2 · √3. The tangent line is y = 2 + 2√3 (x − π/3).

Write it like this

“The slope of \(y = \sec x\) at \(x = \frac{\pi}{3}\) is \(\sec\frac{\pi}{3}\tan\frac{\pi}{3} = 2\sqrt3\), so the tangent line is \(y = 2 + 2\sqrt3\left(x - \frac{\pi}{3}\right)\).”

Common Mistake 2 · Dropping the minus sign on cot and csc

\(\frac{d}{dx}[\cot x] = -\csc^2 x\). A quick check: on \((0, \pi)\), \(\cot x\) falls from very large values to very negative values, so its slope must be negative.

Common Mistake 3 · Exact values with secant

\(\sec\frac{\pi}{3} = \frac{1}{\cos(\pi/3)} = 2\), not \(\frac12\). Find the cosine first, then flip it.

## 4 Simplify first

Worked Example 5 Simplify before differentiating

### \(f(x) = \dfrac{1 + \tan x}{\sec x}\)

1. 1

   Multiply out: \(\dfrac{1}{\sec x} + \dfrac{\tan x}{\sec x} = \cos x + \dfrac{\sin x}{\cos x} \cdot \cos x = \cos x + \sin x\).

2. 2

   Differentiate the simple form: \(-\sin x + \cos x\).

**Answer:** \(f'(x) = \cos x - \sin x\) (where \(\sec x\) is defined). The quotient rule would reach the same answer after much more algebra.

### Quick reference

| Function | Derivative | Exact values worth knowing |
| --- | --- | --- |
| \(\tan x\) | \(\sec^2 x\) | \(\sec^2 0 = 1\), \(\sec^2\frac{\pi}{4} = 2\), \(\sec^2\frac{\pi}{3} = 4\) |
| \(\cot x\) | \(-\csc^2 x\) | \(\csc^2\frac{\pi}{2} = 1\), \(\csc^2\frac{\pi}{4} = 2\) |
| \(\sec x\) | \(\sec x\tan x\) | \(\sec\frac{\pi}{3} = 2\), \(\tan\frac{\pi}{3} = \sqrt3\) |
| \(\csc x\) | \(-\csc x\cot x\) | \(\csc\frac{\pi}{6} = 2\), \(\cot\frac{\pi}{6} = \sqrt3\) |

FiveStudy AP® Calculus BC · Derivatives of tan, cot, sec and csc
