Differentiate sine and cosine
The slopes of the sine curve
The top graph shows \(y = \sin x\), with \(x\) in radians. The curve is green where it rises and red where it falls.
The orange line touches the curve at the orange point, and its slope is the number to find. The lower graph plots the slope at every \(x\), so the orange bar is as tall as the slope at the point.
Use the buttons. At \(x = 0\) the tangent rises with slope 1, and at \(x = \frac{\pi}{2}\) the curve is at its top, so the slope is 0. At \(x = \pi\) the curve falls with slope \(-1\).
Drag the point along the curve. The lower graph falls from 1 to \(-1\) and rises to 1 again, which is the shape of the cosine curve.
From sine to cosine
The top graph shows a curve, and the lower graph shows its slope at each point. For sine, the lower graph is the cosine curve.
Show the cosine curve. It starts at its top, where the slope is 0, and then falls, so its slope graph goes below the axis.
This slope graph is the sine curve turned upside down. Wherever the point is, the slope of sine is cosine and the slope of cosine is minus sine.
Notation
The slope of sine at \(x\) is the height of the cosine curve at \(x\), so the derivative of sine is cosine.
\[\frac{d}{dx}\sin x = \cy{\cos x}\]The slope of cosine at \(x\) is minus the height of the sine curve. The minus sign is needed because cosine falls from \(0\) to \(\pi\), where sine is positive.
\[\frac{d}{dx}\cos x = \cy{-\sin x}\]To check a sign, find where the curve falls, because the slope is negative there.
These two formulas hold only when \(x\) is measured in radians.
When it fails
Measure the angle in degrees, so that the curve is \(\sin(x^\circ)\). One wave now takes 360 units of \(x\) instead of about 6.28, so on this window the curve is almost flat.
At \(x = 0\) the tangent now has slope \(\frac{\pi}{180}\), about 0.0175, because one degree is \(\frac{\pi}{180}\) radian. The formula \(\cos x\) gives 1 there, so it fails in degrees.
Example 1: a constant multiple of sine
Find the slope of the curve \(y = 4\sin x\) at \(x = \frac{\pi}{3}\).
The derivative of sine is cosine, and the constant 4 stays as a factor, so the slope at any \(x\) is \(4\cos x\).
\[y' = 4\cos x\]Substitute \(x = \frac{\pi}{3}\). Because \(\cos\frac{\pi}{3} = \frac12\), the slope is 2.
\[4\cos\frac{\pi}{3} = 4\cdot\frac12 = \cy{2}\]The orange bar reaches 2, and the slope is positive because the curve rises here.
Example 2: where the tangent is flat
The curve \(y = x + 2\cos x\) is drawn for \(0 \le x \le \frac{\pi}{2}\). Find the \(x\) where its tangent is flat.
A flat tangent has slope 0, so first find the derivative. The term \(x\) has derivative 1.
A tempting wrong move: Write the derivative of \(2\cos x\) as \(2\sin x\).
\[\cr{y' = 1 + 2\sin x}\]Because \(\sin x \ge 0\) on the interval, this formula is at least 1, so it is never 0. The red dashed line has slope 2 at \(x = \frac{\pi}{6}\), but the curve is flat there, where it changes from green to red.
The derivative of cosine is minus sine, so the derivative of \(2\cos x\) is \(-2\sin x\).
\[y' = 1 - 2\sin x\]Set the slope to 0 and solve for \(\sin x\).
\[1 - 2\sin x = 0 \;\Rightarrow\; \sin x = \tfrac12\]On the interval, the angle with sine \(\frac12\) is \(\frac{\pi}{6}\). The curve is at its top there, and the orange bar is 0.
\[\cy{x = \frac{\pi}{6}}\]
Practice
Find the slope of the curve \(y = -3\cos x\) at \(x = \frac{5\pi}{6}\).
Cosine falls from \(x = 0\) to \(x = \pi\), so \(-3\cos x\) rises there. The slope is positive.
Solution
The derivative of cosine is \(-\sin x\), and the factor \(-3\) stays. The two minus signs make a plus.
\[y' = -3\cdot(-\sin x) = 3\sin x\]Substitute \(x = \frac{5\pi}{6}\). Because \(\sin\frac{5\pi}{6} = \frac12\), the slope is \(\frac32\).
\[3\sin\frac{5\pi}{6} = \cy{\frac32}\]The orange bar points up to \(\frac32\), and the curve rises here, as the hint said.
Questions
Questions 1 and 2 use a curve with its slope graph below. Question 3 needs a calculation.
The marked point is at \(x = \pi\) on the sine curve. What is the slope of the tangent?
- 1
- 0
- −1
Answer
−1
The marked point is at \(x = \frac{3\pi}{2}\) on the cosine curve. What is the slope of the tangent?
- −1
- 0
- 1
Answer
1
What is the derivative of \(2\sin x - 5\cos x\)?
- \(2\cos x + 5\sin x\)
- \(2\cos x - 5\sin x\)
- \(-2\cos x + 5\sin x\)
Answer
\(2\cos x + 5\sin x\)
Summary
You differentiate sine to cosine, and cosine to minus sine, when x is in radians.
They hold because the slope graph of sine is the cosine curve and the slope graph of cosine is sine turned upside down.
You use them on every sine or cosine term and check each sign against the direction of the curve.
This is one of four skills in topic 2.7 of Which & Why: AP Calculus.