On this page
When you first learn integration, the rules seem straightforward: find the antiderivative, plug in the upper limit, and subtract the value at the lower limit. However, this process breaks down if the function's definition changes halfway through the interval.
To find the definite integral of a piecewise defined function, you cannot use a single integration rule from start to finish. Instead, you must split the integral at the break points—the x-values where the function switches from one mathematical rule to another—and integrate each section on its own.
This step is a frequent stumbling block in early calculus. In a study of students' metacognitive knowledge of integral calculus, mathematics education researchers Farzad Radmehr and Michael Drake found that the rationale behind theorems and formulas was often not obvious to high school students. Many students simply memorise procedural rules and try to force a single antiderivative across a boundary point, completely missing the crucial connection between the definite integral and the physical area under the curve.
Why do we split the integral?
A definite integral ∫ f(x) dx from x = a to x = b calculates the net signed area bounded by the graph of the function f(x) and the x-axis.
If f(x) is defined by entirely different mathematical formulas on different parts of that interval, you cannot calculate the total area in one sweeping step. Calculating the total area requires calculating the area of each individual part and adding them together. This relies on the additive property of definite integrals, which states that for any intermediate value c between a and b:
∫ f(x) dx from a to b = ∫ f(x) dx from a to c + ∫ f(x) dx from c to b
If the function changes its rule exactly at x = c, splitting the integral there allows you to safely substitute the correct algebraic formula for each distinct segment of the graph.
How to integrate a piecewise function?
Consider the piecewise function f(x) defined as f(x) = 2 for 0 ≤ x < 2, and f(x) = x for 2 ≤ x ≤ 5. Suppose you need to evaluate the definite integral of this function from x = 0 to x = 5.
Identify the boundary point: The function's rule changes at x = 2. Since x = 2 lies strictly between the lower limit (0) and the upper limit (5), you must split the integral at this point.
Split the integral: Rewrite the total integral as the sum of two separate integrals:
∫ f(x) dx from 0 to 5 = ∫ f(x) dx from 0 to 2 + ∫ f(x) dx from 2 to 5
Substitute the correct rules: For the first integral (0 to 2), substitute f(x) = 2. For the second integral (2 to 5), substitute f(x) = x.
Total Area = ∫ 2 dx from 0 to 2 + ∫ x dx from 2 to 5
Evaluate each integral separately:
The antiderivative of 2 is 2x. Evaluating from 0 to 2 gives: (2 * 2) - (2 * 0) = 4.
The antiderivative of x is (x²)/2. Evaluating from 2 to 5 gives: ((5²)/2) - ((2²)/2) = 25/2 - 4/2 = 21/2 = 10.5.
Add the results: The total definite integral is 4 + 10.5 = 14.5.
What are common mistakes with piecewise integrals?
The most common error is ignoring the break point entirely. If a student mistakenly applied the rule f(x) = x across the whole interval from 0 to 5, they would get an incorrect area of 12.5. If they mistakenly applied f(x) = 2 across the whole interval, they would get an area of 10. You must always check if the function changes its definition anywhere strictly inside the limits of integration.
Another frequent and hidden challenge involves absolute value functions, such as integrating |x| from -2 to 3. An absolute value is fundamentally a piecewise function in disguise: |x| = -x for x < 0 and |x| = x for x ≥ 0. You must manually rewrite it in its piecewise form and split the limits at the exact point where the expression inside the modulus equals zero, much like when solving Equations and inequalities with modulus: the case-split method.
Students also stumble when the variable changes its physical meaning across intervals in physics problems. For example, if you are working on Acceleration given as a function of v or x: how to integrate it, ensuring you use the correct segment of the acceleration graph is vital for calculating the correct velocity at a given time.
If you find yourself stuck when setting up these boundaries or evaluating the individual integrals, Fermi's AI tutor can help. Most learning tools answer questions, but Fermi teaches. It works out what you already know, builds a plan for the session, and teaches through it—drawing the figure and checking understanding as it goes. For more practice on breaking down complex limits, you can explore the Fermi Concept Library, which has every concept in mathematics, each with its own lesson and its place in the map.



