← Back to learning objective

Evaluating a piecewise definite integral using additivity

Consider the piecewise function f(x)={x0≤x<24−x2≤x≤5f(x) = \begin{cases} x & 0 \le x < 2 \\ 4-x & 2 \le x \le 5 \end{cases}

Using the additivity property ∫05f(x) dx=∫02f(x) dx+∫25f(x) dx\int_0^5 f(x)\,dx = \int_0^2 f(x)\,dx + \int_2^5 f(x)\,dx, along with the fact that each piece of ff forms a simple geometric region (triangle or trapezoid) on its subinterval, evaluate ∫05f(x) dx\displaystyle\int_0^5 f(x)\,dx.

Evaluating a piecewise definite integral using additivity graph
Hint

Split the integral at x=2x=2 using additivity. On [0,2][0,2], f(x)=xf(x)=x forms a right triangle with the x-axis; on [2,5][2,5], f(x)=4−xf(x)=4-x forms a trapezoid-like region that dips below the x-axis after x=4x=4 — identify the shapes and their signed areas separately.

Step-by-step solution

By additivity, ∫05f(x) dx=∫02x dx+∫25(4−x) dx\int_0^5 f(x)\,dx = \int_0^2 x\,dx + \int_2^5 (4-x)\,dx. On [0,2][0,2], f(x)=xf(x)=x traces a right triangle with base 22 and height 22, giving area 12(2)(2)=2\frac{1}{2}(2)(2) = 2, and since the region lies above the x-axis this integral equals 22.

On [2,5][2,5], f(x)=4−xf(x) = 4-x is positive on [2,4][2,4] (a triangle with base 22, height 22, area 22) and negative on [4,5][4,5] (a triangle with base 11, height 11, area 12\frac{1}{2}, counted as −12-\frac{1}{2} since it's below the axis). So ∫25(4−x) dx=2−12=32\int_2^5(4-x)\,dx = 2 - \frac{1}{2} = \frac{3}{2}. Adding both pieces: ∫05f(x) dx=2+32=72\int_0^5 f(x)\,dx = 2 + \frac{3}{2} = \frac{7}{2}.

Related problems

Practice similar Calculus problems interactively.

Start Closing the Gap