Finding the Derivatives of Tangent, Cotangent, Secant, and Cosecant Functions
students, today you will learn how to differentiate the four trigonometric functions that are less familiar than $\sin x$ and $\cos x$: $\tan x$, $\cot x$, $\sec x$, and $\csc x$ π. These derivatives appear often in AP Calculus AB because they connect trigonometry, limits, the product and quotient rules, and the idea of differentiability. By the end of this lesson, you should be able to:
- State the derivative formulas for $\tan x$, $\cot x$, $\sec x$, and $\csc x$
- Use these formulas in combination with other differentiation rules
- Explain why these functions are differentiable only where they are defined
- Apply the formulas to real situations involving angles, waves, and motion
A strong calculus student does not just memorize formulas. Instead, students, you should understand where the formulas come from and when they work.
Derivatives of Tangent and Cotangent
The derivative of $\tan x$ is one of the most important trigonometric derivative formulas in calculus:
$$\frac{d}{dx}(\tan x)=\sec^2 x$$
This formula tells us that the slope of the tangent function is always nonnegative wherever $\tan x$ is defined. That makes sense because the graph of $\tan x$ rises steeply between its vertical asymptotes.
One common way to derive this result is to rewrite tangent as a quotient:
$$\tan x=\frac{\sin x}{\cos x}$$
Then use the quotient rule:
$$\frac{d}{dx}\left(\frac{u}{v}\right)=\frac{v u'-u v'}{v^2}$$
Let $u=\sin x$ and $v=\cos x$. Then $u'=\cos x$ and $v'=-\sin x$. Substituting gives
$$\frac{d}{dx}(\tan x)=\frac{\cos x\cdot \cos x-\sin x\cdot(-\sin x)}{\cos^2 x}$$
which simplifies to
$$\frac{\cos^2 x+\sin^2 x}{\cos^2 x}=\frac{1}{\cos^2 x}=\sec^2 x$$
This is a great example of how trig identities and derivative rules work together.
Now for cotangent:
$$\frac{d}{dx}(\cot x)=-\csc^2 x$$
Since
$$\cot x=\frac{\cos x}{\sin x}$$
we again use the quotient rule. Let $u=\cos x$ and $v=\sin x$. Then $u'=-\sin x$ and $v'=\cos x$. So
$$\frac{d}{dx}(\cot x)=\frac{\sin x(-\sin x)-\cos x(\cos x)}{\sin^2 x}$$
which becomes
$$\frac{-\sin^2 x-\cos^2 x}{\sin^2 x}=-\frac{1}{\sin^2 x}=-\csc^2 x$$
Notice the negative sign. This means the cotangent graph decreases wherever it is defined. That matches the graphβs shape between its asymptotes.
Example 1
Differentiate $f(x)=3\tan x-2\cot x$.
Use the constant multiple rule and the formulas above:
$$f'(x)=3\sec^2 x-2(-\csc^2 x)$$
so
$$f'(x)=3\sec^2 x+2\csc^2 x$$
This result is simpler than if we tried to use the quotient rule on the whole function. That is why memorizing these core formulas is useful.
Derivatives of Secant and Cosecant
The derivatives of $\sec x$ and $\csc x$ are a little trickier, but they follow from the product rule and the derivatives of $\sin x$ and $\cos x$.
The derivative of secant is
$$\frac{d}{dx}(\sec x)=\sec x\tan x$$
To see why, rewrite secant as
$$\sec x=\frac{1}{\cos x}$$
or as a product involving a reciprocal. Using the quotient rule on $\frac{1}{\cos x}$ gives
$$\frac{d}{dx}(\sec x)=\frac{0\cdot \cos x-1\cdot(-\sin x)}{\cos^2 x}=\frac{\sin x}{\cos^2 x}$$
Now rewrite this as
$$\frac{\sin x}{\cos x}\cdot\frac{1}{\cos x}=\tan x\sec x$$
So the derivative is
$$\frac{d}{dx}(\sec x)=\sec x\tan x$$
This formula is a good reminder that derivatives can reveal how steeply a function grows. Since $\sec x$ becomes very large near its vertical asymptotes, its slope also grows very quickly.
For cosecant:
$$\frac{d}{dx}(\csc x)=-\csc x\cot x$$
Since
$$\csc x=\frac{1}{\sin x}$$
we use the quotient rule:
$$\frac{d}{dx}(\csc x)=\frac{0\cdot \sin x-1\cdot\cos x}{\sin^2 x}=-\frac{\cos x}{\sin^2 x}$$
Rewrite it as
$$-\frac{\cos x}{\sin x}\cdot\frac{1}{\sin x}=-\cot x\csc x$$
So the derivative is
$$\frac{d}{dx}(\csc x)=-\csc x\cot x$$
Example 2
Differentiate $g(x)=\sec x+\csc x$.
Apply the sum rule:
$$g'(x)=\sec x\tan x-\csc x\cot x$$
This derivative combines two trig product expressions. You do not need to expand them unless a problem asks you to simplify further.
Domain, Differentiability, and Continuity
students, one of the most important AP Calculus ideas is that a function must be defined at a point to have a derivative there. If a function is not continuous at a point, then it is not differentiable there.
That matters a lot for these trig functions:
- $\tan x$ is undefined where $\cos x=0$, such as at $x=\frac{\pi}{2}+k\pi$
- $\cot x$ is undefined where $\sin x=0$, such as at $x=k\pi$
- $\sec x$ is undefined where $\cos x=0$
- $\csc x$ is undefined where $\sin x=0$
Here $k$ is any integer.
Because these functions have vertical asymptotes at those values, they are not continuous there and therefore not differentiable there. On intervals where they are defined, however, they are differentiable and their derivatives are given by the formulas above.
This is a key connection in calculus: differentiability implies continuity, but continuity alone does not guarantee differentiability. For example, $\tan x$ is continuous and differentiable on an interval like $\left(-\frac{\pi}{2},\frac{\pi}{2}\right)$, but not at $x=\frac{\pi}{2}$.
Example 3
Find the points where $h(x)=\tan x$ is not differentiable.
Since $\tan x=\frac{\sin x}{\cos x}$, it is undefined when $\cos x=0$.
So $h(x)$ is not differentiable at
$$x=\frac{\pi}{2}+k\pi$$
for any integer $k$.
Using the Derivative Rules in AP Problems
On the AP exam, you may need to combine these formulas with the chain rule, product rule, quotient rule, or implicit differentiation.
For example, if a function is
$$y=\tan(3x)$$
then the chain rule gives
$$\frac{dy}{dx}=\sec^2(3x)\cdot 3=3\sec^2(3x)$$
If a function is
$$y=x\sec x$$
then the product rule gives
$$\frac{dy}{dx}=1\cdot\sec x+x\cdot\sec x\tan x$$
so
$$\frac{dy}{dx}=\sec x+x\sec x\tan x$$
If a function is
$$y=\frac{\tan x}{x}$$
then the quotient rule gives
$$\frac{dy}{dx}=\frac{x\sec^2 x-\tan x}{x^2}$$
These examples show that the four trig derivatives are building blocks. Once you know them, you can solve many more complicated derivative problems.
Real-World Connection
Imagine students is modeling the angle of a rotating device. If the relationship includes $\tan x$ or $\sec x$, then the derivative tells how quickly the output changes as the angle changes. In physics and engineering, steep changes matter because they can indicate instability or rapid growth. For example, a very large value of $\sec x$ near an asymptote corresponds to a very large slope, which can signal that a graph is changing extremely fast.
Conclusion
The derivatives of $\tan x$, $\cot x$, $\sec x$, and $\csc x$ are core AP Calculus AB formulas that connect trigonometry, limits, and differentiation rules. The four formulas are:
$$\frac{d}{dx}(\tan x)=\sec^2 x$$
$$\frac{d}{dx}(\cot x)=-\csc^2 x$$
$$\frac{d}{dx}(\sec x)=\sec x\tan x$$
$$\frac{d}{dx}(\csc x)=-\csc x\cot x$$
To use them well, students, remember three big ideas: first, know where each function is defined; second, remember that differentiability requires continuity; and third, practice combining these formulas with the chain rule, product rule, and quotient rule. Mastering these derivatives helps you move confidently through many AP Calculus AB problems. β
Study Notes
- $\tan x=\frac{\sin x}{\cos x}$ and $\cot x=\frac{\cos x}{\sin x}$ are often proved using the quotient rule.
- The derivatives you must know are:
- $\frac{d}{dx}(\tan x)=\sec^2 x$
- $\frac{d}{dx}(\cot x)=-\csc^2 x$
- $\frac{d}{dx}(\sec x)=\sec x\tan x$
- $\frac{d}{dx}(\csc x)=-\csc x\cot x$
- $\tan x$ and $\sec x$ are undefined when $\cos x=0$.
- $\cot x$ and $\csc x$ are undefined when $\sin x=0$.
- If a function is not continuous at a point, it is not differentiable there.
- Use the chain rule for expressions like $\tan(3x)$ or $\sec(x^2)$.
- Use the product rule for expressions like $x\sec x$.
- Use the quotient rule for expressions like $\frac{\tan x}{x}$.
- These derivatives are essential building blocks for more advanced AP Calculus AB problems.
