Evaluate the Integral of the Piecewise Function from −2 to 4
At a glance
- 1. Split at the breakpoint
Separate the integral at x = 0, where the formula for f changes.
- 2. Integrate each piece
Use the constant formula on [−2, 0] and the polynomial formula on [0, 4].
- 3. Add signed values
Add the two definite integrals, keeping negative contributions below the x-axis.
Interpret the expression as the definite integral
where
Because the formula changes at , split the integral there. The first interval contributes , and the second contributes , so the total is . The negative result is possible because a definite integral measures signed area, not just geometric area.
Split the integral where the formula changes
On , the function is constant at . On , it is the polynomial . By additivity of definite integrals,
The second piece is written with lower endpoint even though its defining condition uses . A single endpoint does not affect the value of a definite integral. The function is bounded and has only a jump discontinuity at , so it is Riemann integrable on the interval.
Evaluate each part
For the constant piece,
For the polynomial piece, an antiderivative of is . Therefore,
Add the two results:
Why the answer is negative
The graph of crosses the horizontal axis at on the interval from to . It is above the axis from to and below it from to . The signed contribution over the full polynomial interval is negative: the area below the axis outweighs the area above it. That negative contribution is large enough to outweigh the positive contribution of from the constant piece.
If you wanted the total geometric area between the graph and the axis instead, you would take the absolute value of the function wherever it is negative. That is a different calculation from the definite integral.
Common mistakes
- Using one formula across the whole interval: The function is piecewise, so each formula applies only on its specified part. Split at before integrating.
- Treating the integral as unsigned area: The part of the graph below the axis contributes negatively. Do not change its sign unless the question asks for geometric area.
- Losing the minus sign in the antiderivative evaluation: At , , not .
- Worrying about whether the second piece includes : Whether that one endpoint is assigned to the left or right formula does not change the definite integral.
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.