# Does $\int_{-x}^{x}f(t)dt=0$ implies $f$ to be an odd function?

I know that for $\quad f:\mathbb{R}\rightarrow \mathbb{R}\quad$ continuous, $$\int_{-x}^{x}f(t)dt=0 \quad \text{for all } x \in \mathbb{R} \implies f(-x)=-f(x) \quad \text{for all } x \in \mathbb{R}.$$ But is the above true for general function on $\mathbb{R}$? More precisely is the following true:
Question: For any Riemann integrable function $\quad f:\mathbb{R}\rightarrow \mathbb{R}$, $$\int_{-x}^{x}f(t)dt=0 \quad \forall \quad x\in \mathbb{R} \implies f(-x)=-f(x) \quad \forall \quad x\in \mathbb{R}.$$ Thanks in advance for any help.

• It's "almost true". Such a function differs from an odd function only on a null set. – Daniel Fischer Jul 12 '18 at 13:50
• It does not make sense, you can't have both $x$ in limits and inside the integral $dx$. Maybe you mean $\int_{-x_0}^{x_0}f(x)dx=0, \forall x_0\in \mathbb R$ – mathreadler Jul 12 '18 at 13:53
• @DanielFischer, Thanks. I've got you now. All we need to prove your statement is that the set of discontinuity of a Riemann Integrable function is null. So, on the complement of this null set, we can apply fundamental theorem of calculus to get the result. – Surajit Jul 12 '18 at 14:12
• You should replace "general function" by "Riemann integrable function" or even go to Lebesgue integrable. – zhw. Jul 12 '18 at 15:41
• @zhw. Thanks. I meant "Riemann integrable function". Edited now. – Surajit Jul 12 '18 at 21:03

You can take an integrable odd function and change its value at a point $x > 0$ so that it's no longer odd but still satisfies all the integral conditions.

This is not true in general. Consider the function $$f(x)=\left\{\begin{array}{lll} 1&:&x=1\\0&:&\text{otherwise}\end{array}\right.$$ Then $\int_a^b f(x)\ dx=0$ for all $a\leq b$, but $f$ is not odd.

Let $f$ be continuous.

Since $$\int_{-x}^{x}f(t)dt=\int_{0}^{x}f(t)dt-\int_{0}^{-x}f(t)dt=0,$$ thus,

$$\dfrac{{\rm d}\int_{0}^{x}f(t)dt}{{\rm d} x}-\dfrac{{\rm d}\int_{0}^{-x}f(t)dt}{{\rm d} x}=0,$$

namely, $$f(x)+f(-x)=0,$$ which is desired.

But, if we cancel the continuity, then the statement does not hold any more, since we can always redefine $f(-x_0)$ at an isolated point $-x_0$ such that $f(-x_0) \neq f(x_0)$, even though the integral keeps the same value.