Free for students · Ad-free · WCAG 2.1 AA Compliant · Accessibility

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

Lesson ~10 min read

In simple terms: In simple terms, this lesson teaches you the specific rules for finding the rate of change (the derivative) for four important functions: sine, cosine, e^x, and natural log (ln x).

Why this matters

Imagine you’re a junior sound engineer for a popular podcast, and your job is to analyze audio waves. You notice that the shape of a pure musical note looks exactly like a sine wave. Your boss, Maya, asks you, "At what exact moments is the sound changing most rapidly?" To answer that, you need to find where the slope of that sine wave is steepest.

Calculus gives us the tools to answer questions like this. So far, you've mastered the Power Rule, which is like a reliable Phillips head screwdriver in your calculus toolkit. But it can't handle every job. To analyze waves, exponential growth, or logarithmic scales, you need specialized tools. Today, we're adding four new "power tools" to your kit: the derivatives for sine, cosine, the exponential function e^x, and the natural logarithm ln x.

Concept overview

flowchart TD
    A[Start: Find the derivative of f(x)] --> B{What is f(x)?};
    B --> C{sin(x)};
    C --> D[f'(x) = cos(x)];
    B --> E{cos(x)};
    E --> F[f'(x) = -sin(x)];
    B --> G{e^x};
    G --> H[f'(x) = e^x];
    B --> I{ln(x)};
    I --> J[f'(x) = 1/x];
    subgraph Legend
        K(Be careful!) --- L(Note the negative sign for cosine's derivative);
    end
This flowchart helps you decide how to find a derivative. It starts with a function, f(x), and branches into four paths based on whether the function is sin(x), cos(x), e^x, or ln(x), each leading to its correct derivative. A legend highlights the negative sign in the derivative of cosine.

Core explanation

Welcome! I’m Saavi, and I’m excited to guide you through some of the most fundamental building blocks of calculus. Up until now, you've been working with derivatives of polynomial functions. Today, we expand our world to include trigonometric, exponential, and logarithmic functions.

Think of these new rules not just as formulas to memorize, but as descriptions of how these functions behave.

The Four Essential Rules

Let's get right to it. These are four rules you absolutely must commit to memory. We'll explore what they mean in a moment.

  1. The Derivative of sin(x) d/dx [sin(x)] = cos(x)

  2. The Derivative of cos(x) d/dx [cos(x)] = -sin(x)

  3. The Derivative of e^x d/dx [e^x] = e^x (Yes, you read that right! It's its own derivative.)

  4. The Derivative of ln(x) d/dx [ln(x)] = 1/x, for x > 0

Let's take a breath. Just look at those. They're clean, simple, and powerful. Let's make sure they make sense.

Visualizing the Sine and Cosine Derivatives

Why is the derivative of sin(x) equal to cos(x)? Let's visualize it.

Picture the graph of y = sin(x).

  • At x = 0, the graph is moving upward, and the slope of the tangent line is exactly 1. And what is cos(0)? It's 1.
  • At x = π/2, the sine graph is at its peak. The tangent line is horizontal, so its slope is 0. And what is cos(π/2)? It's 0.
  • At x = π, the graph is crossing the x-axis, heading downward. The slope is -1. And cos(π) is -1.

The derivative cos(x) perfectly describes the value of the slope of sin(x) at every single point.

The Magic of e^x

The function f(x) = e^x is truly special in all of mathematics. It is the only function (besides a multiple of it, like f(x) = 5e^x) that is its own derivative.

Imagine you have a savings account in a magical bank. The value of your account is $V. The bank tells you that the rate at which your money grows, in dollars per year, is also $V.

  • If you have $10, it grows at $10/year.
  • If you have $1000, it grows at $1000/year.

This is exactly what e^x does. At any point x, the value of the function is e^x, and the slope (rate of change) is also e^x. It’s a perfect model for unchecked growth, from bacteria in a lab to compound interest.

The Natural Logarithm ln(x)

The rule d/dx [ln(x)] = 1/x is straightforward, but remember the domain. The natural log function ln(x) is only defined for positive numbers (x > 0), so its derivative 1/x is also considered in that context.

The AP Shortcut: Recognizing the Limit Definition

Okay, let's switch gears. This next part is about connecting these new rules to a topic from the beginning of the course: the limit definition of a derivative.

Remember this? f'(a) = lim (h→0) [f(a + h) - f(a)] / h

The AP exam loves to give you a limit that looks like this and ask you to evaluate it. You could try to use algebra or L'Hôpital's Rule (which you'll learn about later), but there's a much faster way.

The strategy is to recognize the limit as the definition of a derivative for a function you know.

Let's say you see this on a test: Evaluate: lim (h→0) [cos(π + h) - cos(π)] / h

Don't panic! Break it down.

  1. 1
    Match the pattern
    This looks exactly like [f(a + h) - f(a)] / h.
  2. 2
    Identify the function
    By comparing the two, you can see that f(x) = cos(x).
  3. 3
    Identify the point
    You can also see that a = π.
  4. 4
    Translate the question
    The question is not "solve this limit." The real question is "What is the derivative of cos(x) evaluated at x = π?"
  5. 5
    Solve the easier problem
    • We know f'(x) = d/dx [cos(x)] = -sin(x).
    • Now, just plug in a = π: f'(π) = -sin(π) = 0.

The answer is 0. By recognizing the definition, you turned a complicated limit problem into a simple derivative calculation. This is a skill you'll want to practice until it's second nature.

Worked examples

Let's put these new rules into practice with a few examples.


Example 1

Combining the Rules

Problem: Find the derivative of f(x) = 4e^x + 2sin(x).

Solution:

This problem looks complex, but it's just a combination of our new rules with the Sum and Constant Multiple rules you already know.

  1. 1
    Break it down
    We can take the derivative of each term separately. d/dx [4e^x + 2sin(x)] = d/dx [4e^x] + d/dx [2sin(x)]
  2. 2
    Apply the Constant Multiple Rule
    The constants (4 and 2) can be pulled out in front of the derivative operator. = 4 * d/dx [e^x] + 2 * d/dx [sin(x)]
  3. 3
    Apply the new derivative rules
    Now we just substitute the rules we just learned.
    • We know d/dx [e^x] = e^x.
    • We know d/dx [sin(x)] = cos(x).

    Substituting these in gives us: = 4 * (e^x) + 2 * (cos(x))

  4. 4
    Final Answer
    f'(x) = 4e^x + 2cos(x)

Why this matters: This shows that our new rules play nicely with the old ones. You can mix and match them to handle more complex functions. A common mistake here is to get overwhelmed and forget the basic Sum Rule. Just handle one piece at a time.


Example 2

Finding a Tangent Line

Problem: Find the equation of the line tangent to the graph of y = ln(x) at the point x = 1.

Solution:

Remember, to find the equation of a line, we need two things: a point and a slope.

  1. 1
    Find the point (x, y)
    We are given x = 1. To find the y-coordinate, we plug it into the original function. y = ln(1) = 0 So, our point is (1, 0).
  2. 2
    Find the slope (m)
    The slope of the tangent line is given by the derivative at that point.
    • First, find the derivative function: y' = d/dx [ln(x)] = 1/x.
    • Now, evaluate the derivative at our specific point, x = 1. m = y'(1) = 1/1 = 1 The slope of our tangent line is 1.
  3. 3
    Use point-slope form
    Now we write the equation of the line using the point (1, 0) and slope m = 1. The point-slope form is y - y₁ = m(x - x₁). y - 0 = 1(x - 1) y = x - 1

Final Answer: The equation of the tangent line is y = x - 1.

Where students go wrong: A frequent error is plugging x=1 into the function before taking the derivative. If you do that, you'd be trying to find the derivative of ln(1), which is the derivative of the constant 0, giving you a slope of 0. Always find the general derivative function first, then plug in the x-value.


Example 3

The Limit Shortcut

Problem: Evaluate the limit: lim (h→0) [e^(3+h) - e^3] / h

Solution:

As soon as you see lim (h→0) and a fraction with h in the denominator, your brain should check if it matches the definition of a derivative.

  1. 1
    Recognize the pattern
    The expression [e^(3+h) - e^3] / h perfectly matches the form [f(a + h) - f(a)] / h.
  2. 2

    Identify f(x) and a:

    • Comparing the expressions, the function being used is f(x) = e^x.
    • The point of evaluation is a = 3.
  3. 3
    Re-frame the problem
    The question is secretly asking, "What is the derivative of f(x) = e^x at x = 3?" This is f'(3).
  4. 4
    Calculate the derivative
    • The derivative of e^x is the easiest one: f'(x) = e^x.
    • Now, evaluate this at x = 3: f'(3) = e^3.

Final Answer: The value of the limit is e^3.

Why this is important: Trying to solve this by plugging in h=0 gives you 0/0, an indeterminate form. Recognizing the derivative definition is a direct, elegant path to the answer and is a crucial skill for the AP exam.

Try it yourself

Ready to try a couple on your own? Don't worry about getting it perfect, just focus on the process.

  1. 1
    Problem
    A particle's position along the x-axis is given by p(t) = 10cos(t) - 3e^t, where t is time in seconds. Find the particle's velocity function, v(t).
    • Hint: Velocity is the derivative of position. Apply the rules we learned to each term. Remember to be careful with that cosine derivative!
  2. 2
    Problem
    Evaluate the following limit without using a calculator: lim (h→0) [ln(1+h) - ln(1)] / h
    • Hint: Does this limit look familiar? What function f(x) and what point a does it represent in the definition of a derivative? Once you identify them, the problem becomes much simpler.