➗ Mathematics · Undergraduate · MATH 151

Calculus I: Limits & Derivatives

A complete first course in single-variable calculus built around one big idea: the derivative, the instantaneous rate of change. You will start from functions and limits, build the derivative from its definition, master every core differentiation rule, and finish by applying derivatives to related rates and optimization before meeting the integral through antiderivatives. Every concept is taught…

Start the interactive course (quizzes, progress, videos) →

Free forever. No sign-up, no ads. 17 lessons. The full lesson text is below so you can read it right here.

Module 1: Functions and the Idea of a Limit

Review the functions calculus is built on, from their domains to composition, then meet the central concept of a limit that every later idea depends on. This module lays the vocabulary and intuition you will use for the rest of the course.

Functions and Precalculus Review

  • Describe a function using the vertical line test and interval notation for domain and range.
  • Identify the main function families and their basic shapes.
  • Evaluate and combine functions, including composition.

Calculus studies how quantities change, and the language it uses is the function. A function is a rule that assigns to each input exactly one output. We write f(x) to mean the output when the input is x. The set of allowed inputs is the domain, and the set of outputs the rule can actually produce is the range. A graph represents a function only if it passes the vertical line test: every vertical line touches the graph at most once, guaranteeing one output per input. This one-output rule is not a technicality; it is what lets us speak of "the" value, slope, or rate at a point, which is the entire business of calculus.

The function families you must know

Nearly every problem in this course is built from a small cast of familiar functions. Knowing their shapes at a glance saves enormous time later:

  • Polynomials such as f(x) = 3x^2 - 5x + 1, smooth curves defined for every real number, with no breaks or holes.
  • Rational functions such as f(x) = 1/x, which are undefined wherever the denominator is zero and often have asymptotes there.
  • Root functions such as f(x) = sqrt(x), defined only where the inside is not negative, so its domain is x >= 0.
  • Trigonometric functions such as sin(x) and cos(x), which repeat, or are periodic, with period 2 pi.
  • Exponential and logarithmic functions such as e^x and ln(x), which describe growth and its inverse and are central to every applied science.

Interval notation

We describe sets of numbers with intervals. Square brackets include an endpoint and parentheses exclude it. The domain of sqrt(x) is written [0, infinity), meaning zero is included but there is no upper bound, so infinity always gets a parenthesis because it is not a number you can reach. The domain of 1/x is (-infinity, 0) union (0, infinity), every real number except zero. Getting comfortable reading and writing these is important because almost every limit and continuity question is secretly a question about where a function is or is not defined.

Even, odd, and symmetry

Two symmetries appear constantly. A function is even if f(-x) = f(x), giving a graph symmetric about the y-axis, like x^2 or cos(x). It is odd if f(-x) = -f(x), giving symmetry about the origin, like x^3 or sin(x). Recognizing symmetry lets you predict half a graph from the other half and often shortcuts a calculation.

Combining functions and composition

You can add, subtract, multiply, and divide functions. The operation that matters most for calculus is composition, feeding one function into another, written (f o g)(x) = f(g(x)). You work from the inside out: evaluate the inner function first, then apply the outer one to that result.

Worked example. Let f(x) = x^2 + 1 and g(x) = 3x - 2. Find f(g(4)).

  1. Evaluate the inside first: g(4) = 3(4) - 2 = 10.
  2. Feed that into the outside function: f(10) = 10^2 + 1 = 101.

So f(g(4)) = 101. Order matters: reversing to g(f(4)) gives g(17) = 3(17) - 2 = 49, a completely different number. Recognizing an expression as a composition, an outer function wrapped around an inner one, is exactly the skill you will need later for the chain rule, so it is worth practicing now until it is automatic.

Why this matters for calculus

Every derivative rule you will learn is organized by these same categories. The power rule handles polynomials and roots, special rules handle trig and exponentials, and the chain rule handles compositions. When a derivative problem looks intimidating, the first move is always to ask which families are present and how they are combined, added, multiplied, divided, or nested. That diagnosis, learned here, turns hard problems into routine ones.

Key terms
Function
A rule that assigns exactly one output to each input.
Domain
The set of all allowed inputs of a function.
Range
The set of all outputs the function actually produces.
Vertical line test
A graph is a function if no vertical line crosses it more than once.
Composition
Applying one function to the result of another, written f(g(x)).
Interval notation
A way to write sets of numbers using brackets and parentheses.
Even function
A function with f(-x) = f(x), symmetric about the y-axis.
Odd function
A function with f(-x) = -f(x), symmetric about the origin.

The Idea of a Limit

  • Explain intuitively what it means for a function to approach a limit.
  • Estimate a limit from a table or graph.
  • Distinguish the limit of a function from its value at a point.

The limit is the single most important idea in calculus. Informally, the limit of f(x) as x approaches a number a is the value that f(x) gets closer and closer to as x gets closer and closer to a, from both sides. We write this as lim (x to a) f(x) = L. The crucial point, which trips up many beginners, is that we care about what happens near a, not what happens at a itself. The function need not even be defined at a for the limit to exist.

Why the value at the point does not matter

Consider f(x) = (x^2 - 9)/(x - 3). If you plug in x = 3 directly you get 0/0, which is undefined, so the function has a hole there. But the limit still exists. Watch what the outputs do as x creeps toward 3:

x2.92.992.9993.0013.013.1
f(x)5.95.995.9996.0016.016.1

From both sides the outputs zero in on 6. So lim (x to 3) f(x) = 6, even though f(3) does not exist. This is exactly the situation where limits earn their keep: they describe behavior at a point the function cannot reach. Notice that away from x = 3 the expression simplifies, since (x^2 - 9)/(x - 3) = (x - 3)(x + 3)/(x - 3) = x + 3, and x + 3 at x = 3 is 6. The table and the algebra agree.

Here is a small picture of that hole. The curve behaves like the line y = x + 3 everywhere except at the missing point (3, 6).

Graph of (x squared minus 9) over (x minus 3) showing an open hole at the point (3, 6) hole at (3, 6) x y

One-sided behavior

Sometimes a function approaches different values from the left and the right. The left-hand limit uses inputs slightly less than a (written x to a^-) and the right-hand limit uses inputs slightly greater (written x to a^+). A two-sided limit exists only when both one-sided limits exist and agree. If the left and right values differ, as they do at a sudden jump, the two-sided limit does not exist. Think of a step in a staircase: approaching the step from below lands you at one height, from above at another, so there is no single value the function approaches.

When a limit fails to exist

There are three classic ways a limit can fail. First, a jump: the left and right limits disagree, common in piecewise functions. Second, an infinite blow-up: the outputs grow without bound, as 1/x^2 does at zero, so no finite value is approached. Third, wild oscillation: sin(1/x) near zero swings between -1 and 1 faster and faster, never settling. Recognizing these patterns tells you at a glance when to stop hunting for a value that is not there.

Estimating limits carefully

Tables are a good first tool, but they can mislead if you do not get close enough to a. Always test values on both sides and step in by factors of ten, as in the table above, so you can see the outputs stabilizing. A graph is even better when you have one: trace the curve toward a from each side and read off the height the curve is heading for, ignoring any single plotted or missing point exactly at a. In the next module we replace these estimates with exact algebra, but the intuition you build here, that a limit is a destination not a stop, underlies everything that follows.

Key terms
Limit
The value a function approaches as the input approaches a given number.
Left-hand limit
The value approached using inputs slightly less than the target, written x to a^-.
Right-hand limit
The value approached using inputs slightly greater than the target, written x to a^+.
Removable discontinuity
A hole in a graph where the limit exists but the function value does not match.
Does not exist (DNE)
A limit fails to exist when the left and right limits disagree or grow without bound.
Oscillation
Repeated swinging of outputs, as in sin(1/x) near 0, which prevents a limit.

Module 2: Computing Limits and Continuity

Turn the intuition of a limit into reliable algebraic techniques, from direct substitution through factoring, rationalizing, and the Squeeze Theorem. Then define continuity precisely and meet the Intermediate Value Theorem it powers.

Computing Limits Algebraically

  • Apply the limit laws and direct substitution.
  • Resolve 0/0 indeterminate forms by factoring or rationalizing.
  • Use the Squeeze Theorem and the special trig limit sin(x)/x.

Tables are convincing but slow, and they can never give an exact value with certainty. Most limits can be found exactly with algebra. The first tool is direct substitution: if f is a polynomial, a rational function, a root, or a trig, exp, or log function, and a is in its domain, then lim (x to a) f(x) = f(a). You simply plug in. For example lim (x to 2) (3x^2 - x) = 3(4) - 2 = 10. This works because those functions are continuous on their domains, a fact we prove in the continuity lesson, so the destination equals the value.

The limit laws

Limits respect arithmetic. If lim (x to a) f(x) and lim (x to a) g(x) both exist, then:

  • The limit of a sum is the sum of the limits, and likewise for differences.
  • The limit of a product is the product of the limits, so constants factor out: lim (c f) = c lim f.
  • The limit of a quotient is the quotient of the limits, as long as the bottom limit is not zero.
  • The limit of a power or root is that power or root of the limit.

These laws are what make direct substitution valid: a polynomial is built from sums and products of the simple limits lim (x to a) x = a and lim (x to a) c = c, so its limit is just the polynomial evaluated at a.

Indeterminate form 0/0

When substitution gives 0/0, the answer is not automatically undefined; the form is indeterminate, meaning more work is needed because the result could be anything. Two reliable techniques handle most cases.

Technique 1, factor and cancel. Evaluate lim (x to 3) (x^2 - 9)/(x - 3).

  1. Substitution gives 0/0, so factor: x^2 - 9 = (x - 3)(x + 3).
  2. Cancel the common factor: (x - 3)(x + 3)/(x - 3) = x + 3 for x not equal to 3.
  3. Now substitute: 3 + 3 = 6.

So the limit is 6, matching the table from the previous lesson. The cancellation is legal precisely because the limit ignores x = 3 itself, where the canceled factor would be zero.

Technique 2, rationalize. Evaluate lim (x to 0) (sqrt(x + 9) - 3)/x.

  1. Substitution gives 0/0. Multiply top and bottom by the conjugate sqrt(x + 9) + 3.
  2. The numerator becomes (x + 9) - 9 = x, so the expression is x / [x(sqrt(x + 9) + 3)].
  3. Cancel x to get 1/(sqrt(x + 9) + 3), then substitute: 1/(3 + 3) = 1/6.

Rationalizing works whenever a square root sits inside a difference that collapses to 0/0; the conjugate turns the stubborn root difference into a plain subtraction.

The Squeeze Theorem and a famous limit

The Squeeze Theorem says that if g(x) <= f(x) <= h(x) near a, and g and h both approach the same limit L, then f is trapped and must also approach L. It is the tool of choice when a function is too wiggly to attack directly but can be bounded above and below. It proves the single most important trig limit:

lim (x to 0) sin(x)/x = 1

Substitution gives 0/0, but a geometric argument bounds sin(x)/x between cos(x) and 1 near zero, and both squeeze to 1, pinning the value to exactly 1. A close relative is lim (x to 0) (1 - cos(x))/x = 0. These two limits are the foundation for differentiating trigonometric functions in Module 4, so commit them to memory.

A worked combination

Evaluate lim (x to 0) sin(3x)/x. Rewrite it to expose the special limit: sin(3x)/x = 3 * sin(3x)/(3x). As x to 0, the inside 3x to 0 as well, so sin(3x)/(3x) to 1, leaving 3 * 1 = 3. Reshaping an expression until a known limit appears is a recurring theme, and it rewards you for memorizing the handful of core limits.

Key terms
Direct substitution
Evaluating a limit by plugging the target value into the function when it is defined there.
Limit laws
Rules that let the limit of a sum, product, or quotient be built from simpler limits.
Indeterminate form
An expression like 0/0 whose value cannot be decided without further work.
Conjugate
The expression formed by switching the sign between two terms, used to rationalize.
Squeeze Theorem
If a function is trapped between two others that share a limit, it shares that limit too.
Radian
The angle measure that makes sin(x)/x approach 1, required for clean trig calculus.

One-Sided Limits and Limits at Infinity

  • Evaluate one-sided limits and infinite limits at vertical asymptotes.
  • Find limits at infinity by comparing leading terms.
  • Identify horizontal asymptotes from limits at infinity.

Two situations stretch the limit idea beyond a finite destination: what happens as x approaches a point where the function blows up, and what happens as x runs off toward infinity. Both describe the long-range and near-singular shape of a graph, and both are read off with limits.

Infinite limits and vertical asymptotes

Consider f(x) = 1/x near zero. As x approaches 0 from the right (small positive numbers), 1/x grows without bound, so lim (x to 0^+) 1/x = +infinity. From the left (small negative numbers) it plunges, so lim (x to 0^-) 1/x = -infinity. Because the two sides disagree, the two-sided limit does not exist, and the line x = 0 is a vertical asymptote. Writing infinity here is shorthand for unbounded growth; it is not a number the function reaches. Vertical asymptotes appear in rational functions wherever the denominator is zero but the numerator is not, since dividing a nonzero number by something tiny produces something huge.

Reading the sign of an infinite limit takes a quick sign check. For lim (x to 2^+) 1/(x - 2), inputs just above 2 make x - 2 a small positive number, so the quotient is a large positive number: the limit is +infinity. Just below 2, x - 2 is a small negative number, so the limit is -infinity. Tracking that sign is the whole skill.

Limits at infinity

To ask what happens for very large x, we compute lim (x to infinity) f(x). For a rational function, the behavior is decided by the leading terms, the highest powers on top and bottom, because for enormous x the lower-power terms are negligible by comparison. A clean method is to divide every term by the highest power of x in the denominator.

Worked example. Evaluate lim (x to infinity) (3x^2 - 5x + 2)/(6x^2 + 4x - 1).

  1. Divide every term by x^2: the expression becomes (3 - 5/x + 2/x^2)/(6 + 4/x - 1/x^2).
  2. As x to infinity, every term with an x in the denominator goes to 0.
  3. What remains is 3/6 = 1/2.

So the limit is 1/2, and the line y = 1/2 is a horizontal asymptote. A horizontal asymptote describes the height the graph levels off toward far out to the left or right.

The three cases for rational functions

DegreesLimit at infinity
Top degree < bottom degree0
Top degree = bottom degreeratio of leading coefficients
Top degree > bottom degreeplus or minus infinity (no horizontal asymptote)

For instance lim (x to infinity) (2x + 1)/(x^2 + 3) = 0 because the bottom grows faster, while lim (x to infinity) (5x^3 + 2)/(2x^2 + 7) = infinity because the top wins. Matching the leading terms is the whole game, and it lets you predict end behavior at a glance without any table.

Beyond rational functions

Limits at infinity apply to other families too. Exponentials dominate powers: lim (x to infinity) e^x = infinity, and in fact e^x outgrows every polynomial, so lim (x to infinity) x^2/e^x = 0. Decaying exponentials vanish: lim (x to infinity) e^(-x) = 0, which is why y = 0 is the horizontal asymptote of a cooling curve or a discharging capacitor. The logarithm grows without bound but extremely slowly, so lim (x to infinity) ln(x) = infinity even though it never levels off. Knowing this hierarchy, exponentials beat powers beat logarithms, lets you resolve many limits by inspection.

Why it matters

End behavior is the backbone of curve sketching and of modeling. A population that levels off has a horizontal asymptote at its carrying capacity; a reaction rate that saturates approaches a ceiling; a dose-response curve flattens at high dose. Each of these real behaviors is a limit at infinity, and reading it off the leading terms turns a messy formula into a one-line prediction about the long run.

Key terms
Infinite limit
A limit where the function grows or falls without bound, written as plus or minus infinity.
Vertical asymptote
A vertical line the graph approaches as the function blows up near a point.
Limit at infinity
The value a function approaches as x grows arbitrarily large or small.
Horizontal asymptote
A horizontal line the graph approaches as x goes to plus or minus infinity.
Leading term
The term with the highest power, which controls end behavior.
Slant asymptote
A diagonal line the graph approaches when the top degree is one more than the bottom.

Continuity

  • State the three-part definition of continuity at a point.
  • Classify removable, jump, and infinite discontinuities.
  • Apply the Intermediate Value Theorem.

A function is continuous at a point if you can draw through it without lifting your pen. That picture is good intuition, but calculus needs precision. Formally, f is continuous at x = a when all three of the following hold:

  1. f(a) is defined (the point exists),
  2. lim (x to a) f(x) exists (the two sides agree), and
  3. lim (x to a) f(x) = f(a) (the limit equals the value).

If any one of these fails, f has a discontinuity at a. Checking continuity is therefore a checklist: does the point exist, does the limit exist, and do they match. Polynomials pass all three everywhere, so they are continuous on all of the real line. Rational, root, trig, exponential, and log functions are continuous everywhere in their domains, which is exactly why direct substitution works for their limits; continuity is the property that makes plugging in legal.

Three kinds of discontinuity

  • Removable (a hole): the limit exists but does not equal f(a), or f(a) is missing. Example: (x^2 - 1)/(x - 1) at x = 1, where the limit is 2 but the function is undefined. You could patch the hole by defining the value to be 2, which is why it is called removable.
  • Jump: the left and right limits both exist but differ, so the graph leaps. These appear in piecewise functions and in real step processes like postage rates or tax brackets.
  • Infinite: the function blows up to infinity, as 1/x does at x = 0. There is a vertical asymptote, and no patching can fix it.

Worked example, classifying a discontinuity

Where is f(x) = (x^2 - 1)/(x - 1) discontinuous, and what type is it?

  1. The denominator is zero at x = 1, so the function is undefined there; part 1 of the definition fails.
  2. But the limit exists: factor to (x - 1)(x + 1)/(x - 1) = x + 1, giving lim (x to 1) = 2.
  3. Since the limit exists but the value is missing, this is a removable discontinuity, a hole at (1, 2).

Worked example, a piecewise function

Let f(x) = x + 1 for x < 2 and f(x) = x^2 for x >= 2. Is it continuous at x = 2? The left-hand limit is 2 + 1 = 3; the right-hand limit is 2^2 = 4. Since 3 does not equal 4, the two-sided limit does not exist, and there is a jump discontinuity of size 1 at x = 2. Piecewise functions are continuous at a seam only when the pieces meet, that is when the one-sided limits and the value all coincide.

The Intermediate Value Theorem

Continuity has a powerful payoff. The Intermediate Value Theorem (IVT) says that if f is continuous on a closed interval [a, b], then f takes every value between f(a) and f(b) at least once. In practice this guarantees roots: if f is continuous and changes sign, say f(1) = -2 and f(2) = 3, then somewhere between 1 and 2 the function must equal 0. The IVT is why a continuous temperature that goes from below freezing to above freezing must pass through exactly 0 degrees at some moment, and it is the basis of the bisection method, a simple root-finding algorithm that repeatedly halves an interval where the sign changes.

Why continuity matters downstream

Continuity is not just tidy; it is a prerequisite for the big theorems ahead. The derivative is defined through a limit, and a function must at least be continuous to be differentiable. The Extreme Value Theorem, which guarantees that optimization problems on a closed interval actually have a maximum and minimum, requires continuity. When you assume a function is "nice" in a modeling problem, continuity is usually the property you are quietly relying on.

Key terms
Continuous at a point
f(a) exists, the limit exists, and the limit equals f(a).
Discontinuity
A point where a function fails to be continuous.
Removable discontinuity
A hole where the limit exists but the value is missing or different.
Jump discontinuity
A break where the left and right limits exist but disagree.
Infinite discontinuity
A break where the function grows without bound, giving a vertical asymptote.
Intermediate Value Theorem
A continuous function on [a, b] hits every value between f(a) and f(b).

Module 3: The Derivative

Build the derivative from the limit of a difference quotient and interpret what it measures, connecting the slope of a tangent line to the instantaneous rate of change. This is the conceptual heart of the whole course.

The Definition of the Derivative

  • Write the difference quotient and take its limit to define the derivative.
  • Compute a derivative from the definition for polynomials and simple functions.
  • Connect the derivative to the slope of a tangent line.

The derivative answers a deceptively simple question: how fast is f(x) changing at a single instant? An average rate of change over an interval from x to x + h is the slope of the line through two points, called the difference quotient:

[f(x + h) - f(x)] / h

This measures average change over a gap of width h, the rise f(x + h) - f(x) divided by the run h. To get the instantaneous rate, we shrink the gap to zero by taking a limit. That limit is the derivative, written f'(x):

f'(x) = lim (h to 0) [f(x + h) - f(x)] / h

We cannot simply set h = 0, because that gives 0/0. The genius of the limit is that it captures the trend as h shrinks without ever dividing by zero, exactly the indeterminate-form skill from Module 2 put to work.

The geometry: secants becoming tangents

Geometrically, each difference quotient is the slope of a secant line through two points on the curve, at x and at x + h. As h to 0 the second point slides toward the first, and the secant lines rotate into the tangent line, the line that just grazes the curve at one point. So the derivative is the slope of the tangent line, the exact steepness of the curve at that point. This is the bridge between algebra (a limit of quotients) and geometry (a slope), and it is why the same number answers both "how fast" and "how steep."

Worked example, from the definition

Find f'(x) for f(x) = x^2 using the definition.

  1. Form f(x + h) = (x + h)^2 = x^2 + 2xh + h^2.
  2. Subtract f(x): (x^2 + 2xh + h^2) - x^2 = 2xh + h^2.
  3. Divide by h: (2xh + h^2)/h = 2x + h (valid since h is not yet zero).
  4. Take the limit as h to 0: 2x + 0 = 2x.

So f'(x) = 2x. At x = 3 the slope is 2(3) = 6. The key move is step 3: canceling the h clears the 0/0 so the limit can be taken cleanly.

A second example with subtraction

Find f'(x) for f(x) = 3x^2 - 5x + 1.

  1. f(x + h) = 3(x + h)^2 - 5(x + h) + 1 = 3x^2 + 6xh + 3h^2 - 5x - 5h + 1.
  2. Subtract f(x): the 3x^2, -5x, and +1 cancel, leaving 6xh + 3h^2 - 5h.
  3. Divide by h: 6x + 3h - 5.
  4. Let h to 0: 6x - 5.

So f'(x) = 6x - 5. Every constant term cancels in step 2, which is the definition's way of confirming that constants have zero slope.

A non-polynomial example

The definition handles more than polynomials. For f(x) = 1/x: the difference quotient is [1/(x + h) - 1/x]/h. Combine the top over a common denominator to get [x - (x + h)]/[x(x + h)] = -h/[x(x + h)], all divided by h, which is -1/[x(x + h)]. Letting h to 0 gives -1/x^2. This matches the shortcut rule you will learn next module.

Notation and why the hard way first

Several notations mean the same derivative: f'(x) (Lagrange), dy/dx (Leibniz), and D f(x). The Leibniz form dy/dx deliberately echoes the rise-over-run of the difference quotient delta y / delta x with the gap taken to zero. Doing a few derivatives by hand from the definition builds genuine understanding of what a derivative is, and it motivates the shortcut rules of the next module, which produce these same answers instantly. When those rules start to feel like magic, this lesson is the reason they work.

Key terms
Difference quotient
The average rate of change [f(x+h) - f(x)]/h over a gap of width h.
Derivative
The limit of the difference quotient as h approaches 0, the instantaneous rate of change.
Secant line
A line through two points on a curve.
Tangent line
The line touching a curve at one point, whose slope is the derivative there.
Instantaneous rate of change
The rate at a single instant, given by the derivative.
Leibniz notation
The derivative written dy/dx, echoing rise over run with the gap taken to zero.

Interpreting the Derivative: Slope and Rate

  • Write the equation of a tangent line using the derivative.
  • Interpret the derivative as velocity in motion problems.
  • Read where a function increases or decreases from the sign of its derivative.

Once you can compute f'(x), it tells you two practical things at every point: the slope of the curve and the rate of change of whatever the function measures. These two readings, one geometric and one physical, are the reason the derivative is so widely useful across science, engineering, and economics.

Equation of the tangent line

The tangent line at x = a passes through the point (a, f(a)) with slope f'(a). Using point-slope form, its equation is:

y - f(a) = f'(a) (x - a)

Worked example. Find the tangent line to f(x) = x^2 at x = 3.

  1. The point: f(3) = 9, so the curve passes through (3, 9).
  2. The slope: f'(x) = 2x, so f'(3) = 6.
  3. Point-slope: y - 9 = 6(x - 3), which simplifies to y = 6x - 9.

The tangent line is the best straight-line approximation to the curve near x = 3: for inputs close to 3, x^2 and 6x - 9 give nearly the same output. This linear approximation idea underlies everything from calculator algorithms to error analysis in the lab.

The derivative as velocity

If s(t) gives the position of an object at time t, then the derivative s'(t) is the velocity, the instantaneous rate at which position changes. A positive velocity means moving forward, negative means backward, and zero means momentarily at rest, as at the top of a thrown ball's flight. Differentiating once more gives acceleration s''(t), the rate at which velocity changes. This is the original problem Newton and Leibniz built calculus to solve, and it generalizes: in any context, the derivative of a quantity with respect to time is its rate of flow. Marginal cost in economics is the derivative of total cost; current in a circuit is the derivative of charge; reaction rate in chemistry is the derivative of concentration.

Worked example, motion

A ball's height is s(t) = -16t^2 + 32t feet after t seconds. Its velocity is s'(t) = -32t + 32. At t = 0 the velocity is 32 ft/s upward. The ball is momentarily at rest when s'(t) = 0, that is -32t + 32 = 0, so t = 1 second, the peak of its flight. After that the velocity is negative and the ball descends. The acceleration is s''(t) = -32 ft/s^2, constant gravity, pointing down at all times.

Increasing, decreasing, and the sign of the derivative

The sign of f'(x) reveals the shape of the graph:

  • Where f'(x) > 0, the tangent slopes upward, so f is increasing.
  • Where f'(x) < 0, the tangent slopes downward, so f is decreasing.
  • Where f'(x) = 0, the tangent is horizontal, a possible peak or valley.

For example, f(x) = x^2 has f'(x) = 2x, which is negative for x < 0 (the left side falls) and positive for x > 0 (the right side rises), with a flat spot at x = 0, exactly matching the U shape of a parabola. This link between the sign of the derivative and the direction of the graph is the engine behind curve sketching and optimization, which you will meet in Module 6. It turns the abstract derivative into a practical tool: to understand a graph's behavior, find where its derivative is positive, negative, or zero.

Key terms
Tangent line equation
y - f(a) = f'(a)(x - a), the line touching the curve at x = a.
Linear approximation
Using the tangent line as the best straight-line estimate of a curve near a point.
Velocity
The derivative of position with respect to time.
Acceleration
The derivative of velocity, the second derivative of position.
Increasing
A function is increasing where its derivative is positive.
Decreasing
A function is decreasing where its derivative is negative.

Module 4: Differentiation Rules

Replace the slow limit definition with fast, reliable rules for differentiating any elementary function, from the power rule through the product, quotient, and chain rules. By the end you can differentiate essentially anything a first calculus course throws at you.

The Power, Constant, and Sum Rules

  • Apply the power rule to any power of x, including negative and fractional exponents.
  • Use the constant multiple and sum or difference rules.
  • Differentiate any polynomial quickly.

Computing every derivative from the limit definition would be exhausting. Fortunately, patterns emerge that we can package as rules, each one provable from the definition but far faster to use. The most important is the power rule:

d/dx (x^n) = n x^(n-1)

In words: bring the exponent down in front as a multiplier, then subtract one from the exponent. It works for every real exponent, positive, negative, or fractional. For example d/dx (x^5) = 5x^4. You can see it agrees with the definition: last module we found d/dx (x^2) = 2x, and the power rule gives 2 x^1 = 2x instantly.

Supporting rules

  • Constant rule: the derivative of a constant is 0, since a flat line has zero slope. d/dx (7) = 0.
  • Constant multiple rule: a constant factor comes along for the ride. d/dx (c f(x)) = c f'(x), so d/dx (5x^3) = 5 * 3x^2 = 15x^2.
  • Sum and difference rule: differentiate term by term. d/dx (f +/- g) = f' +/- g'.

Together these let you differentiate any polynomial in one pass, term by term, with no limits in sight. These three rules follow directly from the corresponding limit laws in Module 2, which is why they are trustworthy rather than mere recipes.

Worked example, a polynomial

Differentiate f(x) = 7x^4 - 2x^3 + x - 9.

  1. d/dx (7x^4) = 7 * 4x^3 = 28x^3.
  2. d/dx (-2x^3) = -2 * 3x^2 = -6x^2.
  3. d/dx (x) = 1 (since x = x^1 gives 1 * x^0 = 1).
  4. d/dx (-9) = 0.

So f'(x) = 28x^3 - 6x^2 + 1. Notice each term drops one degree, so a fourth-degree polynomial has a third-degree derivative, a useful sanity check.

Negative and fractional exponents

Rewrite roots and reciprocals as powers first, then apply the rule. This is the step students most often skip, and it is where most errors hide.

  • sqrt(x) = x^(1/2), so d/dx sqrt(x) = (1/2) x^(-1/2) = 1/(2 sqrt(x)).
  • 1/x = x^(-1), so d/dx (1/x) = -1 * x^(-2) = -1/x^2.
  • 1/x^3 = x^(-3), so its derivative is -3 x^(-4) = -3/x^4.
  • A cube root: x^(1/3) has derivative (1/3) x^(-2/3) = 1/(3 x^(2/3)).

Notice these match the definition-based answers from Module 3 exactly, but now they take seconds. Always convert to exponent form before differentiating, and convert back to root or fraction form to present the answer cleanly.

A worked example mixing forms

Differentiate f(x) = 4 sqrt(x) + 2/x - 3. Rewrite as 4 x^(1/2) + 2 x^(-1) - 3. Then term by term: 4 * (1/2) x^(-1/2) = 2 x^(-1/2); 2 * (-1) x^(-2) = -2 x^(-2); and the constant gives 0. So f'(x) = 2/sqrt(x) - 2/x^2. The whole technique is: rewrite every term as a power, apply the power rule, then translate back. Master this and polynomials, roots, and reciprocals all become routine.

Key terms
Power rule
d/dx (x^n) = n x^(n-1); drop the exponent in front and reduce it by one.
Constant rule
The derivative of any constant is 0.
Constant multiple rule
A constant factor passes through the derivative unchanged.
Sum rule
The derivative of a sum is the sum of the derivatives.
Exponent form
Rewriting roots and reciprocals as powers of x so the power rule applies.
Term-by-term differentiation
Differentiating a polynomial one term at a time using the sum rule.

The Product and Quotient Rules

  • Differentiate products of functions with the product rule.
  • Differentiate quotients with the quotient rule.
  • Recognize which rule a given expression requires.

The sum rule lets you split addition, but products and quotients need their own rules, because the derivative of a product is not the product of the derivatives. This is one of the most common early errors, and a single counterexample settles it: d/dx (x * x) = d/dx (x^2) = 2x, but the product of the separate derivatives 1 * 1 = 1, which is wrong. Products interact, and the correct rule accounts for it.

The product rule

For a product of two functions u and v:

d/dx (u v) = u' v + u v'

In words: differentiate the first times the second, plus the first times the derivative of the second. A useful chant is "derivative of the first times the second, plus the first times derivative of the second." The two terms reflect that when a product grows, each factor contributes its own change while the other is held momentarily fixed.

Worked example. Differentiate f(x) = x^2 sin(x).

  1. Let u = x^2 so u' = 2x, and v = sin(x) so v' = cos(x).
  2. Apply the rule: u' v + u v' = 2x sin(x) + x^2 cos(x).

So f'(x) = 2x sin(x) + x^2 cos(x). Labeling u, u', v, v' before assembling keeps the pieces straight and prevents mix-ups.

The quotient rule

For a quotient u/v:

d/dx (u/v) = (u' v - u v') / v^2

The order matters here because of the subtraction: it is "derivative of the top times the bottom, minus the top times derivative of the bottom, all over the bottom squared." A common memory aid is "low d-high minus high d-low, over low-low," where "d" means "derivative of." Getting the order backward flips the sign of the whole answer, so the mnemonic is worth memorizing exactly.

Worked example. Differentiate f(x) = x / (x^2 + 1).

  1. Let u = x so u' = 1, and v = x^2 + 1 so v' = 2x.
  2. Apply the rule: (u' v - u v')/v^2 = [1 (x^2 + 1) - x (2x)] / (x^2 + 1)^2.
  3. Simplify the top: x^2 + 1 - 2x^2 = 1 - x^2.

So f'(x) = (1 - x^2) / (x^2 + 1)^2. Keep the denominator squared and do not cancel prematurely.

A second quotient example

Differentiate f(x) = (2x + 3)/(x - 1). With u = 2x + 3, u' = 2, v = x - 1, v' = 1: the top is 2(x - 1) - (2x + 3)(1) = 2x - 2 - 2x - 3 = -5, so f'(x) = -5/(x - 1)^2. The constant numerator is a good reminder to expand and combine carefully before declaring the answer.

Choosing the right rule

Diagnosing the structure is half the battle. When you see two things multiplied, reach for the product rule; when you see one thing divided by another, reach for the quotient rule; when the pieces are only added, the sum rule suffices. Sometimes a quotient can be rewritten to avoid the harder rule: (x^2 + x)/x = x + 1 simplifies before differentiating, and 3/x^2 = 3x^(-2) is easier by the power rule than by the quotient rule. Always pause to see whether algebra can simplify the expression before you commit to a rule.

Key terms
Product rule
d/dx (u v) = u'v + u v'.
Quotient rule
d/dx (u/v) = (u'v - u v')/v^2.
Factor
One of the functions being multiplied in a product.
Numerator and denominator
The top (u) and bottom (v) of a quotient being differentiated.
Rule selection
Diagnosing whether an expression is a product, quotient, or sum to pick the right rule.

The Chain Rule

  • Recognize a composite function as an outer function wrapped around an inner one.
  • Apply the chain rule to differentiate composites.
  • Combine the chain rule with the power, product, and quotient rules.

The chain rule differentiates composite functions, one function nested inside another. It is the most used rule in all of calculus, because almost every realistic function is built by nesting. If y = f(g(x)), then:

d/dx f(g(x)) = f'(g(x)) * g'(x)

In words: differentiate the outer function while leaving the inner one untouched, then multiply by the derivative of the inner function. People often say "derivative of the outside, times the derivative of the inside." The extra inner-derivative factor is exactly what the power rule alone would miss, and forgetting it is the single most common mistake in all of differential calculus.

An intuition for the extra factor

Think in terms of rates. Suppose y changes 3 times as fast as u, and u changes 2 times as fast as x. Then y changes 3 * 2 = 6 times as fast as x. In Leibniz notation this reads dy/dx = (dy/du)(du/dx), the rates simply multiply. The chain rule is that multiplication of rates, and it is why the inner derivative must appear.

Worked example one, a power of a function

Differentiate f(x) = (3x^2 + 1)^4.

  1. Identify the pieces: the outer function is ( )^4 and the inner is 3x^2 + 1.
  2. Differentiate the outer, keeping the inside: 4(3x^2 + 1)^3.
  3. Multiply by the inner derivative: d/dx (3x^2 + 1) = 6x.
  4. Combine: 4(3x^2 + 1)^3 * 6x = 24x (3x^2 + 1)^3.

So f'(x) = 24x (3x^2 + 1)^3. Notice how forgetting the 6x would give a wrong answer; that factor is the whole point of the chain rule.

Worked example two, a trig composite

Differentiate f(x) = sin(x^2).

  1. Outer is sin( ), inner is x^2.
  2. Derivative of the outer, keeping the inside: cos(x^2).
  3. Times the inner derivative 2x: cos(x^2) * 2x = 2x cos(x^2).

Compare this with d/dx (sin x)^2, which is a different composite (a power of sine) and gives 2 sin(x) cos(x). Reading the structure correctly, whether the square is outside or inside, is essential and changes the answer completely.

Worked example three, a square root

Differentiate f(x) = sqrt(x^2 + 1).

  1. Rewrite as (x^2 + 1)^(1/2).
  2. Outer derivative: (1/2)(x^2 + 1)^(-1/2).
  3. Times inner derivative 2x: (1/2)(x^2 + 1)^(-1/2) * 2x = x / sqrt(x^2 + 1).

Combining the chain rule with other rules

The chain rule combines freely with the product and quotient rules for more complex expressions, and nested composites need it more than once. To differentiate f(x) = sin(cos(x)), the outer is sine and the inner is cos(x): cos(cos(x)) * (-sin(x)) = -sin(x) cos(cos(x)). For f(x) = (2x + 1)^3 e^x, use the product rule with one factor requiring the chain rule: u = (2x+1)^3 gives u' = 3(2x+1)^2 * 2 = 6(2x+1)^2, and v = e^x, so f'(x) = 6(2x+1)^2 e^x + (2x+1)^3 e^x. Whenever you see something "inside" something else, a power of a bundle, a trig of a bundle, a root of a bundle, the chain rule applies, and the inner derivative is the factor students most often forget.

Key terms
Chain rule
d/dx f(g(x)) = f'(g(x)) g'(x); outer derivative times inner derivative.
Composite function
A function formed by nesting one function inside another, f(g(x)).
Outer function
The function applied last, differentiated first in the chain rule.
Inner function
The function applied first, whose derivative is the extra chain-rule factor.
Nested composite
A composition inside a composition, requiring the chain rule more than once.

Derivatives of Trigonometric, Exponential, and Logarithmic Functions

  • State and apply the derivatives of the six basic trig functions.
  • Differentiate exponential functions, including e^x and a^x.
  • Differentiate logarithmic functions, including ln x and log base a.

Beyond polynomials, three families power most applications: trigonometric, exponential, and logarithmic functions. Their derivatives are worth memorizing, and each combines with the chain rule to handle the composites that appear everywhere in science and engineering.

Trigonometric derivatives

Built from the special limit sin(x)/x to 1 and the difference quotient, the core results are:

FunctionDerivative
sin(x)cos(x)
cos(x)-sin(x)
tan(x)sec^2(x)
cot(x)-csc^2(x)
sec(x)sec(x) tan(x)
csc(x)-csc(x) cot(x)

Note the pattern: the three "co" functions (cos, cot, csc) all carry a minus sign. With the chain rule, d/dx cos(5x) = -sin(5x) * 5 = -5 sin(5x), and d/dx tan(x^2) = sec^2(x^2) * 2x = 2x sec^2(x^2). Only the first two, sine and cosine, are truly fundamental; the other four follow from them by the quotient rule, since tangent, cotangent, secant, and cosecant are all ratios of sine and cosine.

Exponential derivatives

The function e^x is remarkable: it is its own derivative.

d/dx (e^x) = e^x

This is the defining property of the number e (about 2.718), the unique base for which the exponential's slope equals its height at every point. For a general base a, an extra factor of ln a appears: d/dx (a^x) = a^x ln a. For instance d/dx (2^x) = 2^x ln 2. Combined with the chain rule, d/dx (e^(3x)) = e^(3x) * 3 = 3 e^(3x), and d/dx e^(x^2) = e^(x^2) * 2x = 2x e^(x^2). Exponential derivatives are why e^x models any quantity whose growth rate is proportional to its current amount.

Logarithmic derivatives

The natural logarithm has a beautifully simple derivative:

d/dx (ln x) = 1/x

For a general base, d/dx (log base a of x) = 1/(x ln a). With the chain rule, differentiating ln of a bundle gives the inner derivative over the bundle: d/dx ln(g(x)) = g'(x)/g(x). For example d/dx ln(x^2 + 1) = 2x/(x^2 + 1). This last pattern, inner derivative over the inside, appears so often it is worth recognizing on sight.

Worked example combining rules

Differentiate f(x) = x^2 e^x using the product rule with these new derivatives.

  1. u = x^2 so u' = 2x; v = e^x so v' = e^x.
  2. Product rule: 2x e^x + x^2 e^x, which factors to x e^x (2 + x).

A second combined example

Differentiate f(x) = e^x sin(x). With u = e^x, u' = e^x, v = sin(x), v' = cos(x): the product rule gives e^x sin(x) + e^x cos(x) = e^x (sin x + cos x). These derivatives, together with the four rules from this module, let you differentiate essentially any function you will meet in a first calculus course. The workflow is always the same: identify the families and the way they are combined, then apply the matching rules, using the chain rule for anything nested.

Key terms
Derivative of sine
d/dx sin(x) = cos(x).
Derivative of cosine
d/dx cos(x) = -sin(x); the co-functions carry minus signs.
Derivative of e^x
e^x is its own derivative.
General exponential
d/dx (a^x) = a^x ln a.
Derivative of ln x
d/dx (ln x) = 1/x.
Logarithmic differentiation
Taking ln of both sides to differentiate messy products or variable exponents.

Module 5: Implicit Differentiation and Related Rates

Differentiate equations that are not solved for y, then use derivatives to link the rates of change of connected quantities as they evolve in time. These two techniques turn the chain rule into a tool for real applied problems.

Implicit Differentiation

  • Explain when implicit differentiation is needed.
  • Differentiate both sides of an equation, treating y as a function of x.
  • Solve for dy/dx and evaluate a slope on a curve.

So far every function has been solved for y explicitly, like y = x^2 + 1. But some curves are given implicitly, as an equation mixing x and y that is hard or impossible to solve for y. The circle x^2 + y^2 = 25 is a classic example; you cannot write it as a single function y = f(x) because each x has two y values. Implicit differentiation finds dy/dx without solving for y first, and it is a direct application of the chain rule.

The key idea

Treat y as a function of x, even though you never write that function down. Then differentiate both sides of the equation with respect to x, applying the chain rule every time you differentiate a term containing y. Because y depends on x, differentiating y^2 gives 2y * dy/dx, not just 2y. That extra dy/dx factor is the heart of the method, and it is precisely the inner-derivative factor from the chain rule: y is the inner function. Finally, solve the resulting equation algebraically for dy/dx.

Worked example one, the circle

Find dy/dx for x^2 + y^2 = 25.

  1. Differentiate both sides with respect to x: d/dx (x^2) + d/dx (y^2) = d/dx (25).
  2. Term by term: 2x + 2y (dy/dx) = 0. The chain rule supplies the dy/dx on the y^2 term.
  3. Solve: 2y (dy/dx) = -2x, so dy/dx = -x/y.

This single formula gives the slope at any point on the circle. At (3, 4) the slope is -3/4; at (3, -4) it is 3/4. Notice the slope depends on both coordinates, which makes sense because a circle has two points for most x values, one on the upper half and one on the lower, with opposite slopes. The formula -x/y also has a clean geometric meaning: it is the negative reciprocal of y/x, the slope of the radius, confirming that a circle's tangent is always perpendicular to its radius.

Worked example two, a mixed term

Find dy/dx for x^2 + xy + y^2 = 7.

  1. Differentiate: d/dx (x^2) = 2x; the middle term needs the product rule, d/dx (xy) = 1 * y + x * dy/dx = y + x (dy/dx); and d/dx (y^2) = 2y (dy/dx).
  2. Combine: 2x + y + x (dy/dx) + 2y (dy/dx) = 0.
  3. Group the dy/dx terms on one side: (x + 2y)(dy/dx) = -(2x + y).
  4. Solve: dy/dx = -(2x + y)/(x + 2y).

The xy term is where care pays off: it is a product of two functions of x, so the product rule applies, and its second piece carries the dy/dx factor.

The reliable recipe

The procedure is always the same, and naming the steps makes it foolproof:

  • Differentiate every term on both sides with respect to x.
  • Attach a dy/dx factor whenever you differentiate a y-containing expression (chain rule), and use the product rule for any x y mix.
  • Collect all dy/dx terms on one side and everything else on the other.
  • Factor out dy/dx and divide to solve.

Implicit differentiation is also the tool that unlocks related rates in the next lesson, where the independent variable is time instead of x, and it is how the power rule is proven for fractional exponents. It is one of the most quietly powerful techniques in the course.

Key terms
Implicit equation
An equation relating x and y that is not solved for y.
Implicit differentiation
Differentiating both sides of an equation while treating y as a function of x.
dy/dx factor
The chain-rule term attached whenever a y-containing expression is differentiated.
Slope on a curve
The value of dy/dx at a specific point, which may depend on both x and y.
Vertical tangent
A point where dy/dx is undefined because the denominator is zero, as at a circle's left and right edges.

Module 6: Applications and an Introduction to the Integral

Use derivatives to find extrema, analyze the shape of curves, and solve real optimization problems, then reverse differentiation with antiderivatives to open the door to integration. This capstone module turns every earlier skill into a problem-solving toolkit and previews Calculus II.

Extrema and the First Derivative Test

  • Find critical points where the derivative is zero or undefined.
  • Classify critical points as local maxima or minima with the first derivative test.
  • Distinguish local from absolute extrema on a closed interval.

One of the most useful jobs of the derivative is finding the highest and lowest points of a function, its extrema. A local maximum is a peak, higher than nearby points; a local minimum is a valley, lower than nearby points. An absolute (global) extremum is the very highest or lowest value over the whole domain or interval considered. Extrema are the mathematical form of "best" and "worst," which is why they drive optimization, the subject two lessons ahead.

Critical points

Because the tangent is horizontal at a smooth peak or valley, extrema can occur only where f'(x) = 0 or where f'(x) is undefined. Such inputs are called critical points. They are the only candidates for local extrema, though not every critical point is one, a subtlety captured by Fermat's Theorem: if f has a local extremum at c and f'(c) exists, then f'(c) = 0. The converse fails, so critical points are suspects to be screened, not guaranteed extrema.

The first derivative test

To classify a critical point, examine the sign of f' just to its left and right. The sign of the derivative tells you whether the function is rising or falling on each side:

  • If f' changes from positive to negative, the function rises then falls: a local maximum.
  • If f' changes from negative to positive, the function falls then rises: a local minimum.
  • If f' does not change sign, the point is neither, just a flat spot on an otherwise rising or falling curve, like x^3 at the origin.

Worked example

Find and classify the critical points of f(x) = x^3 - 3x^2 + 1.

  1. Differentiate: f'(x) = 3x^2 - 6x = 3x(x - 2).
  2. Set equal to zero: 3x(x - 2) = 0, so the critical points are x = 0 and x = 2.
  3. Test signs. For x < 0 (say x = -1): 3(-1)(-3) = 9 > 0, increasing. Between 0 and 2 (say x = 1): 3(1)(-1) = -3 < 0, decreasing. For x > 2 (say x = 3): 3(3)(1) = 9 > 0, increasing.
  4. At x = 0, f' goes + to -, a local maximum, with f(0) = 1. At x = 2, f' goes - to +, a local minimum, with f(2) = -3.

A sign chart, marking the critical points on a number line and recording the sign of f' in each interval, keeps this organized and is worth drawing every time.

Absolute extrema on a closed interval

On a closed interval [a, b], the absolute maximum and minimum are found with the closed interval method: evaluate f at every critical point inside the interval and at both endpoints, then pick the largest and smallest outputs. The endpoints matter because the highest value might sit at an edge rather than a peak. The Extreme Value Theorem guarantees this works: a function continuous on a closed interval always attains both an absolute maximum and an absolute minimum somewhere on it. Without continuity or without a closed interval, that guarantee can fail, which is why both conditions are stated carefully.

Worked example. Find the absolute extrema of f(x) = x^3 - 3x^2 + 1 on [-1, 3]. The interior critical points are x = 0 and x = 2. Evaluate all four candidates: f(-1) = -3, f(0) = 1, f(2) = -3, f(3) = 1. The absolute maximum is 1 (attained at both x = 0 and x = 3) and the absolute minimum is -3 (at both x = -1 and x = 2). Notice the endpoints tied the interior points, exactly why you must check them.

Key terms
Extremum
A maximum or minimum value of a function.
Local maximum
A point higher than all nearby points.
Critical point
An input where the derivative is zero or undefined, the only candidate for a local extremum.
First derivative test
Classifying a critical point by how the sign of f' changes around it.
Closed interval method
Finding absolute extrema by checking critical points and endpoints.
Extreme Value Theorem
A continuous function on a closed interval attains an absolute max and min.

Concavity and the Second Derivative Test

  • Interpret the second derivative as concavity.
  • Locate points of inflection where concavity changes.
  • Classify critical points with the second derivative test.

The first derivative tells you whether a curve rises or falls. The second derivative f''(x), the derivative of the derivative, tells you how the curve bends. This bending is called concavity, and it captures information the first derivative alone misses: two curves can both be rising yet bend in opposite ways, one accelerating upward and one leveling off.

Concave up and concave down

  • Where f''(x) > 0, the curve is concave up, shaped like a cup that holds water; the slope is increasing.
  • Where f''(x) < 0, the curve is concave down, shaped like a frown; the slope is decreasing.

A memory aid: concave up looks like part of a "cup" or a smile; concave down looks like a frown. Since f'' is the derivative of f', its sign records whether the slope itself is growing or shrinking. A point where concavity switches is a point of inflection. It typically occurs where f''(x) = 0 and the sign of f'' actually changes across it; a zero of f'' that does not change sign is not an inflection point.

The meaning in applications

Concavity has vivid real-world readings. If f is position, f'' is acceleration, so concave up means speeding up in the positive direction. In economics, a concave-down profit curve means diminishing returns: each extra unit adds less than the last. When a news report says inflation is "still rising but slowing," it is describing a positive first derivative with a negative second derivative, concavity down. Reading concavity translates a graph into a story about acceleration and change.

The second derivative test

Concavity gives a fast way to classify a critical point where f'(c) = 0:

  • If f''(c) > 0, the curve is concave up at c, a valley, so c is a local minimum.
  • If f''(c) < 0, the curve is concave down at c, a peak, so c is a local maximum.
  • If f''(c) = 0, the test is inconclusive; fall back on the first derivative test.

Worked example

Use the second derivative test on f(x) = x^3 - 3x^2 + 1, whose critical points are x = 0 and x = 2.

  1. First derivative: f'(x) = 3x^2 - 6x. Second derivative: f''(x) = 6x - 6.
  2. At x = 0: f''(0) = -6 < 0, concave down, so a local maximum.
  3. At x = 2: f''(2) = 6 > 0, concave up, so a local minimum.
  4. Inflection point: set f''(x) = 6x - 6 = 0, giving x = 1, where the bending flips from down to up.

This agrees with the first derivative test from the previous lesson, but often takes less work. When the second derivative is easy to compute and nonzero at the critical point, the second derivative test is usually the quicker route.

When the test is inconclusive

The f''(c) = 0 case genuinely requires care, because all three outcomes are possible. Consider x^4, -x^4, and x^3 at the origin: each has f'(0) = 0 and f''(0) = 0, yet x^4 has a minimum, -x^4 a maximum, and x^3 neither. The second derivative test simply cannot tell them apart, so you must return to the sign-change analysis of the first derivative test. Knowing the limits of a tool is as important as knowing how to use it.

Key terms
Second derivative
The derivative of the derivative, written f''(x).
Concave up
A cup-shaped bend where f'' > 0 and the slope increases.
Concave down
A frown-shaped bend where f'' < 0 and the slope decreases.
Point of inflection
A point where concavity changes, typically where f'' = 0 and switches sign.
Second derivative test
Classifying a critical point by the sign of f'' there.
Inconclusive test
When f''(c) = 0 the second derivative test cannot decide, so the first derivative test is used.

Optimization

  • Translate a word problem into an objective function and constraint.
  • Reduce the objective to one variable and differentiate.
  • Find and justify the optimal value.

Optimization uses derivatives to find the best possible outcome: the largest area, the smallest cost, the maximum profit, the shortest time. These are the real-world payoff of extrema and among the most valuable applications of calculus in engineering, business, and science. The challenge is usually not the calculus itself but the setup, turning words into an equation to maximize or minimize.

A step-by-step strategy

  1. Name the variables and, if helpful, draw a picture. A clear diagram is often the difference between a solvable problem and a muddle.
  2. Write the objective function, the quantity to optimize.
  3. Write the constraint, an equation limiting the variables.
  4. Use the constraint to rewrite the objective in one variable.
  5. Differentiate, set the derivative to zero, and solve for the critical points.
  6. Verify it is a max or min (first or second derivative test or endpoints), and answer the question in context, with units.

The two-function structure, an objective to optimize and a constraint that ties the variables together, is the signature of every optimization problem. Spotting which equation is which is the key skill.

Worked example, the biggest rectangular pen

A farmer has 100 ft of fencing to enclose a rectangular pen against a straight river, so no fence is needed on the river side. What dimensions give the largest area?

  1. Let x be the length of each of the two sides perpendicular to the river, and w the side parallel to it. Only three sides are fenced, so the constraint is 2x + w = 100.
  2. Objective: maximize area A = x w.
  3. Solve the constraint for w = 100 - 2x and substitute: A(x) = x(100 - 2x) = 100x - 2x^2.
  4. Differentiate: A'(x) = 100 - 4x. Set to zero: 100 - 4x = 0, so x = 25.
  5. Confirm a maximum: A''(x) = -4 < 0, concave down, so x = 25 gives the maximum.
  6. Then w = 100 - 2(25) = 50, and the largest area is A = 25 * 50 = 1250 square feet.

The optimal pen is 25 ft deep and 50 ft wide, enclosing 1250 square feet. It is worth a sanity check: any other split, such as x = 20, w = 60, gives 1200 square feet, less than 1250, confirming our answer. Notice the optimum puts half the fence parallel to the river, a pattern that recurs in these one-free-side problems.

A second quick example

Find two nonnegative numbers whose sum is 20 and whose product is as large as possible. Let the numbers be x and 20 - x, so the product is P(x) = x(20 - x) = 20x - x^2. Then P'(x) = 20 - 2x = 0 gives x = 10, and the other number is also 10, for a maximum product of 100. Equal split wins, a common and satisfying optimization pattern that also explains why a square encloses more area than any other rectangle of the same perimeter.

The can-design classic

A staple of every calculus course: minimize the metal in a cylindrical can holding a fixed volume. The objective is surface area S = 2 pi r^2 + 2 pi r h, and the constraint is the fixed volume V = pi r^2 h. Solve the constraint for h, substitute into S to get a function of r alone, differentiate, and set to zero. The elegant result is that the cheapest can has height equal to its diameter, h = 2r. Real cans deviate from this because labels, lids, and stacking matter, but the calculus gives the ideal baseline, which is exactly how optimization informs engineering: it finds the mathematical optimum, and designers adjust for factors the model leaves out.

A caution on the domain

Always respect the physical domain. A length cannot be negative, so x in the pen problem is restricted to [0, 50]. The optimum happened to fall inside, but sometimes the best value sits at an endpoint of the feasible range, so checking the interval's ends is part of a complete solution, just as in the closed interval method.

Key terms
Optimization
Finding the maximum or minimum value of a quantity.
Objective function
The quantity being maximized or minimized.
Constraint
An equation that limits the variables in the problem.
Single-variable reduction
Using the constraint to express the objective in one variable.
Optimal value
The maximum or minimum output, justified by a derivative test.
Feasible domain
The range of variable values allowed by the physical context, whose endpoints must also be checked.

Antiderivatives: An Introduction to the Integral

  • Define an antiderivative and the role of the constant of integration.
  • Reverse the power rule and other basic derivatives to integrate.
  • Use an initial condition to find a specific antiderivative.

Every operation in mathematics has an inverse, and the inverse of differentiation is antidifferentiation, or integration. An antiderivative of f is a function F whose derivative is f: that is, F'(x) = f(x). For example, since d/dx (x^2) = 2x, an antiderivative of 2x is x^2. Where the derivative asks "given a function, what is its rate of change," the antiderivative asks the reverse: "given a rate of change, what function produced it." This reversal is the doorway to the second half of calculus.

The constant of integration

Here is a subtlety: x^2 + 5 and x^2 - 7 also have derivative 2x, because the derivative of any constant is zero. So a function has infinitely many antiderivatives, all differing by a constant. We capture them with a constant of integration C, writing the general antiderivative as x^2 + C. In integral notation, integral of 2x dx = x^2 + C. Geometrically, the + C is a family of parallel curves, each a vertical shift of the others, all sharing the same slope at every x. Forgetting the + C is the most common integration error, so make it a habit.

Reversing the power rule

To undo the power rule, do the opposite: add one to the exponent and divide by the new exponent.

integral of x^n dx = x^(n+1)/(n+1) + C (for n not equal to -1)

The exclusion n = -1 matters: it would force division by zero. That single missing case is filled by the logarithm, since integral of (1/x) dx = ln|x| + C, tying back to the fact that d/dx ln x = 1/x.

Worked example. Find integral of (4x^3 - 6x + 5) dx.

  1. integral of 4x^3 dx = 4 * x^4/4 = x^4.
  2. integral of -6x dx = -6 * x^2/2 = -3x^2.
  3. integral of 5 dx = 5x.
  4. Add the constant: x^4 - 3x^2 + 5x + C.

You can always check an antiderivative by differentiating it: d/dx (x^4 - 3x^2 + 5x + C) = 4x^3 - 6x + 5, the original. That self-check is one of the nicest features of integration; unlike most of calculus, you can instantly verify your own answer.

A short table of basic antiderivatives

FunctionAntiderivative
x^n (n not -1)x^(n+1)/(n+1) + C
1/xln|x| + C
e^xe^x + C
cos(x)sin(x) + C
sin(x)-cos(x) + C

Each row is just a derivative rule read backward. Because the sine differentiates to cosine, cosine integrates to sine; because cosine differentiates to negative sine, sine integrates to negative cosine. Learning the derivatives well means the antiderivatives come almost for free.

Pinning down C with an initial condition

Often extra information selects one antiderivative from the infinite family. Suppose f'(x) = 6x and f(0) = 2. The general antiderivative is f(x) = 3x^2 + C. Using f(0) = 2: 3(0)^2 + C = 2, so C = 2 and f(x) = 3x^2 + 2. This idea, recovering a function from its rate of change plus a starting value, is exactly how physics finds position from velocity: integrate the velocity, then use the known initial position to fix C.

The road ahead

Antiderivatives are the bridge to the definite integral and the Fundamental Theorem of Calculus, the crown jewel that will open Calculus II. That theorem reveals something astonishing: the antiderivative, an idea about reversing slopes, also computes exact areas under curves, uniting the two halves of calculus that Newton and Leibniz first glimpsed. The area under f from a to b turns out to equal F(b) - F(a), where F is any antiderivative. Congratulations on reaching the doorway to integration; every rule you mastered for derivatives is about to pay dividends in reverse.

Key terms
Antiderivative
A function F whose derivative is f, so F'(x) = f(x).
Integration
The process of finding antiderivatives, the inverse of differentiation.
Constant of integration
The +C that accounts for all antiderivatives differing by a constant.
Reverse power rule
integral of x^n dx = x^(n+1)/(n+1) + C for n not equal to -1.
Initial condition
A known value like f(0) that determines the constant C.
Fundamental Theorem of Calculus
The result linking antiderivatives to areas, giving the integral from a to b as F(b) - F(a).

Open the interactive version with quizzes and progress →