Advanced Placement
Skip to the notes

AP Calculus AB

Topic 2.7: Derivatives of cos x, sin x, e^x, and ln x

Watch now22 min

Updated · For the May 2027 AP exam

The slopes of sine, cosine, eˣ and ln x, and limits that hide them

Topic 2.7 key terms

radian
The angle that carries a point on a circle one radius along the rim. Calculus measures angles in radians, which is what makes the slope of sin x at 0 exactly 1.
derivative of sin x
d/dx[sin x] = cos x, for x in radians: the slope of the sine curve at every x is the cosine of x.
derivative of cos x
d/dx[cos x] = −sin x, for x in radians. The minus sign says cosine falls wherever sine is positive.
e
The base, about 2.71828, for which the exponential's slope equals its height everywhere: the tangent to eˣ always meets the x-axis one unit behind the point.
derivative of eˣ
d/dx[eˣ] = eˣ: eˣ is its own derivative. More generally d/dx[bˣ] = (ln b)·bˣ.
derivative of ln x
d/dx[ln x] = 1/x for x > 0: the reciprocal of the slope at the mirror point on eˣ.
limit as a derivative
If f is differentiable at a, the limit as h → 0 of (f(a+h) − f(a))/h, and the limit as x → a of (f(x) − f(a))/(x − a), both equal f′(a). Recognize either form and the known derivative gives the limit.
tangent line
The line through (a, f(a)) with slope f′(a): y − f(a) = f′(a)(x − a).

Transcript

2,825 words · 8 parts

A quarter turn ahead

This old water wheel turns about six times a minute, and every bucket on it rides the same circle, up out of the stream, over the top and back down. Let’s ride with this orange one. It climbs fastest as it passes the side, and right at the very top it isn’t climbing at all, even though it’s still sliding sideways.

Now let’s light up the bucket a quarter of a turn ahead of ours. Something strange connects these two. Right now ours has stopped climbing, and that one sits level with the axle. As ours drops down the far side, that one sinks below the axle. Then, just as ours climbs fastest past the side of the wheel, that one sits right at the very top.

Its height is a perfect copy of how fast our bucket climbs, every moment, all the way round. By the end of this lesson, you’ll be able to explain why that second bucket knows how fast ours climbs. You’ll also have one-line rules for the slopes of sine, cosine, e to the x and the natural log.

Along the way, you’ll also track down the number on your calculator’s e key yourself, just by turning a dial. Let’s start with our orange bucket and work out how fast its height is changing.

How fast does sine climb?

To keep the numbers clean, let’s call the wheel’s radius one and measure its turn with an angle theta in radians, counterclockwise from the right side, just like the unit circle. That makes the bucket’s height above the axle sine of theta, the same sine you’ve been drawing since precalc.

One full turn draws one full sine wave. What we want now is its slope, how fast the height changes for every radian the wheel turns, and that’s the derivative of sine. Let’s park the bucket back at the start, at theta equals zero, level with the axle, where its height is zero.

Before we measure anything, make a call. The height is zero right here, so how fast do you think it’s changing, per radian of turn? A radian is the turn that carries the bucket one radius along the rim. At the side the bucket moves straight up, so right at that moment it’s climbing at one radius per radian, and the slope at zero is exactly one.

Now let’s turn to the top. Up here the bucket slides sideways, its height stops changing for an instant, and the slope is zero. On the far side it drops straight down, so the slope is negative one. At the bottom it slides sideways again, so its climb rate is zero, and back at the right side it’s climbing at one radius per radian again.

One of the buckets on this wheel draws a curve through all five of those dots. Drag the dim lamp around the rim until its curve passes through every one of them.

That’s our ghost lamp, a quarter turn ahead, and watch it draw its curve through every dot. That curve is cosine. The slope of sine at every angle is the cosine of that angle. The wheel shows us that much, but I want to know why. Let’s take the ghost’s spoke, the arrow from the axle out to the ghost, and slide it over to our bucket without turning it.

It lands right on our bucket’s direction of motion, because the bucket always moves at right angles to its spoke, one radius per radian. The vertical part of that arrow is the ghost’s height, cosine of theta. Let’s check it with one tiny turn, delta theta, because a short piece of the rim is almost perfectly straight. As the turn shrinks, the rise divided by the turn settles on point eight six six, which is cosine of pi over six.

On the board, here’s the bucket at angle theta, and the arrow we slid over, one radius long and at right angles to the spoke. Its upright part is the ghost’s height, cosine theta. A tiny turn delta theta moves the bucket about delta theta along that arrow, so it rises about cosine theta times delta theta.

Divide the rise by delta theta and you get about cosine theta. As the turn shrinks to nothing, the piece of rim and the arrow match better and better, and about becomes exactly. That’s our first rule, written with x the way the exam writes it. Whenever x is in radians, the derivative of sine of x is cosine of x.

Sweep a tangent line along the sine curve, plot its slope underneath, and the slopes draw the cosine curve, the same picture the wheel drew. The voltage in your wall socket is a sine wave too, so it’s changing fastest at the exact moment it passes through zero, like our bucket at the side of the wheel.

Cosine and its minus sign

Let’s go back to the wheel, because now you can find the bucket’s climb rate anywhere from its angle alone. Turn the wheel yourself and stop the bucket at a spot where it’s sinking at exactly half a radius for every radian it turns.

Cosine has been hiding in plain sight this whole time, because it’s the ghost’s height. What about the slope of cosine itself? Let’s park our bucket at pi over six, a little way up the right side and still climbing, which puts the ghost just past the top on the left. Look carefully at the ghost. Right now, what do you think its height is doing?

We can even say how fast it sinks, with the same trick. The ghost’s climb rate is the height of the bucket a quarter turn ahead of it. That one sits directly opposite ours, half a radius below the axle. That bucket’s height is negative sine of theta, so the slope of cosine is negative sine. The minus sign tells you that cosine falls whenever our bucket is above the axle, where sine is positive.

On the board that’s our second rule. The derivative of cosine x is negative sine x, and a sweep along the cosine curve draws the sine curve turned upside down. Both rules need radians. In degrees, the slope of sine at zero would be only about point zero one seven, because one degree barely moves the bucket.

Let’s use both rules on one function, f of x equals three sine x minus two cosine x, and take it one term at a time. Three sine x gives three cosine x. For the second term we keep the negative two and multiply it by the derivative of cosine, which is negative sine x. This is the step people drop on tests. They write minus two sine x, but minus two times negative sine x is plus two sine x.

At zero, cosine is one and sine is zero, so f prime of zero is three, and a positive slope means f is climbing there, which is just what its graph does. Now you try one. If f of x is four sine x plus two cosine x, what’s f prime of pi over two?

The curve that is its own slope

Sine and cosine come from circles. Exponentials come from growth, b to the x for some base b, like two to the x, where every step of one in x multiplies the height by b. We don’t have a rule for this one yet. Let’s go back to the definition of the derivative and see what it tells us.

B to the x plus h is b to the x times b to the h. Now both terms on top share a b to the x, so we can pull it out front. It doesn’t change as h shrinks, so it comes out of the limit too, and what’s left is b to the h minus one, over h. Look at what that says. The slope at any point is the height at that point, times one number that doesn’t depend on x at all.

Let’s find that number for two and for three, using smaller and smaller steps h, and watch where each one settles. For base two it settles at about point six nine, so the slope of two to the x is only about seven tenths of its height. For base three it’s about one point one, a bit more than its height. Somewhere between two and three there has to be a base where that number is exactly one, and for that base the slope would equal the height everywhere. Let’s go and find it.

This is a pane of glass with the curve two to the x glowing inside it, and that little carriage fires a laser along the tangent line. The beam’s slope is the carriage’s height divided by the run along the rail, so if the beam lands one unit behind, the slope equals the height.

For two to the x the beam lands almost one and a half units behind, so here the slope is point six nine, the table’s number, less than the height. Switch to three to the x and the beam lands a little short of one unit, because now the slope is a bit more than the height. One unit behind is the target, and the base is on that dial.

Turn the dial until the laser lands exactly one unit behind the carriage. Now try to break it. Move the carriage to one spot on the left and one on the right, and see whether the beam still lands one unit behind.

Your beams and mine all agree. Every single beam lands exactly one unit behind its own foot, because that fixed number doesn’t depend on x, so if it’s one here, it’s one everywhere. That means at every point the rise is the height and the run is one, so the slope of e to the x is e to the x, everywhere you look.

That gives us our third rule, that the derivative of e to the x is e to the x itself. The power rule can’t touch this one, because in e to the x the base stays fixed and the x sits up in the exponent. Something like e cubed doesn’t change at all, because it’s just a number, so its derivative is zero. X to the e, on the other hand, is an ordinary power, and the power rule gives e times x to the e minus one.

This one mixes all three together. What’s the derivative of e to the x, plus x to the e, plus e to the e?

ln x in the mirror

The natural log undoes e to the x, and that means its graph is the graph of e to the x reflected across the line y equals x. Let’s park the carriage where the height is two, at x equals the natural log of two. The slope there equals the height, so it’s two, a rise of two over a run of one. Now let’s flip the whole pane over the line y equals x, laser and all.

The point lands at two, natural log of two, on the log curve, and the little triangle flips with it, so the rise and the run trade places. The slope becomes one over two, which is a half.

Where the log crosses the axis, at x equals one, its mirror point has slope one, so the log’s slope there is one too. At one half, the mirror point has slope one half, and flipped over, the log climbs at two. This works at every positive input of the log. Its mirror point on e to the x has height x, so that point’s slope is x, and flipping turns it into a slope of one over x. Slide the carriage along the log curve until its slope is exactly one quarter.

On the board, that’s our fourth rule. The derivative of the natural log of x is one over x, for every positive x, which is the only place the log lives. Notice that the log can be negative and still be climbing. At one half, the log is below the axis, but its slope is one over a half, which is two, so it’s rising steeply.

These three are easy to mix up, so let’s test them at x equals e. One over x gives one over e, one over the natural log of e gives one, and the natural log of one over e gives negative one. Base two’s rows were settling toward about zero point six nine three, and that number is exactly the natural log of two. Base three’s, about one point one, is the natural log of three.

For any positive base b, the slope of b to the x is the natural log of b times b to the x, and when b is e, that multiplier is exactly one. You’ll see where that natural log comes from when we get to the chain rule.

All four in one line

Here are all four rules side by side. Together with the power rule and the sum and constant-multiple rules from last time, you can now differentiate a whole new family of functions in one line. Let’s take this one term at a time. Five sine x becomes five cosine x, minus three cosine x becomes plus three sine x, two e to the x stays put, and minus four times the natural log becomes minus four over x.

Try this one the way the exam would ask it. If g of x is six times the natural log of x, minus x squared, what’s g prime of three?

The AP exam often asks you to turn a derivative into a tangent line, so let’s find that line for r of x equals e to the x plus cosine x, at x equals zero. A line needs a point and a slope, and the point comes from r itself. E to the zero is one and cosine of zero is one, so r of zero is two.

The slope comes from the derivative, e to the x minus sine x, which at zero is one minus zero, so the slope is one. Point-slope form gives y minus two equals one times x minus zero, so the tangent line is y equals x plus two. On the graph it runs through zero, two with the same slope as the curve.

The limit in disguise

The rules work backwards too, because the exam loves to hide these derivatives inside limits. This one looks like it needs a page of trig identities. It doesn’t, because it has the shape of the definition of a derivative, f of a plus h, minus f of a, all over h.

Here f is sine, a is pi over three, and root three over two is just sine of pi over three, so this limit is the derivative of sine at pi over three. The derivative of sine is cosine, and cosine of pi over three is one half. That’s the whole problem.

This next one is sneakier, the limit of the natural log of x over x minus one, as x goes to one. It matches the other form of the definition, f of x minus f of a, over x minus a. It looks like something’s missing on top, until you notice that the natural log of one is zero. On a free-response question, write it like this. Let f of x equal the natural log of x.

Because the natural log of one is zero, which is f of one, this limit is the definition of f prime of one, so its value is one over one, which is one. That sentence names the function, names the point, and says why the limit is a derivative, and those are the things a grader looks for. What do you get for the limit, as h goes to zero, of e to the two plus h, minus e squared, all over h?

One more turn

Let’s go back to the mill one last time. Every bucket’s climb rate is the height of the bucket a quarter turn ahead of it. That’s why four lamps around the wheel carry sine, cosine, negative sine and negative cosine, each one the slope of the one before. The slope of sine is cosine, the slope of cosine is negative sine, e to the x is its own slope, and the slope of the natural log is one over x.

You started this lesson with a strange coincidence on a water wheel. Now you can explain it, you’ve found e with your own hands, and you can take the slope of any of these four functions in a single line. These four rules turn up all over the exam, in tangent lines, in limits in disguise, and soon in motion problems too. Next time, we’ll find out what happens when you multiply two functions together.

Unit 2: Differentiation: Definition and Fundamental Properties

  1. 2.1Defining Average and Instantaneous Rates of Change at a Point
  2. 2.2Defining the Derivative of a Function and Using Derivative Notation
  3. 2.3Estimating Derivatives of a Function at a Point
  4. 2.4Connecting Differentiability and Continuity: Determining When Derivatives Do and Do Not Exist
  5. 2.5Applying the Power Rule
  6. 2.6Derivative Rules: Constant, Sum, Difference, and Constant Multiple
  7. 2.7Derivatives of cos x, sin x, e^x, and ln x
  8. 2.8The Product Rule
  9. 2.9The Quotient Rule
  10. 2.10Finding the Derivatives of Tangent, Cotangent, Secant, and/or Cosecant Functions