# If $f$ is continuous on $[a,b)$ and $[b,c]$, then $f$ is Riemann integrable on $[a,c]$.

True or False: If $f$ is continuous on $[a, b)$ and on $[b, c]$, then $f$ is Riemann integrable on $[a, c]$.

I was unsure if the $)$ in $[a,b)$ completely changed the problem and made it false and I should be looking for a counterexample or if the following attempt worked.

Since $f$ is continuous on $[a, b)$, then $f$ is integrable on $[a, b)$. Similarly, $f$ is integrable on $[b, c]$. Therefore by definition, let P$_1$ be a partition of $[a, b]$ s.t. $U(f, P_1) − L(f, P_1) < \frac{\epsilon}{2}$ and $P_2$ be a partition of $[b, c]$ s.t $U(f, P_2) − L(f, P_2) < \frac{\epsilon}{2}$. Therefore, $P = P_1 \cup P_2$ is a partition of $[a, c]$. Since $b$ is the right endpoint of $P_1$ and the left endpoint of $P_2$, then $U(f, P) − L(f, P) = U(f, P_1) + U(f, P_2)−L(f, P_1)−L(f, P_2) = U(f, P_1)−L(f, P_1) +U(f, P_2)−L(f, P_2)< \frac{\epsilon}{2}+ \frac{\epsilon}{2} = \epsilon$.

So, $f$ is integrable on $[a, c]$.

Does this work? Or, is there a counterexample because $[a,b)$ isn't $[a,b]$?

• $f(x)$ could approach $+\infty$ as $x$ approaches $b$ from below. ${}\qquad{}$ – Michael Hardy Dec 12 '14 at 21:27

$$f(x) = \left\{ \begin{array}{cc} \frac{1}{x-b}, & x < b \\ 1, & x \ge b\end{array}\right.$$
Hint: since $[b,c]$ is compact and $f$ is continuous, $f$ must be bounded on $[b,c]$; but this doesn't need to be true on $[a,b)$. Can you think of a function that wouldn't be integrable on $[a,b)$?