TOPIC 2.10 · STUDY

Finding the Derivatives of Tangent, Cotangent, Secant, and/or Cosecant Functions

The derivatives of the remaining trigonometric functions come from the quotient rule. $\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$, and $\frac{d}{dx}[\csc x]=-\csc x\cot x$. At $x=\frac{\pi}{4}$ the tangent formula equals $2$, and a centered quotient is about $2.03$. Angles are in radians.

FUN-3.B

Derivatives of tangent, cotangent, secant, and cosecant

Tangent, cotangent, secant, and cosecant are quotients of sine and cosine. Their derivatives are not new experiments. Write each function as a quotient, apply the quotient rule, and simplify with $\sin^2 x+\cos^2 x=1$. The results are worth memorizing, and the derivations are the reason the signs and the squares are what they are. Measure $x$ in radians, as in the sine and cosine formulas.

Start with tangent, $\tan x=\frac{\sin x}{\cos x}$. Let $u=\sin x$ and $v=\cos x$, so $u'=\cos x$ and $v'=-\sin x$. The quotient rule gives $\frac{\cos x \cdot \cos x-\sin x \cdot (-\sin x)}{\cos^2 x}=\frac{\cos^2 x+\sin^2 x}{\cos^2 x}=\frac{1}{\cos^2 x}=\sec^2 x$. The minus sign in the quotient rule meets the minus sign already in the derivative of cosine, and the two minuses produce a sum.

Graph of y = tan x from -pi to pi, with breaks at the vertical asymptotes.

Tangent is drawn from $-\pi$ to $\pi$. The graph breaks at the vertical asymptotes $x=-\frac{\pi}{2}$ and $x=\frac{\pi}{2}$, where cosine is $0$. Near $x=0$ the graph is rising with slope $\sec^2 0=1$.

Cotangent is $\frac{\cos x}{\sin x}$. Now $u'=-\sin x$ and $v'=\cos x$, so the numerator of the quotient rule is $(-\sin x)(\sin x)-(\cos x)(\cos x)=-\sin^2 x-\cos^2 x=-1$. Divide by $\sin^2 x$ to get $-\frac{1}{\sin^2 x}=-\csc^2 x$. The minus sign survives. At $x=\frac{\pi}{4}$, $\csc\frac{\pi}{4}=\sqrt{2}$, so $-\csc^2\frac{\pi}{4}=-(\sqrt{2})^2=-2$.

Secant is $\frac{1}{\cos x}$. The numerator is constant, so its derivative is $0$. The quotient rule collapses to $\frac{0 \cdot \cos x-1 \cdot (-\sin x)}{\cos^2 x}=\frac{\sin x}{\cos^2 x}$. Split the result as $\frac{1}{\cos x}\cdot\frac{\sin x}{\cos x}=\sec x\tan x$. At $x=\frac{\pi}{4}$, $\sec\frac{\pi}{4}=\sqrt{2}$ and $\tan\frac{\pi}{4}=1$, so the derivative equals $\sqrt{2}$. At $x=0$, $\sec 0 \tan 0=1 \cdot 0=0$. That matches a separate fact: secant is even, because $\sec(-x)=\sec x$, and an even function that has a derivative at $0$ must have slope $0$ there.

Cosecant is $\frac{1}{\sin x}$. The same reduction gives $\frac{0 \cdot \sin x-1 \cdot \cos x}{\sin^2 x}=-\frac{\cos x}{\sin^2 x}=-\csc x\cot x$. At $x=\frac{\pi}{4}$ this equals $-\sqrt{2}\cdot 1=-\sqrt{2}$. The pattern of signs is stable: the co-functions, cotangent and cosecant, carry the minus.

The tangent formula needs a numerical check that can tell $\sec^2 x$ from $\sec x$, because those two agree at $x=0$ and disagree elsewhere. Center a step of $0.1$ on $x=\frac{\pi}{4}$. With $\tan 0.1\approx 0.1003$, the angle-addition formula gives $\tan(\frac{\pi}{4}+0.1)=\frac{1.1003}{0.8997}\approx 1.2230$ and $\tan(\frac{\pi}{4}-0.1)=\frac{0.8997}{1.1003}\approx 0.8177$. The difference is $1.2230-0.8177=0.4053$. Divide by the full width $0.2$: $\frac{0.4053}{0.2}=2.0265$, about $2.03$. The formula $\sec^2\frac{\pi}{4}=2$ matches that quotient. The wrong target $\sec\frac{\pi}{4}=\sqrt{2}\approx 1.41$ does not.

Function Derivative Value at $x=\frac{\pi}{4}$
$\tan x$ $\sec^2 x$ $2$
$\cot x$ $-\csc^2 x$ $-2$
$\sec x$ $\sec x\tan x$ $\sqrt{2}$
$\csc x$ $-\csc x\cot x$ $-\sqrt{2}$

Use the memorized forms on ordinary problems, and rebuild one from the quotient rule if the sign is in doubt. These four functions are undefined where their denominators are zero, and so are their derivatives. Tangent and secant fail at odd multiples of $\frac{\pi}{2}$. Cotangent and cosecant fail at multiples of $\pi$. A derivative formula never fills those holes.

Key points

  • $\frac{d}{dx}[\tan x]=\sec^2 x$, from $\frac{\sin x}{\cos x}$ and the quotient rule.
  • $\frac{d}{dx}[\cot x]=-\csc^2 x$. The minus sign remains after $\sin^2 x+\cos^2 x$ is used.
  • $\frac{d}{dx}[\sec x]=\sec x\tan x$ and $\frac{d}{dx}[\csc x]=-\csc x\cot x$.
  • At $x=\frac{\pi}{4}$ the four values are $2$, $-2$, $\sqrt{2}$, and $-\sqrt{2}$.
  • A centered quotient for tangent at $\frac{\pi}{4}$ is about $2.03$, which supports $\sec^2\frac{\pi}{4}=2$ and rejects $\sqrt{2}$.

A common mistake is to differentiate $\tan x$ as $\sec x\tan x$, which is the derivative of secant, or to drop the minus on cotangent and cosecant. Tangent's derivative is $\sec^2 x$. The co-functions carry the minus.

Practice this topic