Originally Posted by

**posix_memalign** $\displaystyle f(x) = 0$ if 0 <= x < 1 or 1 < x <= 2

$\displaystyle f(x) = 1$ for every other value of x

Show that f is integrable on [0, 2] and find $\displaystyle \int_0^2 \! f(x) \, dx$

**My question is simply how was it determined that the partition should be as stated? I have no doubt that it is correct, I simply don't understand it.**

Solution:

Let $\displaystyle \epsilon > 0$ be given.

Let P = {0, 1 - $\displaystyle \epsilon$/3, 1 + $\displaystyle \epsilon$/3, 2}

Then L(f, P) = 0, since f(x) = 0 at points of each of these subintervals into which P subdivides [0, 2].

Since f(1) = 1, we have:

U(f, P) = 0(1 - $\displaystyle \epsilon$/3) + 1(2$\displaystyle \epsilon$/3) + 0(2 - (1 + $\displaystyle \epsilon$/3))

U(f, P) = (2$\displaystyle \epsilon$)/3

Hence, U(f, P) - L(f, P) < $\displaystyle \epsilon$ and f is integrable on [0, 2]. Since L(f, P) = 0 for every partition, $\displaystyle \int_0^2 \! f(x) \, dx$ = $\displaystyle I_*$ = 0.