# Function on half open interval is Riemann-integrable on closed interval

I'm having the following question:

Let $$f:(a.b] \to \mathbb{R}$$ a continuous and bounded function on the open interval $$(a, b]$$. Prove that $$f$$ is Riemann integrable on the closed interval $$[a,b]$$.

I tried to show that for every $$\epsilon > 0$$ there exist $$\delta > 0$$ so that for every partition $$p$$ that satisfies $$\lambda(p) < \delta \Rightarrow U(p,f) - L(p,f) < \epsilon$$, but I don't know how to estimate $$U(p,f) - L(p,f)$$.

• A good example of this is $f(x) = \sin (1/x)$ on $(0,1]$. It is extendable as a Riemann integrable function on $[0,1]$ -- even though it cannot be continuously extended. – RRL Apr 29 at 19:28

If a function is Riemann integrable it must be bounded. This is a necessary condition and not just a part of the definition of the Riemann integral. Hence, to define the Riemann integral of $$f$$ over $$[a,b]$$, any finite value for $$f(a)$$ can be assigned so that $$f:[a,b] \to \mathbb{R}$$ is bounded. Ultimately the value of the integral will not depend upon this choice as the singleton $$\{a\}$$ has measure $$0$$.

Since $$f$$ is bounded on $$(a,b]$$ we have finite values $$M = \sup_{x \in (a,b]}f(x)$$ and $$m = \inf_{x \in (a,b]} f(x)$$. Define $$M' = \max(M,f(a))$$ and $$m' = \min (m,f(a))$$.

Given $$\epsilon > 0$$, take any point $$x_1 \in (a,b)$$ such that $$x_1 < \epsilon/(2(M'-m'))$$. With $$x_1$$ fixed we have $$f$$ continuous on $$[x_1,b]$$ and, therefore, Riemann integrable. Given $$\epsilon > 0$$ there exists a partition $$P': x_1 < x_2 < \ldots < x_n = b$$ such that $$U(P',f) - L(P',f) < \epsilon/2$$.

Extending to a partition $$P: a = x_0 < x_1< x_2 < \ldots < x_n = b$$ we have

$$U(P,f) - L(P,f) = ( \sup_{x \in [a,x_1]} f(x) - \inf_{x \in [a,x_1]} f(x)) \,x_1 + U(P',f) - L(P',f) \\ \leqslant (M'-m')x_1 +U(P',f) - L(P',f) < \epsilon$$

Therfore, $$f$$ is Riemann integrable on $$[a,b]$$ by the Riemann criterion.

• Got it. Thanks so much! :) – Nave Tseva Apr 29 at 19:29
• @NaveTseva: You're welcome! – RRL Apr 29 at 19:30
• Sorry for the delay, but what if $f(x)$ is constant such that $f(x) = c$ and we define $f(a) =c$? We can't define x1 as the original defnition... – Nave Tseva May 4 at 12:09
• @NaveTseva: In that trivial case,we have for any partition $U(P,f) - L(P,f) = 0$ so the function is integrable and we don't need to define $x_1$ that way. – RRL May 4 at 17:38
• That's makes sense... thanks! – Nave Tseva May 4 at 18:07