Skip to main content

Unit 2 · Topic 2.7

2.7 Derivatives of cos x, sin x, eˣ, and ln x

Four derivatives you need to know by heart: sin x → cos x, cos x → −sin x, eˣ → eˣ and ln x → 1/x. They combine with the rules you already know, and they show up in nearly every unit that follows.

Key terms

  • derivative of sin x
  • derivative of cos x
  • derivative of eˣ
  • derivative of ln x
  • natural logarithm

The four derivatives

Angles in calculus are measured in radians. These formulas, especially the trig ones, only work in radians.

FunctionDerivativeValid for
sin xcos xAll x
cos x−sin xAll x
eˣeˣAll x
ln x1/xx > 0

Why sine and cosine work this way

Look at the graph of sin x. At x = 0 it rises with slope 1, and cos 0 = 1. At x = π/2 it peaks with slope 0, and cos(π/2) = 0. At x = π it falls with slope −1, and cos π = −1. The slopes of sin x trace out the cos x graph.

For cos x, the slopes trace out −sin x: at x = π/2, cos x falls with slope −1, and −sin(π/2) = −1. The formal proofs use the limit definition with the special limits lim (h→0) sin h / h = 1 and lim (h→0) (cos h − 1)/h = 0.

eˣ and ln x

e ≈ 2.71828 is the base that makes the exponential function its own derivative: the slope of y = eˣ at any point equals its height. At x = 0, the height is 1, so the slope is 1.

ln x is the inverse of eˣ, the natural logarithm. Its slope at x is 1/x, so it's steep near 0 and flattens out as x grows, but it never stops increasing. The rule only applies for x > 0, where ln x is defined.

Combining with earlier rules

The constant multiple, sum and difference rules apply as usual. For f(x) = 3 sin x − 2 cos x + eˣ − 4 ln x, the derivative is f′(x) = 3 cos x + 2 sin x + eˣ − 4/x.

Log properties can turn a hard-looking log into an easy one. ln(5x) = ln 5 + ln x, so its derivative is 0 + 1/x = 1/x. And ln(x³) = 3 ln x, with derivative 3/x.

Limits that are secretly these derivatives

Knowing these derivatives lets you evaluate some tricky limits by recognizing the definition of the derivative. lim (h→0) (eʰ − 1)/h is (f(0 + h) − f(0))/h for f(x) = eˣ, so it equals f′(0) = e⁰ = 1. Similarly, lim (h→0) ln(1 + h)/h is the derivative of ln x at x = 1, which is 1/1 = 1, and lim (h→0) (sin(π/2 + h) − 1)/h is the derivative of sin x at π/2, which is cos(π/2) = 0.

Worked examples

Try each one yourself first, then open the solution.

  1. Example 1

    Tangent line with eˣ and sin x

    Find the equation of the line tangent to y = eˣ + sin x at x = 0.

    Show the solution
    1. Step 1: Point: y(0) = e⁰ + sin 0 = 1 + 0 = 1. The point is (0, 1).
    2. Step 2: Slope: y′ = eˣ + cos x, so y′(0) = 1 + 1 = 2.
    3. Step 3: Equation: y − 1 = 2(x − 0).

    Answer: y = 2x + 1

  2. Example 2

    Tangent line to ln x

    Find the tangent line to y = ln x at x = 1.

    Show the solution
    1. Step 1: Point: ln 1 = 0, so (1, 0).
    2. Step 2: Slope: y′ = 1/x, so the slope at x = 1 is 1.
    3. Step 3: Equation: y − 0 = 1(x − 1).

    Answer: y = x − 1

  3. Example 3

    Trap: constants that look like functions

    Differentiate f(x) = e² + 4 cos x − ln(5x).

    Show the solution
    1. Step 1: e² is a constant (about 7.389), so its derivative is 0, not e² and not 2e.
    2. Step 2: d/dx (4 cos x) = 4(−sin x) = −4 sin x. Keep the minus sign from the cosine rule.
    3. Step 3: ln(5x) = ln 5 + ln x, so its derivative is 1/x.
    4. Step 4: Combine: 0 − 4 sin x − 1/x.

    Answer: f′(x) = −4 sin x − 1/x

Common mistakes

  • Getting the sign wrong on cos x: its derivative is −sin x. The derivative of sin x has no minus sign.
  • Using the power rule on eˣ, like writing x·eˣ⁻¹. The exponent is the variable, so the power rule doesn't apply.
  • Using degrees on a calculator. Make sure your calculator is in radian mode.

On the exam

  • These derivatives appear everywhere, often combined with the chain rule (3.1). Know them instantly.
  • Free-response questions often use eˣ or trig models in context, like temperature T(t) = 60 + 10 sin(πt/12). You'll need these rules plus the chain rule.

Connected topics

Videos

  • Calculus AB/BC – 2.7 Derivatives of cos(x), sin(x), e^x, and ln(x)

    The AlgebrosWatch on YouTube (opens in a new tab)

  • Derivatives of sin(x) and cos(x) | Derivative rules | AP Calculus AB | Khan Academy

    Khan AcademyWatch on YouTube (opens in a new tab)

  • What's so special about Euler's number e? | Chapter 5, Essence of calculus

    3Blue1BrownWatch on YouTube (opens in a new tab)

  • Derivative of Sine and Cosine Functions | Calculus

    The Organic Chemistry TutorWatch on YouTube (opens in a new tab)

  • Derivatives of Logarithmic and Exponential Functions

    Professor Dave ExplainsWatch on YouTube (opens in a new tab)

  • how do we know the derivative of ln(x) is 1/x (the definition & implicit differentiation)

    blackpenredpenWatch on YouTube (opens in a new tab)

Check yourself

4 questions on 2.7 Derivatives of cos x, sin x, eˣ, and ln x. Pick an answer to see if you got it, and why.

Question 1 of 4

If f(x) = 4 sin x + 3 cos x − eˣ, what is f′(π/2)?

Question 2 of 4

Which of the following is an equation of the line tangent to the graph of y = 2 ln x at x = e ?

Question 3 of 4

What is lim (h→0) (ln(e + h) − 1)/h ?

Question 4 of 4Calculator allowed

Let f be the function given by f(x) = eˣ − 2x². At which values of x does the graph of f have a horizontal tangent line?

0 of 4 answered