---
title: "Derivatives of cos x, sin x, e^x, and ln x | FiveStudy"
description: "Four results to quote from memory — and one minus sign that decides most of the marks."
url: https://fivestudy.com/guides/ap-calculus-bc-2-7-derivatives-of-sine-cosine-exponential-and-log
---

[AP Calculus BC](https://fivestudy.com/ap-calculus-bc) · Study guide

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

[Figure: FiveStudy]

FiveStudy

AP® Calculus BC · Unit 2 · Differentiation: Definition and Fundamental Properties

AP® Calculus BC · Unit 2 · Differentiation: Definition and Fundamental Properties

# Derivatives of *sin, cos, eˣ and ln x*

Four functions appear everywhere in calculus, and each has a short derivative. This guide gives the four rules, shows the slope patterns behind them, and uses them with the sum and constant multiple rules.

1. The four rules 2. Sine and cosine 3. eˣ and ln x 4. Rewriting first

The idea in one paragraph

\(\dfrac{d}{dx}[\sin x] = \cos x\), \(\dfrac{d}{dx}[\cos x] = -\sin x\), \(\dfrac{d}{dx}\left[e^x\right] = e^x\), and \(\dfrac{d}{dx}[\ln x] = \dfrac{1}{x}\). The trig rules need \(x\) in radians. Each rule can be seen on a graph: the slopes of sine trace out cosine, the slope of \(e^x\) always equals its height, and the slope of \(\ln x\) at \(x\) is \(\frac1x\).

## 1 The four rules

| Function | Derivative | Picture |
| --- | --- | --- |
| \(\sin x\) | \(\cos x\) | Slopes of the sine wave form the cosine wave |
| \(\cos x\) | \(-\sin x\) | Cosine starts by falling, so its slope starts negative |
| \(e^x\) | \(e^x\) | Slope equals height |
| \(\ln x\) | \(\dfrac1x\) (for \(x \gt 0\)) | Steep near 0, flattening out |

## 2 Sine and cosine

**Figure 1.** Read the tangent slopes on the sine curve: 1, 0, −1, 0, 1. Those are the heights of the cosine curve at the same x-values. The same comparison shows that the slope of cos x is −sin x. The inputs are in radians.

Where the sine rule comes from

Start from the limit definition and the angle-sum identity \(\sin(x + h) = \sin x\cos h + \cos x\sin h\):

\(\dfrac{\sin(x + h) - \sin x}{h} = \sin x \cdot \dfrac{\cos h - 1}{h} + \cos x \cdot \dfrac{\sin h}{h}\).

As \(h \rightarrow 0\), \(\dfrac{\cos h - 1}{h} \rightarrow 0\) and \(\dfrac{\sin h}{h} \rightarrow 1\), leaving \(\cos x\). Those two special limits hold only in radians, which is why the rule needs radians.

Worked Example 1 Sine and cosine together

### \(f(x) = 3\sin x - 2\cos x\); find \(f'\left(\frac{\pi}{3}\right)\)

1. 1

   \(f'(x) = 3\cos x - 2(-\sin x) = 3\cos x + 2\sin x\).

2. 2

   At \(\frac{\pi}{3}\): \(\cos\frac{\pi}{3} = \frac12\), \(\sin\frac{\pi}{3} = \frac{\sqrt3}{2}\).

3. 3

   \(f'\left(\tfrac{\pi}{3}\right) = \tfrac32 + 2 \cdot \tfrac{\sqrt3}{2} = \tfrac32 + \sqrt3\).

**Answer:** \(\tfrac32 + \sqrt3 \approx 3.232\)

Common Mistake 1 · Losing the minus sign on cosine

\(\frac{d}{dx}[\cos x] = -\sin x\). Check with the graph: just right of 0, cosine is falling from its peak, so its slope is negative, and \(-\sin x\) is negative there.

Common Mistake 2 · Using degrees

The rules are only true with \(x\) in radians. In degree mode the slope of \(\sin x\) is \(\frac{\pi}{180}\cos x\), a different answer. Keep calculators in radian mode.

Worked Example 2 Horizontal tangents with trig

### \(y = x - 2\sin x\) on \([0, 2\pi]\)

1. 1

   \(y' = 1 - 2\cos x\). Set it to 0: \(\cos x = \frac12\).

2. 2

   On \([0, 2\pi]\): \(x = \frac{\pi}{3}\) and \(x = \frac{5\pi}{3}\).

**Answer:** \(x = \dfrac{\pi}{3}\) and \(x = \dfrac{5\pi}{3}\)

Worked Example 3 Repeat the derivative

### The derivatives of \(\sin x\) cycle

1. 1

   Differentiate again and again: \(\sin x \rightarrow \cos x \rightarrow -\sin x \rightarrow -\cos x \rightarrow \sin x\).

2. 2

   The pattern repeats every four derivatives. For the 27th derivative, \(27 = 4 \cdot 6 + 3\), so it matches the 3rd one: \(-\cos x\).

**Answer:** The 27th derivative of \(\sin x\) is \(-\cos x\).

## 3 eˣ and ln x

**Figure 2.** The exponential function eˣ is the one function whose slope always equals its height. For ln x, the slope at x is 1/x: steep near 0, flatter and flatter as x grows.

Worked Example 4 Tangent to the exponential

### \(y = e^x\) at \(x = 0\)

1. 1

   Point: \((0, e^0) = (0, 1)\). Slope: \(e^0 = 1\).

**Answer:** \(y = 1 + x\)

Worked Example 5 A log function

### \(g(x) = 4\ln x - x\) at \(x = 2\)

1. 1

   \(g'(x) = \dfrac{4}{x} - 1\), so \(g'(2) = 2 - 1 = 1\).

2. 2

   Point: \(g(2) = 4\ln 2 - 2 \approx 0.773\).

**Answer:** Slope 1; tangent line \(y = (4\ln 2 - 2) + (x - 2)\).

Worked Example 6 A log model

### How fast is a town growing?

A town’s population is modeled by \(P(t) = 200 + 50\ln t\) hundred people, \(t\) years after it was founded (\(t \ge 1\)). Find \(P'(10)\) and interpret it.

1. 1

   \(P'(t) = \dfrac{50}{t}\), so \(P'(10) = 5\).

2. 2

   Units: hundred people per year.

3. 3

   The rate \(\frac{50}{t}\) keeps shrinking: a log model grows forever, but more and more slowly.

**Answer:** \(P'(10) = 5\): ten years after its founding, the population is increasing at about 500 people per year.

Common Mistake 3 · Using the power rule on eˣ

\(e^x\) is not a power of \(x\); the variable is in the exponent. \(\frac{d}{dx}\left[e^x\right] = e^x\), not \(xe^{x - 1}\).

## 4 Rewriting first

Exponent and log rules can turn an unfamiliar function into a familiar one before you differentiate.

Worked Example 7 Rewrite with log and exponent rules

### \(\dfrac{d}{dx}\left[\ln\left(x^3\right)\right]\) and \(\dfrac{d}{dx}\left[e^{x + 2}\right]\)

1. 1

   \(\ln\left(x^3\right) = 3\ln x\) (for \(x \gt 0\)), so the derivative is \(\dfrac{3}{x}\).

2. 2

   \(e^{x + 2} = e^2 \cdot e^x\), a constant times \(e^x\). Its derivative is \(e^2 e^x = e^{x + 2}\).

**Answer:** \(\dfrac{3}{x}\) and \(e^{x + 2}\)

Common Mistake 4 · The derivative of ln(5x)

\(\ln(5x) = \ln 5 + \ln x\), and \(\ln 5\) is a constant. So \(\frac{d}{dx}[\ln(5x)] = \frac{1}{x}\), not \(\frac{1}{5x}\) and not \(\frac{5}{x}\).

### Quick reference

| Function | Derivative |
| --- | --- |
| \(\sin x\) | \(\cos x\) |
| \(\cos x\) | \(-\sin x\) |
| \(e^x\) | \(e^x\) |
| \(\ln x\) | \(\frac{1}{x}\) |
| \(\ln\left(x^n\right)\), \(\ln(kx)\) | Rewrite first: \(\frac{n}{x}\), \(\frac{1}{x}\) |
| \(e^{x + c}\) | \(e^{x + c}\) |

FiveStudy AP® Calculus BC · Derivatives of sin, cos, eˣ and ln x
