What a Piecewise-Defined Function Is
A piecewise-defined function uses different formulas on different intervals of its domain. Instead of having one rule that works everywhere, the function tells you which formula to use depending on the value of .
For example, consider the function
This function has two different formulas. On the interval from to , use . On the interval from to , use .
The important idea is simple: when an integral crosses a breakpoint, split the integral at that breakpoint.
The Key Idea for Integration
Suppose a function changes formulas at . If you want to evaluate the definite integral from to , you cannot use one formula across the entire interval. Instead, split the integral into the pieces where each formula applies.
This is not a special integration rule. It is simply the additivity property of definite integrals. If lies between and , then
For a piecewise function, the splitting point is determined by where the formula changes.
A Step-by-Step Method
- Find every breakpoint inside the interval of integration. These are the values where the piecewise definition changes formulas.
- Split the definite integral at each breakpoint. Each resulting integral should correspond to one formula.
- Use the correct formula on each interval. Do not accidentally use the first formula everywhere.
- Evaluate each definite integral.
- Add the results. The pieces together give the value of the original integral.
Worked Examples
Let . Find .
Let . Find .
Let . Find .
Let . Define . Find .
What If the Integral Is Written in Reverse?
AP Calculus problems sometimes use an upper limit that is smaller than the lower limit. Remember that reversing the limits changes the sign:
For example, if a piecewise function changes at and you need , you can either work directly with the reversed limits or reverse the entire integral first:
The key is consistency. Do not reverse only one piece of a split integral.
Piecewise Functions and Signed Area
A definite integral represents net signed area, not necessarily total geometric area. This distinction becomes especially important with piecewise-defined functions because different pieces may lie above or below the -axis.
If one piece is positive and another is negative, the negative contribution reduces the value of the integral.
If the question asks for total area instead, you may need to split the integral not only at the piecewise breakpoints, but also at any x-values where the function crosses the x-axis.
Common Mistakes
This is the most common mistake. If the function changes formulas at , you cannot use the formula from the left side on the right side. Split the integral at the breakpoint.
Not every breakpoint in the definition matters for every integral. If the interval of integration never reaches a particular breakpoint, that breakpoint does not require a split.
A definite integral can be negative because regions below the x-axis count negatively. If the question asks for total area, you must account for the sign of the function on each relevant interval.
Split exactly where the piecewise definition changes. The breakpoint comes from the conditions in the definition, not from where the graph happens to have a maximum, minimum, or zero.
AP Calculus Strategy
On the AP exam, a piecewise-defined integrand often appears inside a definite integral or an accumulation function. The arithmetic is usually not the difficult part. The challenge is recognizing which formula applies on which interval.
A reliable exam strategy is:
- Mark every breakpoint on the number line.
- Mark the lower and upper limits of integration.
- Split only where the interval crosses a breakpoint.
- Write the correct formula above each resulting interval.
- Evaluate the pieces separately.
- Combine the results only after checking the signs.
If you are working with an accumulation function such as , remember that the Fundamental Theorem of Calculus still applies wherever the integrand is continuous. At a piecewise breakpoint, however, you should first determine which side of the breakpoint contains the point you are evaluating.
Practice Problems
Let . Find .
Show answer
Let . Find .
Show answer
Let . Find .
Show answer
Let . Define . Find .
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.
Get the Calc Pass App
Scan to download and practice on the go, with instant scoring.
Vol. 1: 1,114 Questions
The complete practice question bank, organized by AB & BC topic.
View on Amazon