A piecewise-defined function is a single function built from different expressions on different intervals of its domain. In AP Calculus (Topic 1.13), it's continuous at a boundary only if the left-side expression, the right-side expression, and the function's value all agree there.
A piecewise-defined function is one function with multiple rules. The domain is split into intervals, and each interval gets its own expression. For example, f(x) = {2x for x ≤ 1; -x + 3 for x > 1} uses the rule 2x on the left of x = 1 and the rule -x + 3 on the right. The x-value where the rules switch is called the boundary (or the boundary of the partition).
The boundary is where all the calculus action happens. Per EK LIM-2.C.2, for a piecewise-defined function to be continuous at a boundary, three things must match up. The expression on one side of the boundary, the expression on the other side, and the actual value of the function at the boundary all have to equal the same number. In limit language, the left-hand limit, the right-hand limit, and f(boundary) must all agree. Everywhere else, each piece is usually a polynomial or another familiar function, so it's automatically continuous on the interior of its interval. That's why AP problems zoom straight in on the boundary point.
Piecewise-defined functions live in Unit 1 (Limits and Continuity), specifically Topic 1.13 (Removing Discontinuities). They directly support learning objective 1.13.A, which asks you to determine values of x or solve for parameters that make a discontinuous function continuous. The classic setup gives you a piecewise function with an unknown like a or b in one of the pieces, and you solve for the value that makes the two sides meet at the boundary. This is also where EK LIM-2.C.1 comes in, since defining or redefining a function's value at a single point (which is itself a piecewise move) is exactly how you remove a removable discontinuity. Beyond Unit 1, piecewise functions are the test bed for almost every 'check the definition carefully' skill in AP Calc, from differentiability to evaluating definite integrals of functions like |x|.
Keep studying AP® Calculus Unit 1
Visual cheatsheet
view galleryOne-sided Limits (Unit 1)
One-sided limits are the tool you use on piecewise functions. To check continuity at a boundary, you take the limit from the left using the left piece and the limit from the right using the right piece. If those two one-sided limits match and equal the function's value, you're continuous.
Removing Discontinuities (Unit 1)
Removing a discontinuity literally means building a piecewise function. If a function has a hole at x = c but the limit exists there, EK LIM-2.C.1 says you can patch it by defining f(c) to equal that limit. The patched function is piecewise-defined, with one rule everywhere else and a single-point rule at c.
Differentiability (Unit 2)
Once you hit derivatives, piecewise functions come back with a harder question. Matching values at the boundary makes the function continuous, but the pieces also need matching slopes for the function to be differentiable there. A piecewise function can be continuous at a boundary and still have a corner, like |x| at x = 0.
Piecewise-defined functions are a Unit 1 multiple-choice staple, and they show up in a few predictable flavors. The most common asks you to solve for a parameter, like finding a and b so that T(h) = {2h + 5 if h ≤ 4; ah + b if h > 4} is continuous at h = 4. The play is always the same. Set the left expression equal to the right expression at the boundary, then solve. Other stems test vocabulary directly, asking you to identify the boundary of the partition or to classify the type of discontinuity at it. You should be able to (1) evaluate a piecewise function at any x by picking the correct piece, paying attention to ≤ versus <, (2) compute one-sided limits at the boundary using the appropriate piece, and (3) state the three-part continuity condition. No released FRQ has used the phrase 'piecewise-defined function' verbatim in recent sets, but FRQs regularly hand you functions defined in pieces (or graphs made of line segments and arcs) and expect you to handle the boundaries correctly.
Piecewise does not mean discontinuous. A piecewise-defined function is just a function written with multiple rules; whether it's continuous depends on what happens at the boundaries. If the pieces meet (left expression = right expression = function value at the boundary), the function is perfectly continuous. The absolute value function is piecewise-defined and continuous everywhere. Treat 'piecewise' as a description of how the function is written, not a verdict on its continuity.
A piecewise-defined function uses different expressions on different intervals of its domain, and the x-value where the rules switch is called the boundary.
Continuity at a boundary requires three things to be equal: the limit from the left, the limit from the right, and the function's value at that point (EK LIM-2.C.2).
The classic AP problem gives you a piecewise function with an unknown parameter and asks you to solve for the value that makes it continuous; set the two pieces equal at the boundary and solve (LO 1.13.A).
Piecewise does not mean discontinuous. The pieces can meet smoothly, like the absolute value function does at x = 0.
Watch the inequality signs when evaluating. The piece with ≤ or ≥ at the boundary is the one that actually defines the function's value there.
Removing a removable discontinuity means redefining the function's value at one point to equal the limit, which turns the function into a piecewise-defined one (EK LIM-2.C.1).
It's a single function defined by different expressions on different intervals of its domain, like f(x) = {2x for x ≤ 1; -x + 3 for x > 1}. In AP Calc Unit 1, you mainly analyze what happens at the boundary, the x-value where the rules switch.
No. A piecewise function is continuous at a boundary as long as the left piece, the right piece, and the function's value all equal the same number there. The absolute value function is piecewise-defined and continuous everywhere.
Set the expression on one side of the boundary equal to the expression on the other side at that x-value, then solve for the unknown. For T(h) = {2h + 5 if h ≤ 4; ah + b if h > 4}, you'd require 2(4) + 5 = a(4) + b, so 4a + b = 13. This is exactly what LO 1.13.A asks you to do.
A removable discontinuity is a hole where the limit exists but the function value is missing or wrong. A piecewise function is just a way of writing a function with multiple rules. The two connect because the fix for a removable discontinuity (redefining f at one point to equal the limit) produces a piecewise-defined function.
Yes. |x| equals -x for x < 0 and x for x ≥ 0, with a boundary at x = 0. It's continuous everywhere, which is the go-to example showing that piecewise does not mean discontinuous (though it's not differentiable at 0, which matters in Unit 2).
Connect this key term to the AP exam workflow: review the course, practice questions, and check related study tools.
Review units, study guides, and course resources.
Check this vocabulary in multiple-choice context.
Apply key concepts in written AP responses.
Estimate the exam score you are working toward.
Review the highest-yield facts before practice.