Derivatives of Trigonometric Functions
The derivative of sin x is cos x, the derivative of cos x is −sin x and the derivative of tan x is 1/cos2x = sec2x, when x is measured in radians. In brief: (sin x)′ = cos x, (cos x)′ = −sin x, (tan x)′ = sec2x. Combined with the product, quotient and chain rules, these give the derivatives of expressions such as sin 3x (which is 3 cos 3x) and x sin x (which is sin x + x cos x).
The derivatives tell the slope of the sine and cosine graphs: at x = 0 the slope of sin x is cos 0 = 1, which is why sin x ≈ x for small x in radians. They describe velocity and acceleration of oscillations. This guide states the rules, proves the derivative of sine from a limit, shows how to differentiate composite expressions and gives a table of derivatives, with applications to tangent lines and extrema.
What are the derivative rules for trig functions?
- (sin x)′ = cos x
- (cos x)′ = −sin x
- (tan x)′ = sec2x = 1/cos2x
- (cot x)′ = −csc2x = −1/sin2x
- (sec x)′ = sec x tan x
- (csc x)′ = −csc x cot x
Observe the cycle: sin → cos → −sin → −cos → sin. Differentiating four times returns the original function. The formulas hold for x in radians. If x is in degrees, an extra factor π/180 appears, which is why calculus uses radians.
Why is the derivative of sin x equal to cos x?
Start from the definition: (sin x)′ = limh→0 [sin(x + h) − sin x]/h. By the sum formula, sin(x + h) = sin x cos h + cos x sin h. Then the quotient becomes sin x · (cos h − 1)/h + cos x · (sin h)/h. Two standard limits are needed: lim sin h/h = 1 and lim (cos h − 1)/h = 0 as h → 0. So the derivative is sin x · 0 + cos x · 1 = cos x.
The limit sin h/h = 1 follows from comparing the areas of a triangle and a circular sector, and it holds only for h in radians. A numerical check: h = 0.1 gives sin(0.1)/0.1 = 0.99833, and h = 0.01 gives 0.99998.
The derivative of cosine follows from cos x = sin(π/2 − x) and the chain rule: (cos x)′ = cos(π/2 − x) · (−1) = −sin x. And the derivative of tangent follows from the quotient rule: (sin x/cos x)′ = (cos x · cos x − sin x · (−sin x))/cos2x = 1/cos2x.
How do you differentiate composite expressions?
Combine the basic rules with the chain rule: (f(g(x)))′ = f′(g(x)) · g′(x), the product rule and the quotient rule.
Example 1: chain rule
(sin 3x)′ = 3 cos 3x. And (cos(x2))′ = −sin(x2) · 2x = −2x sin(x2). And (sin2x)′ = 2 sin x cos x = sin 2x.
Example 2: product rule
(x sin x)′ = sin x + x cos x. And (ex cos x)′ = ex cos x − ex sin x = ex(cos x − sin x).
Example 3: quotient rule
(sin x/x)′ = (x cos x − sin x)/x2.
Example 4: general sinusoid
For y = A sin(B(x − C)) + D: y′ = AB cos(B(x − C)). The maximum slope is |AB|. For y = 3 sin(2x − π) + 1: y′ = 6 cos(2x − π).
Example 5: tangent
(tan 2x)′ = 2 sec2(2x) = 2/cos2(2x). At x = π/8: 2/cos2(π/4) = 2/(1/2) = 4.
How do you use the derivatives?
Tangent line
Find the tangent to y = sin x at x = π/3. The point is (π/3, √3/2) and the slope is cos(π/3) = 1/2. So y − √3/2 = (1/2)(x − π/3).
Extrema
Find the extrema of f(x) = x + 2 cos x on [0, 2π]. f′(x) = 1 − 2 sin x = 0 gives sin x = 1/2, so x = π/6 or 5π/6. The second derivative f″(x) = −2 cos x: at π/6 it is −√3 < 0 (local maximum, f ≈ 0.5236 + 1.7321 = 2.2557) and at 5π/6 it is +√3 > 0 (local minimum, f ≈ 2.6180 − 1.7321 = 0.8859). The endpoints: f(0) = 2 and f(2π) ≈ 8.28. So the absolute minimum on the interval is about 0.886 and the absolute maximum is about 8.283.
Velocity and acceleration
An oscillating mass has the position x(t) = 5 sin(2t) cm. The velocity is x′(t) = 10 cos 2t and the acceleration is x″(t) = −20 sin 2t = −4x(t). The acceleration is proportional to the displacement and opposite to it, the signature of simple harmonic motion.
Small angle approximation
Near 0, sin x ≈ x and tan x ≈ x, because the slopes at 0 are cos 0 = 1 and sec20 = 1. For x = 0.1: sin 0.1 = 0.09983 and tan 0.1 = 0.10033.
Table of derivatives
| Function f(x) | Derivative f′(x) | f′ at x = 0 |
|---|---|---|
| sin x | cos x | 1 |
| cos x | −sin x | 0 |
| tan x | sec2x | 1 |
| cot x | −csc2x | undefined |
| sin kx | k cos kx | k |
| cos kx | −k sin kx | 0 |
| sin2x | 2 sin x cos x | 0 |
| x sin x | sin x + x cos x | 0 |
Where do these results come from?
The derivative of sine was known in the seventeenth century, in the work of Newton and Leibniz and, earlier, in the study of the cycloid and the sine curve by Roberval and Pascal. Newton found the series for sine and cosine, from which differentiation term by term gives the same relations. Euler later connected them with the exponential function through eix = cos x + i sin x.
Where are they used today?
The derivatives describe the current and voltage in circuits with coils and capacitors, the motion of springs and pendulums, and wave propagation. The wave equation and the equations of heat conduction have sinusoidal solutions whose derivatives are again sinusoids. In optimization, the maximum range of a projectile is found by differentiating sin 2θ, which gives θ = 45° in a vacuum.
Which mistakes are common?
Forgetting the minus sign for cosine
(cos x)′ = −sin x. A mnemonic: the “co” functions have minus signs in derivatives.
Skipping the chain rule
(sin 3x)′ is 3 cos 3x, not cos 3x. The inner derivative is a factor.
Using degrees
The formulas assume radians. With x in degrees, (sin x°)′ = (π/180) cos x°.
Mixing sin2x with sin x2
(sin2x)′ = 2 sin x cos x, but (sin(x2))′ = 2x cos(x2).