# An example for integrable function that is never zero

Let $$f\::\mathbb{R}\to\mathbb{R}$$ be integrable function for all $$[a,b],\hspace{0.2cm} (a).

and$$\hspace{0.2cm}\forall c,x\in\mathbb{R} \hspace{0.2cm} f(x)\not=0 \hspace{0.2cm} and \hspace{0.2cm}{\displaystyle \int_{c}^{c+1}f(x)\,dx}=0$$

Can I have an example for such function?

Thank you!

• $f(x)=\{1 if x\in[\frac {2k} 2, \frac {2k+1} 2]; -1 if x\in[\frac {2k+1} 2, \frac {2k+2} 2]\}$ May 6, 2020 at 19:15
• $sin 2\pi x$ should work May 6, 2020 at 19:15

You see according to what you say let us take

$$f(x)=\sin 2\pi x, \text{ for } x\in\mathbb{R- Z}$$

$$f(x)=1, \text{ for } x\in\mathbb{ Z}$$

$$\int_{a}^{b}\sin 2\pi x \mathrm dx <\infty, \forall a

And $$\int_{c}^{c+1}\sin 2\pi x \mathrm dx=\int_{0}^{1}\sin 2\pi x \mathrm dx=0, \forall c$$.

• The question also asked for $\forall x \in \mathbb{R}, f(x) \neq 0$, but $\sin(2\pi 0) = \sin(0) = 0$. May 6, 2020 at 19:27
• your answer works you just need to redefine sin where it is 0, to be something else, and it won't change the integral since it is a countable amount of points May 6, 2020 at 19:28
• depends which kind of "integrable" he means but yeah May 6, 2020 at 19:34
• @ChrisEagle I missed it sorry. May 6, 2020 at 19:37
• @BinyaminR Thank you May 6, 2020 at 19:37