02.06 Lesson 6 of 12

1 h

Derivatives & Rates of Change

Understand a derivative as the local rate of change and use basic differentiation rules to reason about how a function responds to its input.

By the end of this lesson

You will be able to

  • Explain average versus instantaneous rate of change.
  • Interpret a derivative as the slope of a tangent.
  • Apply the power rule to simple functions.
  • Use a finite difference to approximate a derivative.

The derivative is a local slope

The average rate of change between two points is (f(x + h) - f(x)) / h. The derivative is the limit as the step h approaches zero. Geometrically, it is the slope of the tangent line at a point. A positive derivative means the function is increasing locally; a negative derivative means it is decreasing locally.

def f(x):
    return x ** 2

x = 3.0
h = 1e-5
numerical = (f(x + h) - f(x)) / h
print(numerical)  # approximately 6

Use the power rule

For f(x) = xⁿ, the power rule gives f'(x) = n xⁿ⁻¹. Constants differentiate to zero, and a constant multiplier stays outside the derivative. For example, if f(x) = 3x² + 2x + 5, then f'(x) = 6x + 2. This derivative tells you the local change in output for a small change in the input.

# f(x) = 3x^2 + 2x + 5
# f'(x) = 6x + 2

x = 4
derivative = 6 * x + 2
print(derivative)  # 26

Apply what you learned

Exercise

Check a derivative with a finite difference

Compare an analytic derivative with a numerical approximation at several points.

  1. Define f(x) = 3x**2 + 2x + 5.
  2. Write its derivative as a separate Python function.
  3. Approximate the derivative using a small positive h.
  4. Compare analytic and numerical results at x = -1, 0 and 4.
  5. Try a much larger step and explain why the approximation changes.
Done when

The numerical estimate approaches the analytic derivative as h becomes small, while you can explain that a finite step is an approximation rather than the exact limit.

Free references

Study resources

1 links
  1. 01
    Derivative formulas through geometry | Chapter 3 Video

    Watch the single chapter for the geometric meaning of a derivative and the basic rules.

Check your understanding

Self-test

2 questions
  1. Question 1

    What does f'(x) = 0 tell you?

  2. Question 2

    What does the power rule give for f(x) = 5x⁴?

Completion check

Move on when

You can differentiate a basic polynomial and verify its local slope with a finite-difference approximation.

Quick find

Search Michi

Type to search every stage, section, unit, topic and resource.

Enter opens the first result Esc closes

Reference

Keyboard shortcuts

n
Continue to the first unit not passed
j / k
Next / previous unit
1 2 3
Toggle learned, practised, passed
/
Open search
?
Show this help
Esc
Close open panels