Grade by Grade
A. Rate of Change · Derivatives of Exponential and Sinusoidal Functions

The Derivative of cos x and the Derivative Cycle

A2.4About 65 minutes
Learning goals
  • I can determine, by investigation and by algebra, that d/dx cos x = −sin x.
  • I can use the four-step derivative cycle sin → cos → −sin → −cos to find higher derivatives.
  • I can differentiate sums and constant multiples of sin x and cos x and find tangent lines and horizontal tangents.
  • I can connect displacement and velocity for an oscillating object such as a pendulum or a mass on a spring.

Words to know

derivative of cos x
d/dx cos x = −sin x (x in radians).
higher derivative
A derivative of a derivative, such as the second derivative f″ or the fourth derivative f⁽⁴⁾.
displacement
Position relative to a rest point, with a sign showing the direction.
velocity
The rate of change of displacement, v = s′(t).
oscillation
A motion that repeats back and forth, like a pendulum or a mass on a spring.

The partner function

In the last lesson you found that the slopes of a sine wave form a cosine wave. What about the slopes of a cosine wave? Make a prediction before reading on: will the answer be sin x, or something slightly different?

Remember that cos x is just sin x shifted left by π/2 (MHF4U Trigonometric Identities and Equations: cos x = sin(x + π/2)). So its slopes should be the slopes of sine shifted left by π/2 too.

xcos xslope (h = 0.0001)−sin x
010.00000
π/60.8660−0.5000−0.5
π/20−1.0000−1
π−10.00000
3π/201.00001
The slopes of y = cos x match −sin x, not sin x.

The algebra

Use the compound angle formula cos(x + h) = cos x cos h − sin x sin h:

[cos(x + h) − cos x] ÷ h = cos x × (cos h − 1)/h − sin x × (sin h)/h.

As h → 0, (cos h − 1)/h → 0 and (sin h)/h → 1 (from the last lesson), so the limit is cos x × 0 − sin x × 1 = −sin x.

A second way, with the chain rule: cos x = sin(x + π/2). Its derivative is cos(x + π/2) × 1, and cos(x + π/2) = −sin x (another MHF4U identity). Same answer.

The derivative of cosine

d/dx cos x = −sin x (x in radians).

Check the sign with the graph: just after x = 0, cos x is going down from its peak, so its slope must be negative. And −sin x is negative for small positive x. ✓

The derivative cycle

Differentiate sin x again and again:

sin x → cos x → −sin x → −cos x → sin x → …

After four derivatives you are back where you started. To find a high derivative, divide the order by 4 and look at the remainder.

sin xcos x−sin x−cos xd/dxd/dxd/dxd/dxfour derivativesbring you back
Each arrow is one derivative. Going once around the loop (four derivatives) takes sin x back to sin x.
Worked example

Example 1: A tangent to y = cos x

Find the equation of the tangent to y = cos x at x = π/6.

  1. Point: (π/6, cos(π/6)) = (π/6, √3/2).
  2. Slope: y′ = −sin x, so m = −sin(π/6) = −1/2.
  3. y − √3/2 = −(1/2)(x − π/6), so y = −(1/2)x + π/12 + √3/2.
  4. Decimal form: y ≈ −0.5x + 1.128.

y = −(1/2)x + √3/2 + π/12, about y = −0.5x + 1.128.

Worked example

Example 2: Horizontal tangents of a sum

Find all x in [0, 2π] where f(x) = sin x + cos x has a horizontal tangent, and give those points.

  1. f′(x) = cos x − sin x.
  2. Set f′(x) = 0: cos x = sin x. Divide by cos x (it is not 0 at a solution, since then sin x would be ±1): tan x = 1.
  3. In [0, 2π]: x = π/4 or x = 5π/4.
  4. f(π/4) = √2/2 + √2/2 = √2. f(5π/4) = −√2/2 − √2/2 = −√2.

Horizontal tangents at (π/4, √2) and (5π/4, −√2): the peak and the trough of this wave.

Worked example

Example 3: High derivatives

Find (a) the second derivative of y = 3 cos x and (b) the 27th derivative of y = sin x.

  1. (a) y′ = −3 sin x, y″ = −3 cos x. Notice y″ = −y.
  2. (b) 27 = 4 × 6 + 3. Six full trips around the cycle, then three more steps: sin x → cos x → −sin x → −cos x.

(a) y″ = −3 cos x (b) −cos x

π/2π3π/22π−1212s (cm)t (s)π/2π3π/22π−1212v (cm/s)t (s)s(t) = 12 cos tdisplacementv(t) = s′(t) = −12 sin tvelocityDotted lines: wheres = 0, the speed isgreatest (12 cm/s).
A mass on a spring with s(t) = 12 cos t. The velocity v = −12 sin t is zero at the turning points (s = ±12) and has its greatest size, 12 cm/s, as the mass passes through s = 0.
Worked example

Example 4: Displacement and velocity

A mass bobs on a spring. Its displacement from rest is s(t) = 12 cos t centimetres after t seconds. Find v(t), v(1) and the acceleration a(t) = v′(t). What do you notice about a(t)?

  1. v(t) = s′(t) = −12 sin t.
  2. v(1) = −12 sin 1 ≈ −10.10 cm/s. The mass is moving in the negative direction at about 10.1 cm/s.
  3. a(t) = v′(t) = −12 cos t.
  4. Compare with s(t): a(t) = −s(t).

v(1) ≈ −10.1 cm/s, and a(t) = −s(t): the acceleration always points back toward the rest position. Physicists call this simple harmonic motion. (Motion problems are studied in depth in Applications of Derivatives.)

Hands-on activity

The derivative cycle cards and a pendulum

You need: four index cards (or pieces of paper), a marker, a string about 50 cm long and a small weight such as a key or metal washer.

  1. Write sin x, cos x, −sin x and −cos x on the cards. Lay them in a square, in that order, going clockwise. Draw an arrow labelled d/dx from each card to the next.
  2. Ask someone to call out a function and a number of derivatives (for example "cos x, 10 derivatives"). Start on that card and count steps around the square. Check your answer by dividing by 4.
  3. Make a pendulum: tie the weight to the string and hold the other end still. Pull the weight to one side and let go.
  4. Say "zero" out loud each time the weight stops for an instant, and "fast" each time it passes the bottom.
  5. Match each moment to the graphs in this lesson: when is displacement greatest? When is velocity greatest?

What to look for: cos x with 10 derivatives: 10 = 4 × 2 + 2, so two steps from cos x: −sin x then −cos x. The answer is −cos x. For the pendulum, the weight stops (velocity 0) at the ends of the swing, where displacement is greatest, and moves fastest at the bottom, where displacement is 0. The velocity graph is a quarter-cycle out of step with the displacement graph, just like −sin t and cos t.

Just for fun

Differentiating sin x four times brings you right back to sin x. It is the calculus version of walking around the block and ending up at your own front door.

Your turn

1

Differentiate y = 5 cos x.

2

Differentiate y = 2 sin x − 3 cos x.

3

Find the slope of y = cos x at x = π/2.

4

Find the equation of the tangent to y = cos x at x = π.

5

Find the 4th derivative of y = cos x.

6

Find the 15th derivative of y = sin x.

More practice: warm-up

1

d/dx cos x = ?

2

d/dx (−sin x) = ?

3

d/dx (−cos x) = ?

4

What is the slope of y = cos x at x = 0?

5

Differentiate y = x² + cos x.

More practice: on your own

1

For f(x) = √3 sin x + cos x, find all x in [0, 2π] with a horizontal tangent.

2

Show that y = 4 sin x + 7 cos x satisfies y″ + y = 0.

3

Find the equation of the tangent to y = 2 cos x at x = π/3.

4

A pendulum's horizontal displacement is s(t) = 8 cos t cm. Find its velocity at t = 2 s.

5

For g(x) = x − cos x, explain why g is never decreasing.

Challenge

1

Find the 100th derivative of y = sin x + cos x.

2

Find constants a and b if y = a sin x + b cos x has y(0) = 3 and y′(0) = −2.

3

Are the tangents to y = sin x and y = cos x at x = π/4 perpendicular? Find the acute angle between them to the nearest tenth of a degree.

Check your understanding

Quiz

1.

d/dx cos x =

2.

What is the 3rd derivative of sin x?

3.

The slope of y = cos x at x = π/6 is:

4.

s(t) = 12 cos t. When is the velocity zero?

5.

If y = 4 cos x, then y″ =

6.

Where in [0, 2π] does y = sin x + cos x have horizontal tangents?

For parents and teachers

Big idea (A2.4): d/dx cos x = −sin x. Together with d/dx sin x = cos x, this makes a four-step cycle. Sine and cosine model oscillations, and their derivatives describe how fast the oscillating object moves.

How to help: ask your teen to sketch y = cos x and point to where it is going downhill (just after x = 0). That is why the derivative starts out negative. The card game in the activity is a quick, low-pressure way to practise the cycle.

Common difficulties:

  • Losing the minus sign: d/dx cos x = −sin x, not sin x.
  • Mixing up the direction of the cycle for higher derivatives.
  • Dividing by cos x when it might be zero (always check).
  • Forgetting radian mode on the calculator.