Tutorials › AP Calculus › Limits of Piecewise Functions
← All AP Calculus Tutorials
AP Calculus AB & BC Intermediate

Limits of Piecewise Functions

Learn how to evaluate limits when a function is defined by different formulas on different intervals, including how to handle one-sided limits and determine whether a two-sided limit exists.

What Makes Piecewise Limits Different?

A piecewise function uses different formulas for different values of . That means you cannot always evaluate a limit by looking at just one formula. You first have to determine which branch of the function applies on each side of the point you are approaching.

For example, consider the piecewise function:

Suppose we want to find the limit as . Values of that approach 2 from the left use the first branch, while values approaching 2 from the right use the second branch.

This is the key idea: for a piecewise function, always look at the side from which you are approaching the boundary point.

The Key Rule for Two-Sided Limits

A two-sided limit exists only when the left-hand and right-hand limits both exist and are equal.

For a piecewise function, this becomes especially important at a point where the formula changes. You typically need to calculate two separate limits and compare them.

A Step-by-Step Method

  1. Find the point you are approaching. Identify the value in the limit.
  2. Look at the piecewise breakpoints. Determine whether the function changes formulas at that value.
  3. For the left-hand limit, use the branch defined to the left of the point.
  4. For the right-hand limit, use the branch defined to the right of the point.
  5. Evaluate both limits. Direct substitution usually works once the correct branch has been selected.
  6. Compare the answers. If they are equal, the two-sided limit exists. If they differ, the two-sided limit does not exist.

Worked Examples

Example 1: A Piecewise Function with a Matching Limit

Evaluate where

Step 1: The function changes formulas at , so we must examine the left and right sides separately.
Step 2: From the left, use :
Step 3: From the right, use :
Step 4: The one-sided limits agree, so the two-sided limit exists.
Result:
Example 2: When the Two-Sided Limit Does Not Exist

Evaluate where

Step 1: The formulas change at .
Step 2: Left-hand limit: use the branch for :
Step 3: Right-hand limit: use the branch for :
Step 4: The one-sided limits are different, so the two-sided limit does not exist.
Result:
Example 3: The Function Value Does Not Determine the Limit

Consider

Find .

Step 1: The requested limit is approaching , so use the appropriate branch on each side.
Step 2: From the left:
Step 3: From the right:
Step 4: The two-sided limit is .
Important: Notice that . The value of the function at the point is irrelevant to the limit as long as values arbitrarily close to the point behave appropriately.
Example 4: Finding an Unknown Constant

Suppose

Find the value of that makes the limit exist.

Step 1: Calculate the left-hand limit using the first branch:
Step 2: Calculate the right-hand limit using the second branch:
Step 3: Set the two one-sided limits equal:
Step 4: Solve for the unknown constant:
Result:

How to Read the Inequalities

The inequalities attached to each branch tell you exactly when that formula should be used.

If you are approaching from the left, your nearby values satisfy , so you use the first formula. From the right, nearby values satisfy , so you use the second formula.

It does not matter which branch contains the actual endpoint when you are calculating a limit. What matters is the behavior of the function for values near the point.

Limits at a Point Where the Branches Meet

Piecewise functions often use different formulas on either side of a boundary. A common AP Calculus question asks whether the resulting function is continuous at that boundary.

For continuity at , three conditions must hold:

  1. must be defined.
  2. must exist.
  3. .

For a piecewise function, the second condition is where the one-sided limits become especially important. If the left and right limits disagree, the two-sided limit does not exist, and the function cannot be continuous there.

Common Mistakes

Using the wrong branch

The most common error is substituting the approaching value into whichever formula appears first. Instead, ask whether you are approaching from the left or right and select the branch accordingly.

Checking only the function value

The value of at the point does not determine the limit. A limit describes what happens as gets close to the point, not necessarily what happens exactly at the point.

Assuming a two-sided limit exists

Always compare the left-hand and right-hand limits at a piecewise breakpoint. If they are different, the correct answer is that the two-sided limit does not exist.

Confusing the endpoint inequality

When a branch says and another says , pay attention to which branch contains the endpoint. For a limit, however, the endpoint's inclusion does not change the nearby behavior.

Practice Problems

Question 1

Evaluate where .

Show answer
Question 2

Evaluate where .

Show answer
Question 3

Does exist if ?

Show answer
Question 4 (Find the Constant)

Find so that exists, where .

Show answer

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon