Mistake Master
Student view — seeing the site as a student does
Mistake Master · AP Calculus · Unit 2 · Step-Through Animation

Derivatives of cos x, sin x, e^x, and ln x

Measure the Slopes and These Four Results Draw Themselves

You'll learnthe derivatives of sine, cosine, eˣ and ln x by reading them off their own graphs, which of the trig pair carries the minus sign, and why only base e is its own slope.

Four functions no algebraic rule reaches. Instead of quoting their derivatives, this animation measures the slope of each curve point by point and lets you watch which familiar curve the measurements draw. Twelve short steps; press Next for each one.

12 STEPS · 6 QUICK CHECKS · THE MINUS SIGN LIVES ON THE COSINE'S DERIVATIVE · RADIANS ONLY · v2

sin x → cos x · eˣ → eˣ · ln x → 1 / x
Before you start
What you're looking at
One period of sin x. A tangent is about to ride along it, and its slope will be measured at every point.
The question
When those measured slopes are joined up, which curve do they draw, and where does the minus sign that separates sine from cosine come from?
Step 1 / 12

Read all 12 steps as text
Step 1

One period of the sine

Here is one period of sin x. It is not a power of x, so neither the power rule nor the linearity rules can touch it. Its derivative has to be found another way: by measuring.

Step 2

Measure the sine, slope by slope

A tangent rides along sin x. At every x its slope is measured off the curve and dropped into the panel below as a height. It starts at 1, where the sine climbs through the origin at its steepest, reaches 0 at π/2 where the sine is flat, and bottoms out at −1 at π.

Step 3

The slopes trace out the cosine

1 at 0, 0 at π/2, −1 at π, 0 at 3π/2, 1 at 2π: those are the values of cos x, and the cosine drawn behind the trace fits it exactly. So d/dx[sin x] = cos x, with no minus sign anywhere in it.

Step 4

Now measure the cosine

Put the tangent on cos x instead. It leaves x = 0 at a peak, so the first measured slope is 0, and then the curve falls all the way to π. A falling curve has a negative slope, so the trace drops under its axis and stays there for that whole stretch.

Step 5

Where the minus sign comes from

The trace is −sin x, and that is the only place the minus sign comes from: +sin x is positive on 0 to π and would claim the cosine is climbing where it visibly falls. So d/dx[cos x] = −sin x, and the minus sign lives on the cosine's derivative, not the sine's.

Step 6

Four derivatives, then it repeats

Differentiate the result, then differentiate that: sin x → cos x → −sin x → −cos x → sin x. The minus signs enter at the second arrow and leave at the fourth, each one where the curve above has turned downward. Count arrows rather than trying to remember the answer.

Step 7

The tangent to eˣ runs back exactly 1

Draw the tangent to eˣ at x = 1 and follow it back to the x-axis: it lands exactly one unit to the left, so its slope is its height divided by 1. Do the same on 2ˣ at x = 2 and the run back is 1.44, not 1, so the slope is the height divided by 1.44.

Step 8

What e is for

That 1.44 is 1/ln 2, and turning the division around gives the general rule: d/dx[aˣ] = aˣ ln a. The base drags its own natural logarithm along as a factor. ln e = 1, so eˣ is the one exponential whose factor disappears: d/dx[eˣ] = eˣ.

Step 9

The logarithm flattens

ln x climbs steeply near 0 and then almost stops. Four tangents at x = 0.5, 1, 2 and 4 measure 2, 1, 0.5 and 0.25, and those are the values of 1/x. The pink curve is 1/x, with a dot at each of the four inputs.

Step 10

Only the natural log gives 1/x

d/dx[ln x] = 1/x for x > 0; there is no curve at all left of the axis. Any other base picks up ln b in the denominator, the mirror image of the exponential rule: since log_b x = ln x / ln b, d/dx[log_b x] = 1/(x ln b).

Step 11

Put the minus on the sine

A student writes d/dx[sin x] = −cos x. At x = 0 the sine climbs through the origin at slope +1, and the claim says −1: the dashed red line falls through a rising curve. The lower panel shows the claimed slope curve is the true one reflected, wrong at every x. The minus belongs to the cosine.

Step 12

Six results, two details

sin x → cos x, cos x → −sin x, eˣ → eˣ, aˣ → aˣ ln a, ln x → 1/x, log_b x → 1/(x ln b). One minus sign, on the cosine's derivative, and one logarithm, which multiplies for an exponential and divides for a logarithm. Next topic: the product rule, where these become the pieces.