← MATH 161 MathScape 0 MATH161

Derivatives of Other Trig Functions

4 min read

Jump to a section
Reference: Stewart §2.4

Textbook Reference

Primary source OpenStax Calculus Volume 1, Section 3.5: “Derivatives of Trigonometric Functions”
Book URL https://openstax.org/details/books/calculus-volume-1

Freely available and openly licensed.


Try This First (Predict, Then Derive)

You know that $\dfrac{d}{dx}[\sin x] = \cos x$ and $\dfrac{d}{dx}[\cos x] = -\sin x$.

You also know the quotient rule: $\dfrac{d}{dx}\left[\dfrac{f}{g}\right] = \dfrac{f'g - fg'}{g^2}$.

And you know $\tan x = \dfrac{\sin x}{\cos x}$.

Predict: before reading the derivation below, try to find $\dfrac{d}{dx}[\tan x]$ yourself using the quotient rule. Write your answer in simplest form.

Predicted: $\underline{\hspace{4cm}}$.

The answer is $\sec^2 x$. Check your algebra against the derivation in Section 1 below.


Prerequisite Check

Before this lesson, make sure you can do all of the following:


Quick Reference

Function Derivative Domain
$\tan x$ $\sec^2 x$ $x \neq \pi/2 + n\pi$
$\cot x$ $-\csc^2 x$ $x \neq n\pi$
$\sec x$ $\sec x \tan x$ $x \neq \pi/2 + n\pi$
$\csc x$ $-\csc x \cot x$ $x \neq n\pi$

Pattern. The “co-” functions ($\cot$, $\csc$) have a negative sign in their derivative; the non-co functions ($\tan$, $\sec$) do not.


Key Concepts

1. Derivative of $\tan x$

Since $\tan x = \dfrac{\sin x}{\cos x}$, apply the quotient rule: \[ \frac{d}{dx}[\tan x] = \frac{(\cos x)(\cos x) - (\sin x)(-\sin x)}{\cos^2 x} = \frac{\cos^2 x + \sin^2 x}{\cos^2 x} = \frac{1}{\cos^2 x} = \sec^2 x. \]

The Pythagorean identity $\sin^2 x + \cos^2 x = 1$ is the key step.


2. Derivative of $\cot x$

$\cot x = \dfrac{\cos x}{\sin x}$. Quotient rule: \[ \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. \]


3. Derivative of $\sec x$

$\sec x = \dfrac{1}{\cos x}$. Quotient rule (or constant-over-$f$ via chain rule): \[ \frac{d}{dx}[\sec x] = \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. \]


4. Derivative of $\csc x$

$\csc x = \dfrac{1}{\sin x}$. Quotient rule: \[ \frac{d}{dx}[\csc x] = \frac{-\cos x}{\sin^2 x} = -\frac{1}{\sin x} \cdot \frac{\cos x}{\sin x} = -\csc x \cot x. \]


5. Multiple Representations

Graphical meaning of $\sec^2 x = (\tan x)'$.

The graph of $\tan x$ has vertical asymptotes at $x = \pi/2 + n\pi$. Near these asymptotes, $\tan x$ rises (or falls) steeply, so the slope $\sec^2 x$ is large. At $x = 0$, $\tan 0 = 0$ and the curve is relatively flat; the slope is $\sec^2 0 = 1$.

Since $\sec^2 x = 1 + \tan^2 x \geq 1$ always, the slope of $\tan x$ is never less than 1. The tangent function is always increasing on its domain.

Table at key values:

$x$ $\tan x$ $\sec^2 x$ (slope of $\tan x$)
$0$ $0$ $1$
$\pi/4$ $1$ $2$
$\pi/3$ $\sqrt{3}$ $4$

The slope increases as $x$ approaches $\pi/2$.


6. Ask Why: Why Is the Pattern “co-functions get a negative sign”?

The co-functions ($\cot$, $\csc$) are the “co-versions” of $\tan$ and $\sec$. In general, if $f$ and $g$ are co-functions, then $f'(x) = -g'(\pi/2 - x)$ (they are related by a reflection). The negative sign arises because the chain rule applied to the co-relationship $\cot x = \tan(\pi/2 - x)$ produces a factor of $-1$.

Explicitly: $\dfrac{d}{dx}[\cot x] = \dfrac{d}{dx}[\tan(\pi/2 - x)] = \sec^2(\pi/2 - x) \cdot (-1) = -\csc^2 x$.


Named Misconception: Forgetting the Domain

A frequent error is to differentiate $\tan x$ or $\sec x$ at a point where they are undefined. At $x = \pi/2$, $\tan x$ has a vertical asymptote; the derivative $\sec^2 x$ is also undefined there. Derivatives do not exist where the function does not exist.


Common Errors

Error Example Correction
Sign error on $\cot$ or $\csc$ Writing $+\csc^2 x$ for derivative of $\cot x$ Derivative of $\cot x$ is $-\csc^2 x$; co-functions get a negative sign
Forgetting domain Evaluating $\frac{d}{dx}[\tan x]$ at $x = \pi/2$ $\tan(\pi/2)$ is undefined; the derivative does not exist there
Confusing $\sec^2 x$ with $\sec x$ Writing $\sec x$ instead of $\sec^2 x$ for the derivative of $\tan x$ The entire denominator $\cos^2 x$ becomes $\sec^2 x$ after the Pythagorean identity

Leveled Practice

Level 1 -- Direct Differentiation

Problem 1. Differentiate: (a) $f(x) = \tan x + x$, (b) $g(x) = 3\sec x$, (c) $h(x) = \csc x - \cot x$.

Show answer

(a) $\sec^2 x + 1$.

(b) $3\sec x\tan x$.

(c) $-\csc x\cot x - (-\csc^2 x) = \csc^2 x - \csc x\cot x = \csc x(\csc x - \cot x)$.


Problem 2. Find the equation of the tangent line to $y = \tan x$ at $x = \pi/4$.

Show answer

$y(\pi/4) = 1$. $y'(\pi/4) = \sec^2(\pi/4) = (\sqrt{2})^2 = 2$.

Tangent: $y - 1 = 2(x - \pi/4)$, i.e., $y = 2x - \pi/2 + 1$.


Level 2 -- Combining Rules

Problem 3. Differentiate $f(x) = x^2\sec x$.

Show answer

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


Problem 4. Differentiate $g(x) = \dfrac{\tan x}{1 + \sin x}$.

Show answer

Quotient rule: $g'(x) = \dfrac{\sec^2 x(1+\sin x) - \tan x \cdot \cos x}{(1+\sin x)^2}$.

Simplify numerator: $\sec^2 x(1+\sin x) - \sin x$ (since $\tan x\cos x = \sin x$).

$= \dfrac{(1+\sin x)/\cos^2 x - \sin x}{(1+\sin x)^2}$.

This can be left in terms of $\sec$ and $\tan$; the exact form depends on how much simplification is expected.


Level 3 -- Low-Floor-High-Ceiling Extension

Problem 5 (Extension).

(a) (Floor) Verify $\dfrac{d}{dx}[\cot x] = -\csc^2 x$ using the identity $\cot x = \cos x / \sin x$ and the quotient rule.

(b) (Mid) Prove the identity $\sec^2 x = 1 + \tan^2 x$, then use it to write the derivative of $\tan x$ in two forms: as $\sec^2 x$ and as $1 + \tan^2 x$.

(c) (Ceiling) Let $f(x) = e^x \tan x$. Find $f'(x)$ and determine all critical points in $(0, \pi/2)$ (where $f' = 0$ or $f'$ is undefined). Discuss whether any exist.

Show answer

(a) $\frac{d}{dx}[\cos x / \sin x] = \frac{-\sin x \cdot \sin x - \cos x \cdot \cos x}{\sin^2 x} = \frac{-1}{\sin^2 x} = -\csc^2 x$.

(b) $1 + \tan^2 x = 1 + \sin^2x/\cos^2 x = (\cos^2 x + \sin^2 x)/\cos^2 x = 1/\cos^2 x = \sec^2 x$.

So the derivative of $\tan x$ can be written as $\sec^2 x$ or equivalently $1 + \tan^2 x$.

(c) $f'(x) = e^x\tan x + e^x\sec^2 x = e^x(\tan x + \sec^2 x)$.

Since $e^x > 0$ always, $f'(x) = 0$ requires $\tan x + \sec^2 x = 0$. Using $\sec^2 x = 1 + \tan^2 x$: need $\tan x + 1 + \tan^2 x = 0$, i.e., $\tan^2 x + \tan x + 1 = 0$. The discriminant is $1 - 4 = -3 < 0$: no real solutions. So $f'(x) \neq 0$ on $(0, \pi/2)$. Also $f'$ is undefined at $x = \pi/2$ (endpoint, not interior). No critical points.


Common Misconceptions

Common misconception

$\sec x$ is the inverse cosine function. The secant function is the reciprocal of cosine: $\sec x = 1/\cos x$. The inverse cosine is written $\cos^{-1} x$ or $\arccos x$ and is a completely different function. The notation $\sec x$ and $\cos^{-1} x$ are not interchangeable. This matters for derivatives: $(\sec x)' = \sec x \tan x$, while $(\arccos x)' = -1/\sqrt{1-x^2}$.

Common misconception

differentiating $\tan(3x)$ gives $\sec^2(3x)$. The formula $(\tan u)' = \sec^2 u$ applies only when $u$ itself is the variable being differentiated. When $u = 3x$, the chain rule requires multiplying by the derivative of the inner function: $\frac{d}{dx}[\tan(3x)] = \sec^2(3x) \cdot 3$. Omitting the chain rule factor is one of the most common errors with trig derivatives.

Mastery Checklist

You have mastered this skill when you can do all of the following without referring to notes:


Mental Model

All four derivative formulas here follow from the same recipe: write the function in terms of $\sin$ and $\cos$, apply the quotient rule, use $\sin^2 + \cos^2 = 1$ to simplify the numerator, and factor back into trig notation.

The pattern “co-functions get a negative sign” is a compact memory rule grounded in the fact that co-functions are related by replacing $x$ with $\pi/2 - x$, which introduces a factor of $-1$ from the chain rule.


Connections

Within Calculus I (MATH161)


Back to Calculus I Skills | Previous: Derivatives of Sine and Cosine | Next: Trig Differentiation Practice