# Let $f:]0,1]\to \mathbb R$ a continuous function s.t $\lim_{x\to 0^+}f(x)$ exist. Show that $\int_0^1\hat f=\int_{o^+}^1 f.$

Let $f:]0,1]\longrightarrow \mathbb R$ continuous s.t. $\lim_{x\to 0^+}f(x),$ exist. Set $\hat f$ the continuous extension of $f$. I.e. $\hat f:[0,1]\to \mathbb R$ is defined as $$\hat f(x)=\begin{cases}f(x)& x\in ]0,1]\\ \lim_{x\to 0^+}f(x)&x=0\end{cases}.$$

We know that $\hat f$ is integrable. Prove that $f$ is integrable over $]0,1]$ and that $$\int_0^1 \hat f=\int_{0^+}^1 f.$$

For the integrability, we have to check that $$\lim_{t\to 0}\int_{t}^1 f(x)dx,$$ exist. But $$\int_t^1|f|=\int_t^1|\hat f|\leq \int_0^1|\hat f|,$$ and thus $$\lim_{t\to 0}\int_t^1 |f|,$$ exist, and thus $$\lim_{t\to 0^+}\int_t^1f=:\int_{0^+}^1 f,\tag{E}$$ exist.

Q1) Is this correct ?

Q2) How can I prove that $$\int_{0^+}^1 f=\int_0^1|\hat f| \ \ ?$$

To me it come from the fact that $\int_t^1 |f|=\int_t^1|\hat f|$ for all $t$. But in my solution they do as follow : suppose WLOG $f\geq 0$ $$\frac{1}{n}\sum_{k=0}^n\hat f\left(\frac{k}{n}\right)-\frac{\hat f(0)}{n}= \frac{1}{n}\sum_{k=1}^nf(\frac{k}{n}),$$ and thus $$\int_0^1\hat f=\lim_{n\to \infty }\frac{1}{n}\sum_{k=1}^n f\left(\frac{k}{n}\right)=\int_{0^+}^1 f.$$

Why doing such a thing ? I dont really understand the last equality... but is my equation (E) wrong ?

• No, that proof is not correct. The integrals of $f$ and of $|f|$ don't have to be equal. Try looking at $\left|\int_{0}^{1}\hat{f} - \int_{t}^1f\right|=\left|\int_{0}^{t}\hat{f}+\int_{t}^{1}\hat{f} - \int_{t}^1f\right|=\left|\int_{0}^{t}\hat{f}+\int_{t}^{1}f - \int_{t}^1f\right|=\left|\int_{0}^{t}\hat{f}\right|\leq\max_{[0,t]}|hat{f}|\cdot |t-0|\leq\max_{[0,1]}|\hat{f}|\cdot|t-0|$. – user574889 Jul 20 '18 at 10:59

There is a much simpler approach. Since the function$$\begin{array}{ccc}[0,1]&\longrightarrow&\mathbb R\\t&\mapsto&\displaystyle\int_t^1\hat f(x)\,\mathrm dx\end{array}$$is continuous, you have\begin{align}\int_0^1\hat f(x)\,\mathrm dx&=\lim_{t\to0^+}\int_t^1\hat f(x)\,\mathrm dx\\&=\lim_{t\to0^+}\int_t^1f(x)\,\mathrm dx\\&=\int_{0^+}^1f(x)\,\mathrm dx.\end{align}
• @cactus: We can extend $t\mapsto\int_t^1f(x)dx$ by continuity. So it work. – Peter Jul 20 '18 at 11:03
• Since $\hat f$ is continuous, the Fundamental Theorem of Calculus tells us that that function is differentiable. Since it is differentiable, it is continuous. And, in fact, you can easily prove it directly, without using that theorem. – José Carlos Santos Jul 20 '18 at 11:03