Evaluate $\int^4_0 g(x) \text { d}x$
Breaking this up into separate integrals, I got:
$$\int^4_0 g(x) \text { d}x = \int^1_0 x \text { d}x + \int^2_1 (x-1) \text { d}x + \int^3_2 (x-2) \text { d}x + \int^4_3 (x-3) \text { d}x$$
$$ = \frac{1}{2} + \frac{1}{2} + \frac{1}{2} + \frac{1}{2} = 2$$
However, is this correct? I ask because we have closed/open intervals and so I'm not sure how integration behaves on closed/open intervals.
