Introduction

I previously introduced differentiation as a way to find a rate of change—or, from a geometric perspective, the slope of a tangent line. Differentiating position with respect to time gives velocity as a function of time, and differentiating velocity with respect to time gives acceleration as a function of time. (That is starting to sound like a tongue twister.)

In the opening part of high-school kinematics, polynomial functions are often used to explain how position, velocity, and acceleration depend on time.

This time, however, I want to look at the derivatives of two trigonometric functions that matter greatly in physics: the sine function Equation or diagram: y = sin x and the cosine function Equation or diagram: y = cos x.

Why do we need the derivatives of sine and cosine? Are derivatives of polynomial functions not enough?

The reason is simple harmonic motion (S.H.M.), a dedicated topic in upper-secondary physics. Its position, velocity, and acceleration as functions of time are frequently expressed with trigonometric functions.

Conversely, integration can also be used to recover the relationships among these functions.

For the basic ideas of differentiation and integration, see “A Gentle Introduction to Differentiation” and “A Gentle Introduction to Integration.”

When simple harmonic motion is introduced, limited class time often means the lesson simply states that the derivative of sine is cosine and the derivative of cosine is negative sine, then moves on.

After thinking it over, I felt that readers who want to know where these formulas come from deserved a short article devoted to the derivation.

Two Important Limits

Let us begin with a diagram commonly used to explore relationships among trigonometric functions:

Equation or diagram: Unit circle showing the angle x, its arc, and the corresponding segments
Equation or diagram: Unit circle showing the angle x, its arc, and the corresponding segments

Before differentiating trigonometric functions, we need a few important limits.

First, consider a limit that is fundamental in both mathematics and physics:

Equation or diagram: limₓ→₀ (sin x)/x = 1
Equation or diagram: limₓ→₀ (sin x)/x = 1

To evaluate it, we will examine the right-hand and left-hand limits separately.

Start with the right-hand limit. Consider the unit circle shown above. Suppose Equation or diagram: Segment OA makes an angle of x radians with the positive x-axis, where x > 0, and intersects the unit circle at C. The perpendicular feet from A and C to the positive x-axis are B and D, respectively.

We then have the following conditions:

Equation or diagram: Segment CD = sin x
Equation or diagram: Segment CD = sin x
Equation or diagram: Arc BC = x
Equation or diagram: Arc BC = x
Equation or diagram: Segment AB = tan x
Equation or diagram: Segment AB = tan x

They also satisfy:

Equation or diagram: sin x < x < tan x
Equation or diagram: sin x < x < tan x

Dividing the inequality above by Equation or diagram: sin x gives:

Equation or diagram: 1 < x/sin x < 1/cos x
Equation or diagram: 1 < x/sin x < 1/cos x

Taking reciprocals gives:

Equation or diagram: cos x < sin x/x < 1
Equation or diagram: cos x < sin x/x < 1

Because Equation or diagram: limₓ→₀⁺ cos x = 1, the squeeze theorem proves the right-hand limit:

Equation or diagram: limₓ→₀⁺ sin x/x = 1
Equation or diagram: limₓ→₀⁺ sin x/x = 1

Now consider the left-hand limit. Let Equation or diagram: y = −x. From the right-hand limit above, we know that:

Equation or diagram: Correction to the original graphic: its left denominator says x, but substitution y = −x requires −x; limₓ→₀⁻ sin(−x)/(−x) = limᵧ→₀⁺ sin y/y = 1
Equation or diagram: Correction to the original graphic: its left denominator says x, but substitution y = −x requires −x; limₓ→₀⁻ sin(−x)/(−x) = limᵧ→₀⁺ sin y/y = 1

Using the properties of trigonometric functions for generalized angles:

Equation or diagram: sin(−x)/(−x) = sin x/x
Equation or diagram: sin(−x)/(−x) = sin x/x

Therefore, the left-hand limit is:

Equation or diagram: limₓ→₀⁻ sin x/x = limₓ→₀⁺ sin(−x)/(−x) = 1
Equation or diagram: limₓ→₀⁻ sin x/x = limₓ→₀⁺ sin(−x)/(−x) = 1

The left-hand and right-hand limits both exist and are equal, so we have proved:

Equation or diagram: The left and right limits agree, so limₓ→₀ sin x/x = 1
Equation or diagram: The left and right limits agree, so limₓ→₀ sin x/x = 1

Next, a little algebra gives another useful limit:

Equation or diagram: limₓ→₀ (cos x − 1)/x = 0
Equation or diagram: limₓ→₀ (cos x − 1)/x = 0

Begin with the half-angle identity:

Equation or diagram: sin²(x/2) = (1 − cos x)/2
Equation or diagram: sin²(x/2) = (1 − cos x)/2

A straightforward calculation gives:

Equation or diagram: Half-angle identity and the limit sin y/y used to derive (cos x − 1)/x
Equation or diagram: Half-angle identity and the limit sin y/y used to derive (cos x − 1)/x

Let Equation or diagram: Substitution y = x/2. We then obtain:

Equation or diagram: limₓ→₀ (cos x − 1)/x = 0 × 1 = 0
Equation or diagram: limₓ→₀ (cos x − 1)/x = 0 × 1 = 0

Differentiating the Sine Function

Suppose differentiating f(x) with respect to x gives g(x). By definition:

Equation or diagram: g(x) = d f(x)/dx = limₕ→₀ [f(x+h) − f(x)]/h
Equation or diagram: g(x) = d f(x)/dx = limₕ→₀ [f(x+h) − f(x)]/h

We call g(x) the derivative of f(x), written as Equation or diagram: g(x) = f′(x).

We now want the derivative of Equation or diagram: f(x) = sin x, so we need to evaluate the following limit:

Equation or diagram: limₕ→₀ [sin(x+h) − sin x]/h
Equation or diagram: limₕ→₀ [sin(x+h) − sin x]/h

Using the angle-addition formula:

Equation or diagram: sin(x+h) = sin x cos h + cos x sin h
Equation or diagram: sin(x+h) = sin x cos h + cos x sin h

Substitution gives:

Equation or diagram: Derivative of sin x derived from the sine addition formula and two limits
Equation or diagram: Derivative of sin x derived from the sine addition formula and two limits

In other words:

Equation or diagram: d(sin x)/dx = cos x
Equation or diagram: d(sin x)/dx = cos x

Differentiating the Cosine Function

Next, we want the derivative of Equation or diagram: f(x) = cos x, so we evaluate:

Equation or diagram: limₕ→₀ [cos(x+h) − cos x]/h
Equation or diagram: limₕ→₀ [cos(x+h) − cos x]/h

Using the angle-addition formula:

Equation or diagram: cos(x+h) = cos x cos h − sin x sin h
Equation or diagram: cos(x+h) = cos x cos h − sin x sin h

Substitution gives:

Equation or diagram: Derivative of cos x derived from the cosine addition formula and two limits
Equation or diagram: Derivative of cos x derived from the cosine addition formula and two limits

Therefore:

Equation or diagram: d(cos x)/dx = −sin x
Equation or diagram: d(cos x)/dx = −sin x

Putting the Pattern Together

From the proof above and the differentiation formulas, the derivatives of sine follow this pattern:

Equation or diagram: d(sin x)/dx = cos x
Equation or diagram: d(sin x)/dx = cos x
Equation or diagram: d²(sin x)/dx² = −sin x
Equation or diagram: d²(sin x)/dx² = −sin x
Equation or diagram: d³(sin x)/dx³ = −cos x
Equation or diagram: d³(sin x)/dx³ = −cos x
Equation or diagram: d⁴(sin x)/dx⁴ = sin x
Equation or diagram: d⁴(sin x)/dx⁴ = sin x

In other words, differentiating sin x twice gives the negative of the original function, while differentiating it four times completes the cycle.

The derivatives of cosine follow this pattern:

Equation or diagram: d(cos x)/dx = −sin x
Equation or diagram: d(cos x)/dx = −sin x
Equation or diagram: d²(cos x)/dx² = −cos x
Equation or diagram: d²(cos x)/dx² = −cos x
Equation or diagram: d³(cos x)/dx³ = sin x
Equation or diagram: d³(cos x)/dx³ = sin x
Equation or diagram: d⁴(cos x)/dx⁴ = cos x
Equation or diagram: d⁴(cos x)/dx⁴ = cos x

Differentiating cos x twice likewise gives the negative of the original function, and differentiating it four times completes the same cycle.

Conclusion

In high-school trigonometry, we learn that sin x and cos x are closely related through complementary-angle identities and the Pythagorean identity.

This article reveals another connection: differentiation transforms these two functions into one another, while the second derivative of either function is the negative of itself.

Sine and cosine play essential roles in simple harmonic motion. I will return to that application in a future article—stay tuned. :D