Tutorials › AP Calculus › Derivatives of Secant, Cosecant, and Cotangent

Trigonometric and Exponential Derivatives · Tutorial 144 of 999

Derivatives of Secant, Cosecant, and Cotangent

Use reciprocal identities and the quotient rule to differentiate secant, cosecant, and cotangent, while keeping their domains clear.

Intermediate 8 min read

What You'll Learn

  • Derive the secant derivative from the reciprocal of cosine.
  • Derive the cosecant derivative from the reciprocal of sine.
  • Use the quotient rule to derive the cotangent derivative.
  • State where each function and derivative formula is defined.
  • Check the formulas by evaluating derivatives at exact angles.
  • Recognize and correct sign and denominator errors.

Three Trigonometric Derivatives from Familiar Rules

Secant, cosecant, and cotangent can be expressed using sine and cosine. That makes their derivatives accessible using the derivative formulas for sine and cosine, together with the quotient rule and the derivative of a reciprocal. The main care required is to keep track of negative signs and of the points where the original functions are undefined.

Throughout, \(x\) is measured in radians. The derivatives of sine and cosine used below are \(\frac{d}{dx}\sin x=\cos x\) and \(\frac{d}{dx}\cos x=-\sin x\). We will derive each of the three formulas rather than treating them as rules to memorize without explanation.

Definition: The reciprocal trigonometric functions are \(\sec x=\frac{1}{\cos x}\), \(\csc x=\frac{1}{\sin x}\), and \(\cot x=\frac{\cos x}{\sin x}\). Each function is defined only where its denominator is nonzero.

Secant: Differentiate the Reciprocal of Cosine

Because \(\sec x=1/\cos x\), the quotient rule gives its derivative wherever \(\cos x\ne 0\). For differentiable functions \(u\) and \(v\), the quotient rule states that \(\left(\frac{u}{v}\right)'=\frac{u'v-uv'}{v^2}\), provided \(v\ne0\). Apply it with \(u(x)=1\) and \(v(x)=\cos x\):

$$ \begin{aligned} \frac{d}{dx}\sec x &=\frac{d}{dx}\left(\frac{1}{\cos x}\right)\\ &=\frac{0\cdot\cos x-1\cdot(-\sin x)}{\cos^2 x}\\ &=\frac{\sin x}{\cos^2 x}\\ &=\frac{1}{\cos x}\cdot\frac{\sin x}{\cos x}\\ &=\sec x\tan x. \end{aligned} $$

The last line uses \(\sec x=1/\cos x\) and \(\tan x=\sin x/\cos x\). Both sides are defined when \(\cos x\ne0\). Since cosine is zero at \(x=\frac{\pi}{2}+k\pi\), where \(k\in\mathbb Z\), the derivative formula applies on the domain of secant.

Derivative formula: \(\frac{d}{dx}\sec x=\sec x\tan x\), for \(x\in\mathbb R\) such that \(\cos x\ne0\). Equivalently, \(x\ne\frac{\pi}{2}+k\pi\) for every \(k\in\mathbb Z\).

Cosecant: The Negative Sign Comes from the Quotient Rule

Cosecant is the reciprocal of sine: \(\csc x=1/\sin x\). In the quotient-rule calculation, the derivative of the denominator is \(\cos x\), not \(-\cos x\). The negative sign in the final formula instead comes from the order \(u'v-uv'\) in the quotient rule.

$$ \begin{aligned} \frac{d}{dx}\csc x &=\frac{d}{dx}\left(\frac{1}{\sin x}\right)\\ &=\frac{0\cdot\sin x-1\cdot\cos x}{\sin^2 x}\\ &=-\frac{\cos x}{\sin^2 x}\\ &=-\frac{1}{\sin x}\cdot\frac{\cos x}{\sin x}\\ &=-\csc x\cot x. \end{aligned} $$

This calculation requires \(\sin x\ne0\). Sine is zero at \(x=k\pi\), where \(k\in\mathbb Z\), so cosecant and its derivative formula are defined for all real \(x\) except those values.

Derivative formula: \(\frac{d}{dx}\csc x=-\csc x\cot x\), for \(x\in\mathbb R\) such that \(\sin x\ne0\). Equivalently, \(x\ne k\pi\) for every \(k\in\mathbb Z\).

Cotangent: Apply the Quotient Rule to Cosine over Sine

For cotangent, use \(\cot x=\cos x/\sin x\). Here the numerator has derivative \(-\sin x\), while the denominator has derivative \(\cos x\). Keeping both terms in the correct order gives:

$$ \begin{aligned} \frac{d}{dx}\cot x &=\frac{(-\sin x)(\sin x)-(\cos x)(\cos x)}{\sin^2 x}\\ &=\frac{-\sin^2 x-\cos^2 x}{\sin^2 x}\\ &=-\frac{1}{\sin^2 x}\\ &=-\csc^2 x. \end{aligned} $$

The third line uses the Pythagorean identity \(\sin^2 x+\cos^2 x=1\), and the final line uses \(\csc x=1/\sin x\). The quotient and the resulting formula are defined when \(\sin x\ne0\), or \(x\ne k\pi\) for \(k\in\mathbb Z\).

Derivative formula: \(\frac{d}{dx}\cot x=-\csc^2 x\), for \(x\in\mathbb R\) such that \(\sin x\ne0\). Equivalently, \(x\ne k\pi\) for every \(k\in\mathbb Z\).

Why the Formulas Work

The derivations above are instances of one general fact: the derivative of a reciprocal is controlled by the quotient rule. If \(g\) is differentiable and \(g(x)\ne0\), then apply the quotient rule to \(1/g(x)\), treating the numerator as the constant function \(1\):

$$ \left(\frac{1}{g(x)}\right)' = \frac{0\cdot g(x)-1\cdot g'(x)}{g(x)^2} = -\frac{g'(x)}{g(x)^2}. $$

For secant, take \(g(x)=\cos x\), so \(g'(x)=-\sin x\). The two negative signs cancel, giving \(\sin x/\cos^2x=\sec x\tan x\). For cosecant, take \(g(x)=\sin x\), so \(g'(x)=\cos x\), giving \(-\cos x/\sin^2x=-\csc x\cot x\). This explains both the formulas and why their domains exclude the zeros of the corresponding denominator.

1
Write the function as a quotient.
Use \(1/\cos x\), \(1/\sin x\), or \(\cos x/\sin x\).
2
Differentiate the numerator and denominator.
Use the sine and cosine derivative formulas and preserve the quotient-rule order.
3
Simplify and state the restriction.
Use reciprocal identities and, for cotangent, \(\sin^2x+\cos^2x=1\). Exclude every input that makes the original denominator zero.

Worked Examples

Worked Example: Evaluate the Derivative of Secant at \(\frac{\pi}{4}\)

Find \(\frac{d}{dx}\sec x\) at \(x=\frac{\pi}{4}\). First confirm that the input is in the domain: \(\cos(\pi/4)=\sqrt2/2\ne0\). Apply the formula and evaluate each factor:

$$ \begin{aligned} \left.\frac{d}{dx}\sec x\right|_{x=\pi/4} &=\sec\left(\frac{\pi}{4}\right)\tan\left(\frac{\pi}{4}\right)\\ &=\frac{1}{\cos(\pi/4)}\cdot\frac{\sin(\pi/4)}{\cos(\pi/4)}\\ &=\frac{1}{\sqrt2/2}\cdot\frac{\sqrt2/2}{\sqrt2/2}\\ &=\sqrt2\cdot1\\ &=\sqrt2. \end{aligned} $$

Check directly with the quotient-rule form \(\sin x/\cos^2x\): at \(\pi/4\), this is \((\sqrt2/2)/((\sqrt2/2)^2)=(\sqrt2/2)/(1/2)=\sqrt2\). It matches the result.

Worked Example: Evaluate the Derivative of Cosecant at \(\frac{\pi}{6}\)

Find \(\frac{d}{dx}\csc x\) at \(x=\frac{\pi}{6}\). Since \(\sin(\pi/6)=1/2\ne0\), the function and derivative are defined there. Substitute exact trigonometric values:

$$ \begin{aligned} \left.\frac{d}{dx}\csc x\right|_{x=\pi/6} &=-\csc\left(\frac{\pi}{6}\right)\cot\left(\frac{\pi}{6}\right)\\ &=-\frac{1}{\sin(\pi/6)} \cdot\frac{\cos(\pi/6)}{\sin(\pi/6)}\\ &=-2\cdot\frac{\sqrt3/2}{1/2}\\ &=-2\sqrt3. \end{aligned} $$

Check with the quotient-rule expression \(-\cos x/\sin^2x\): at \(\pi/6\), it equals \(-(\sqrt3/2)/(1/2)^2=-(\sqrt3/2)/(1/4)=-2\sqrt3\), as required.

Worked Example: Evaluate the Derivative of Cotangent at \(\frac{\pi}{4}\)

Find \(\frac{d}{dx}\cot x\) at \(x=\frac{\pi}{4}\). The denominator in \(\cot x=\cos x/\sin x\) is nonzero because \(\sin(\pi/4)=\sqrt2/2\ne0\). Use the derivative formula:

$$ \begin{aligned} \left.\frac{d}{dx}\cot x\right|_{x=\pi/4} &=-\csc^2\left(\frac{\pi}{4}\right)\\ &=-\left(\frac{1}{\sin(\pi/4)}\right)^2\\ &=-\left(\frac{1}{\sqrt2/2}\right)^2\\ &=-(\sqrt2)^2\\ &=-2. \end{aligned} $$

Check using the unsimplified quotient-rule numerator: at \(\pi/4\), it is \(-\sin^2(\pi/4)-\cos^2(\pi/4)=-1/2-1/2=-1\). Dividing by \(\sin^2(\pi/4)=1/2\) gives \(-1/(1/2)=-2\), matching the formula.

Domains at a Glance

A derivative formula cannot make an original function defined at an input where the function itself has a zero denominator. The exclusions below therefore apply to both each function and its derivative formula.

FunctionDerivativeInputs excluded
\(\sec x\)\(\sec x\tan x\)\(x=\frac{\pi}{2}+k\pi,\ k\in\mathbb Z\)
\(\csc x\)\(-\csc x\cot x\)\(x=k\pi,\ k\in\mathbb Z\)
\(\cot x\)\(-\csc^2 x\)\(x=k\pi,\ k\in\mathbb Z\)

A Common Sign Error

A frequent mistake is to differentiate \(\csc x=1/\sin x\) as though the derivative were positive. For instance, an incorrect calculation might be written as

$$ \left(\frac{1}{\sin x}\right)' \overset{\text{wrong}}{=} \frac{\cos x}{\sin^2x}. $$

This misses the subtraction in the quotient rule. The correct numerator is \(0\cdot\sin x-1\cdot\cos x\), so

$$ \left(\frac{1}{\sin x}\right)' = -\frac{\cos x}{\sin^2x} = -\csc x\cot x. $$

The error is visible at \(x=\pi/6\): the incorrect expression gives \(2\sqrt3\), while the correct derivative is \(-2\sqrt3\). Keeping the quotient-rule numerator in the written work helps prevent this sign reversal.

Putting the Three Results Together

All three derivatives follow from familiar derivative rules, but their conditions matter just as much as their algebra. Secant excludes zeros of cosine; cosecant and cotangent exclude zeros of sine. At an excluded input, the original function is undefined, so its derivative is not defined there either.

Takeaway: \(\sec x\) differentiates to \(\sec x\tan x\), \(\csc x\) differentiates to \(-\csc x\cot x\), and \(\cot x\) differentiates to \(-\csc^2x\), each only where its original denominator is nonzero.

Check Your Understanding

For each question, pay attention to both the calculation and the domain.

  1. Use the quotient rule to derive \(\frac{d}{dx}\sec x=\sec x\tan x\).
  2. What sign appears in the derivative of \(\csc x\), and which quotient-rule terms produce it?
  3. At \(x=\frac{\pi}{3}\), evaluate the derivative of \(\cot x\) exactly.
  4. Which real inputs must be excluded from the domain of \(\sec x\) and its derivative?
  5. Explain why \(\cot x\) and its derivative are both undefined at \(x=k\pi\).

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon
Clinical Biostats