Derivatives of the Primary Trigonometric Functions
Three rules cover the primary trig functions: \(\frac{d}{dx}[\sin x] = \cos x\), \(\frac{d}{dx}[\cos x] = -\sin x\), and \(\frac{d}{dx}[\tan x] = \sec^2 x\) — with \(x\) in radians. The first two come from the limit definition plus one special limit; the third falls out of the quotient rule you already have.
By the end you'll be able to differentiate any combination of \(\sin x\), \(\cos x\), and \(\tan x\), explain where the minus sign on cosine's derivative comes from, and say why these rules only hold in radians.
Predict: at \(x = \pi/2\), the peak of \(\sin x\) — is the slope there zero, or steep? Drag the point to the peak and read the slope. Then sweep the point across the whole window and watch the slope trace it leaves behind redraw a curve you already know.
The solid curve is the function; the point rides on it with its tangent line attached. At every position, the demo also plots a dot at height = current slope — the pair \((x, \text{slope})\). Those dots ARE the derivative, built point by point. Switch the base function to \(\cos x\) and trace again: the slope curve flips to \(-\sin x\). Hover or focus either point for exact values.
x = 0.00 · sin(0.00) = 0.000 · tangent slope = 1.000 — the slope dot sits at height 1.000
The derivatives of the primary trigonometric functions are \(\frac{d}{dx}[\sin x] = \cos x\), \(\frac{d}{dx}[\cos x] = -\sin x\), and \(\frac{d}{dx}[\tan x] = \sec^2 x\).
Start from the limit definition of the derivative. For \(\sin x\), the difference quotient is \(\frac{\sin(x+h) - \sin x}{h}\). Expanding \(\sin(x+h)\) with the angle-addition formula and regrouping gives \[ \sin x \cdot \frac{\cos h - 1}{h} + \cos x \cdot \frac{\sin h}{h}. \] Two special limits — established back when you met the Squeeze Theorem — finish the job: \(\lim_{h \to 0} \frac{\sin h}{h} = 1\) and \(\lim_{h \to 0} \frac{\cos h - 1}{h} = 0\). The first term vanishes and the second becomes \(\cos x\), so \(\frac{d}{dx}[\sin x] = \cos x\). The same steps applied to \(\cos x\) produce \(-\sin x\); the minus sign reflects that cosine is decreasing exactly where sine is positive — you saw the slope trace dip below zero there in the demo. And since \(\tan x = \frac{\sin x}{\cos x}\), the quotient rule from last lesson gives \[ \frac{d}{dx}[\tan x] = \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, \] using the Pythagorean identity \(\cos^2 x + \sin^2 x = 1\). Here \(\sec^2 x\) is shorthand for \((\sec x)^2 = 1/\cos^2 x\).
Watch the units
These clean formulas are the reason calculus runs on radians. If \(x\) were in degrees, \(\frac{d}{dx}[\sin x]\) would pick up an extra factor of \(\frac{\pi}{180}\), because the degree version of the special limit is \(\lim_{h \to 0} \frac{\sin h}{h} = \frac{\pi}{180}\), not 1. Two more pitfalls worth naming: dropping the minus sign on \(\frac{d}{dx}[\cos x] = -\sin x\), and confusing \(\sec^2 x\) (the derivative of \(\tan x\)) with \(\sec x \tan x\) (the derivative of \(\sec x\), coming next lesson).
Differentiate \(y = 3\sin x - 5\cos x + \tan x\). Go term by term with the sum rule: \(\frac{d}{dx}[3\sin x] = 3\cos x\); \(\frac{d}{dx}[-5\cos x] = -5\cdot(-\sin x) = +5\sin x\) — the two minus signs cancel; \(\frac{d}{dx}[\tan x] = \sec^2 x\). So \(y' = \) \(3\cos x + 5\sin x + \sec^2 x\).
Differentiate \(y = 2\sin x - 7\cos x + \tan x\). Term by term: \(\frac{d}{dx}[2\sin x] = 2\cos x\); \(\frac{d}{dx}[-7\cos x] = \) ____ (watch the two signs); \(\frac{d}{dx}[\tan x] = \sec^2 x\). Assemble: \(y' = 2\cos x + \) ____ \( + \sec^2 x\).
Reveal the answer
\(\frac{d}{dx}[-7\cos x] = -7 \cdot (-\sin x) = +7\sin x\) — the constant's minus and the derivative's minus cancel. So \(y' = \) \(2\cos x + 7\sin x + \sec^2 x\). If you got \(-7\sin x\), you dropped one of the two minus signs — the pitfall from the section above.
More info — why \(\sin h / h \to 1\) is doing all the work
Set \(x = 0\) in the difference quotient for \(\sin x\): it collapses to \(\frac{\sin h}{h}\), so the special limit is literally the statement that the slope of \(\sin x\) at the origin is 1 — exactly what the slope tracer shows with the point parked at \(x = 0\). That limit is proved by the Squeeze Theorem: a geometric comparison of areas traps \(\frac{\sin h}{h}\) between \(\cos h\) and 1, and since \(\cos h \to 1\), the ratio is squeezed to 1. The angle-addition expansion then transports that single slope-at-zero fact to every other \(x\), which is how one limit yields the whole rule \(\frac{d}{dx}[\sin x] = \cos x\). The OpenStax section in Dive deeper below walks the full derivation with the geometry drawn out.
Check your understanding
Differentiate \(y = 4\cos x + 2\tan x\).
A point slides along \(y = \sin x\). At \(x = \pi/2\) — the top of the wave — the tangent line is horizontal. What must the derivative curve \(\cos x\) do at \(x = \pi/2\)?
If \(x\) is measured in degrees instead of radians, what is \(\frac{d}{dx}[\sin x]\)?
The derivation of \(\frac{d}{dx}[\sin x] = \cos x\) hinges on \(\lim_{h\to 0}\frac{\sin h}{h}\). What is this limit, and how is it established?
Recap
- \(\frac{d}{dx}[\sin x] = \cos x\), \(\frac{d}{dx}[\cos x] = -\sin x\), \(\frac{d}{dx}[\tan x] = \sec^2 x\) — valid with \(x\) in radians.
- The sine and cosine rules come from the limit definition plus the special limits \(\lim_{h\to 0}\frac{\sin h}{h} = 1\) (proved by the Squeeze Theorem) and \(\lim_{h\to 0}\frac{\cos h - 1}{h} = 0\).
- \(\tan x = \frac{\sin x}{\cos x}\), so its derivative is a quotient-rule computation that simplifies to \(\sec^2 x\) via \(\cos^2 x + \sin^2 x = 1\).
- Pitfalls: degrees introduce a stray \(\frac{\pi}{180}\); cosine's derivative needs its minus sign; \(\sec^2 x\) (derivative of \(\tan x\)) is not \(\sec x \tan x\) (derivative of \(\sec x\)).
Dive deeper
- OpenStax Calculus Volume 1 — 3.5 Derivatives of Trigonometric Functions Derive d/dx[sin x] and d/dx[cos x] from the limit definition
- Paul's Online Notes — Derivatives of Trig Functions Confirm the tan derivative via the quotient rule
Sources
- Derivatives of the Primary Trigonometric Functions