# If $\int_a^bg(x)dx=0$, show that $\int_a^bf(x)g(x)dx=0.$

Let $$g(x)\ge0$$. If $$\int_a^bg(x)dx=0$$, show that $$\int_a^bf(x)g(x)dx=0,$$ where $$f$$ is any integrable function.

If simeone is allowed to use the Mean Value thorem for integrals, the proof is at hand. But for that $$f$$ must be continuous!

Any suggestion?

• Just show that $g$ is identically zero. – Artem May 20 at 1:06
• If $g \ge 0$ and $\int ^b_a g(x) dx = 0$ then $g = 0$ almost everywhere, and so $fg =0$ almost everywhere as well. – User8128 May 20 at 1:07
• @Artem it isn't, necessarily – qbert May 20 at 1:07
• @qbert Ooof, I've been teaching introductory calculus too long. Silly me. Forgot. – The Count May 20 at 2:47
• @TheCount no sweat, I generally distrust the Riemann-integral myself :P – qbert May 20 at 2:55

I try to prove this without invoking anything about Lebesgue integral. Moreover, I do not assume the fact that $$fg$$ is Riemann integrable nor the inequality $$| \int_a^b f(x)g(x) dx | \leq \int_a^b |f(x)g(x)|dx$$.

$$f$$ is Riemann integrable $$\Rightarrow$$ $$f$$ is bounded. Choose $$M>0$$ such that $$|f(x)|\leq M$$ for all $$x\in[a,b]$$. Let $$\varepsilon>0$$ be given. Choose $$\delta>0$$ such that for any partition $$\mathbb{P}=\{x_{0},x_{1},\ldots,x_{n}\}$$ of $$[a,b]$$ (with $$a=x_{0}) and any $$\xi_{i}\in[x_{i-1},x_{i}]$$, if $$||\mathbb{P}||<\delta$$ (here, $$||\mathbb{P}||=\max_{1\leq i\leq n}|x_{i}-x_{i-1}|$$), then $$\left|\sum_{i=1}^{n}g(\xi_{i})(x_{i}-x_{i-1})-\int_{a}^{b}g(x)dx\right|<\frac{\varepsilon}{M}.$$ That is, $$\left|\sum_{i=1}^{n}g(\xi_{i})(x_{i}-x_{i-1})\right|<\frac{\varepsilon}{M}.$$

Now, let $$\mathbb{P}=\{x_{0},x_{1},\ldots,x_{n}\}$$ be an arbitrary partition of $$[a,b]$$, with $$a=x_{0}, that satisfies $$||\mathbb{P}||<\delta$$. Let $$\xi_{i}\in[x_{i-1},x_{i}]$$ be arbitrary. Then $$\begin{eqnarray*} & & \left|\sum_{i=1}^{n}f(\xi_{i})g(\xi_{i})(x_{i}-x_{i-1})-0\right|\\ & \leq & \sum_{i=1}^{n}|f(\xi_{i})g(\xi_{i})|(x_{i}-x_{i-1})\\ & \leq & M\sum_{i=1}^{n}g(\xi_{i})(x_{i}-x_{i-1})\\ & < & M\cdot\frac{\varepsilon}{M}\\ & = & \varepsilon. \end{eqnarray*}$$ This shows that the Riemann integral $$\int_{a}^{b}f(x)g(x)dx$$ exists and $$\int_{a}^{b}f(x)g(x)dx=0$$.

• Props for a complete answer that doesn't invoke the Lebesgue integral. – Charles Hudgins May 20 at 4:44
• @Alex Ortiz Although it is true that if $f$ and $g$ are Riemann integrable functions on $[a,b]$, then $fg$ is also Riemann integrable on $[a,b]$, this fact is not an axiom and it requires a proof. I tried to assume as less as possible and avoid invoking this fact. – Danny Pak-Keung Chan May 21 at 21:40

This is about Riemann integration, so $$f,g$$ are necessarily bounded.

We'll use that.

$$\int_a^b f g dx =\int_a^b \underset{\mbox{nonnegative}}{\underbrace{(f - \inf f)}} g dx+ (\inf f )\underset{=0}{\underbrace{\int_a^b g dx}}$$

so the problem is reduced to Riemann integrable nonnegative $$f$$. For such $$f$$

$$0\le \int_a^b g f dx \le (\sup f) \int_a^b g dx =0.$$

Define \begin{align} p_n(x) &=\frac{|x-n|-|x-n-1|-|x+n|+|x+n+1|}2\\[6pt] &=\left\{\begin{array}{cl} -1&\text{if }x\lt-n-1\\ x+n&\text{if }-n-1\le x\lt-n\\ 0&\text{if }-n\le x\lt n\\ x-n&\text{if }n\le x\lt n+1\\ 1&\text{if }n+1\le x \end{array}\right. \end{align} In particular, $$p_n$$ is continuous, so that $$p_n(f)$$ is integrable. Furthermore, \begin{align} \sum_{k=0}^{n-1}p_k(x) &=\frac{|x+n|-|x-n|}2\\ &=\left\{\begin{array}{cl} -n&\text{if }x\lt-n\\ x&\text{if }-n\le x\lt n\\ n&\text{if }n\le x\\ \end{array}\right. \end{align} Therefore, \begin{align} \left|\int_a^bf(x)\,g(x)\,\mathrm{d}x\right| &=\left|\sum_{n=1}^\infty\int_a^bp_n(f(x))\,g(x)\,\mathrm{d}x\right|\\ &\le\sum_{n=1}^\infty\int_a^b|p_n(f(x))|\,g(x)\,\mathrm{d}x\\ &\le\sum_{n=1}^\infty\int_a^b\,g(x)\,\mathrm{d}x\\ &=\sum_{n=1}^\infty0\\[6pt] &=0 \end{align} Note that if $$f$$ is finite, then the sum above is finite.

• One should try to avoid using anything about Lebesgue integral. – Danny Pak-Keung Chan May 20 at 3:44
• @DannyPak-KeungChan Actually the OP didn't say that... – Bach May 20 at 3:50
• Implicitly in the tag... I agree that OP should state this explicitly. – Danny Pak-Keung Chan May 20 at 3:52
• This really doesn't have anything to do with Lebesgue integration, and I have modified the answer to make that more apparent. – robjohn May 20 at 4:08
• I didn't check that the convergence $\sum_1^N p_n(f)\to_N f$ is uniform, so that you know it is valid to change integral and summation. May be worth mentioning. – Alex Ortiz May 21 at 17:48

Since $$g(x)\ge0$$ and $$\int_{a}^bg(x)=0$$, then for every $$\epsilon>0$$, $$m(\{x:g(x)\ge\epsilon\})=0$$ where $$m$$ denotes the Lebesgue measure on $$\mathbb R^1$$. Set $$\int_a^b |f(x)|dx=M<\infty$$ since $$f(x)$$ is integrable. \begin{align} \int_a^b |f(x)g(x)|dx&=\int_a^b |f(x)|g(x) \chi_{\{x:g(x)<\epsilon\}}dx+\int_a^b |f(x)|g(x)\chi_{\{x:g(x)\ge \epsilon\}}dx\\ &\le \epsilon\int_a^b |f(x)|dx\\ &=\epsilon M \end{align} Since $$\epsilon$$ can be arbitrary small, we conclude that $$\int_a^bf(x)g(x)dx=0$$.

Or you may use the idea above to prove that $$g(x)=0$$ a.e. To do this, note that we can decompose the set $$\{x:g(x)>0\}$$ as

$$\displaystyle{\{x:g(x)>0\}=\bigcup_{n=1}^\infty\{ x: g(x)\ge\frac 1n \}}$$

and note that

$$m(\{x:g(x)>0\})\le\sum_{n=1}^\infty m(\{ x: g(x)\ge\frac 1n \})=0 .$$

We can conclude that $$g(x)=0$$ a.e. This will give you $$\int_a^b f(x)g(x)dx=0.$$

• It seems that OP prohibits the use of anything related to Lebesgue integral. If we are allowed to do so, then it is one line. $f\geq 0$ and $\int f=0$ implied that $f=0$ a.e.. Then $fg=0$ a.e., so $\int fg=0$. – Danny Pak-Keung Chan May 20 at 3:21
• But you need to prove that $f\ge 0$ and $\int f=0$ implies $f=0$ a.e. :) – Bach May 20 at 3:30
• This is an obviously fact. Let $A=\{x\mid f(x)>0\}$. Then $A=\cup_{n=1}^\infty \{x\mid f(x)\geq \frac{1}{n}\}$. If $\mu(A)>0$, then $\mu(A_n)>0$ for some $n$. Then $\int f \geq \int_{A_n} f \geq \frac{1}{n}\mu(A_n)>0$. Here, $A_n =\{x\mid f(x)\geq \frac{1}{n}\}$. – Danny Pak-Keung Chan May 20 at 3:42
• @DannyPak-KeungChan Well, basically the same thing as I mentioned in the latter part of my post... – Bach May 20 at 3:53