# Is a function with limits Riemann integrable?

Suppose $$f : [ 0, 1 ] → \mathbb{R}$$ and $$\lim\limits_{x \rightarrow c} f ( x )$$ exists for all $$c \in [ a , b ]$$. Show that $$f$$ is Riemann integrable on $$[ a , b ]$$.

I can show this $$f$$ is bounded on $$[a,b]$$ since the limit exists at every point. But I'm not sure how to proceed. Any hints or help would be great.

• You should replace $[a,b]$ with $[-1,1]$ or vice versa. – Haris Gušić Feb 20 at 4:07

Show that such $$f$$ with a limit that exists on every point of interval $$[a,b]$$ is discontinuous in an at most countable set (it is proved here on this site). The main idea is showing that the set $$\{x : f(x) \neq g(x)\}$$, where $$g(y) = \lim_{y \rightarrow x} f(y)$$, is at most countable.

Then, apply the Lebesgue criterion to show that the function is integrable since countable sets have measure zero.

• The question asks for Riemann integrability, so the Lebesgue criterion doesn't apply. – TonyK Feb 21 at 21:34
• @TonyK, the Lebesgue criterion is for Riemann integrability. See en.wikipedia.org/wiki/Riemann_integral middle of page. – twnly Feb 21 at 21:41
• You are right, of course. Sorry. – TonyK Feb 21 at 22:08

Sketch of a more elementary approach: Let $$\epsilon > 0.$$ For every $$x\in [0,1]$$ there is an interval $$I_x$$ centered at $$x$$ where

$$\sup_{I\setminus \{x\}} f - \inf_{I\setminus \{x\}}< \epsilon/2.$$

The reason we need to remove $$x$$ from $$I_x$$ is because $$\lim_{\,t\to x} f(t)$$ pays no attention to the value of $$f$$ at $$x.$$

Because $$[0,1]$$ is compact, finitely many of these intervals cover $$[0,1].$$ Let's label them $$I_{x_k},$$ $$k=1,2,\dots n.$$ The $$x_k$$ form a partition of $$[0,1],$$ but we need to tweak this partition because the values of the $$f(x_k)$$ could be a bit wild. However, as you noted, $$|f|$$ is bounded by some $$M.$$ So for each $$k$$ we can choose $$y_k very close to $$x_k$$ and then let $$P$$ be the partition formed by throwing in all the $$x_k,y_k,z_k.$$ For this partition, we will have

$$U(f,P)-L(f,P)<\epsilon,$$

which implies $$f$$ is Riemann integrable on $$[0,1].$$

• Can you explain a bit more why we need to omit $x \in I$. I used a similar argument to prove $f$ is not bounded, but I did not omit $x$. Also, I'm not quite sure where your first inequality came from @zhw. – user439126 Feb 25 at 22:15
• It's possible for $f$ to have limit $0$ at $x$ while $f(x)=10.$ In other words, the value $f(x)$ is irrelevant in the limit process. In my first inequality, I am using the fact that the limit exists at $x.$ All values in $I_x\setminus \{0\}$ are close to the limit, hence close to each other. – zhw. Feb 26 at 23:39
• I see, thank you. Now I am stuck on $\sup f(x) - \inf f(x) < \frac{\varepsilon}{2}$ in $[y_k, x_k]$ or $[x_k,z_k]$. How does $f$ being bounded and $y_k$ and $z_k$ being very close to $x_k$ help? @zhw. – user439126 Feb 26 at 23:50
• Also, when you say all values in $I_x \setminus \{x\}$ are close to the limit, do you mean all $f(y)$ for $y \in I_x \setminus \{x\}$ are close to the limit? @zhw. – user439126 Feb 26 at 23:56
• For the first question, note that $\inf (L-\epsilon,L+\epsilon)=L-\epsilon$,$\sup (L-\epsilon,L+\epsilon)=L+\epsilon .$ So $\sup - \inf = 2\epsilon.$ Yes on the second question. – zhw. Feb 28 at 17:16