Tutorials › AP Calculus › Integrating Piecewise-Defined Functions
← All AP Calculus Tutorials
AP Calculus AB & BC Intermediate

Integrating Piecewise-Defined Functions

Learn how to integrate functions whose formulas change from interval to interval, split definite integrals at breakpoints, and combine the resulting pieces correctly.

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

  1. Find every breakpoint inside the interval of integration. These are the values where the piecewise definition changes formulas.
  2. Split the definite integral at each breakpoint. Each resulting integral should correspond to one formula.
  3. Use the correct formula on each interval. Do not accidentally use the first formula everywhere.
  4. Evaluate each definite integral.
  5. Add the results. The pieces together give the value of the original integral.

Worked Examples

Example 1: One Breakpoint

Let . Find .

Step 1: The formula changes at .
Step 2: Split the integral at :
Step 3: On , use . On , use .
Step 4: Evaluate:
Step 5: Add the pieces:
Result:
Example 2: A Piecewise Function with Three Intervals

Let . Find .

Step 1: There are two breakpoints: and .
Step 2: Split the integral into three pieces:
Step 3: Substitute the appropriate formula on each interval:
Step 4: Evaluate each piece:
Step 5: Combine the results:
Result:
Example 3: A Definite Integral with a Breakpoint That Is an Endpoint

Let . Find .

Step 1: The breakpoint is , but notice that is already the lower endpoint of the integral.
Step 2: Therefore, no splitting is necessary. The entire interval uses the same formula.
Step 3: Evaluate:
Result:
Example 4: Accumulation Function Defined by a Piecewise Integrand

Let . Define . Find .

Step 1: Since the upper endpoint is greater than the breakpoint , split the integral:
Step 2: Substitute the appropriate formula on each interval:
Step 3: Evaluate:
Result:

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

Using one formula across the entire interval

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.

Forgetting that breakpoints are determined by the interval

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.

Confusing net area with total area

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.

Splitting at the wrong point

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:

  1. Mark every breakpoint on the number line.
  2. Mark the lower and upper limits of integration.
  3. Split only where the interval crosses a breakpoint.
  4. Write the correct formula above each resulting interval.
  5. Evaluate the pieces separately.
  6. 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

Question 1

Let . Find .

Show answer
Question 2

Let . Find .

Show answer
Question 3

Let . Find .

Show answer
Question 4 (AP-Style Accumulation)

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.

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