# Prove a function is odd using Riemann Sums

I've been asked to prove the following:

Assume $f(x)$ is continuous on $[-L,\ L]$ and $\int_{-a}^af = 0$ for all $a\in[0,\ L]$. Show that $f(x)$ is odd.

The catch? I'm only allowed to use Riemann sums.

Note: what makes this question different from most other ones I've read, such as this one, is that here I'm asked to prove $f(x)$ is odd, where in the others you are asked to prove the integral is $0$.

What I have so far is fairly straightforward: \begin{aligned} \int_{-a}^a f(x)\text{d} x & = \int_0^af(x)\text{d} x + \int_{-a}^0 f(x)\text{d} x \\ & = \lim_{N\to\infty}\sum_{i=0}^{N-1}f\left(\frac{ia}N\right)\frac aN + \lim_{N\to\infty}\sum_{i=0}^{N-1}f\left(-\frac{ia}N\right)\frac aN \\ & = \lim_{N\to\infty}\left[\sum_{i=0}^{N-1}f\left(\frac{ia}N\right)\frac aN + \sum_{i=0}^{N-1}f\left(-\frac{ia}N\right)\frac aN\right] \\ & = \lim_{N\to\infty}\frac aN\sum_{i=0}^{N-1}\left[f\left(\frac{ia}N\right)+f\left(-\frac{ia}N\right)\right] \\ & = \lim_{N\to\infty}\frac aN\sum_{i=0}^{N-1}g\left(\frac{ia}N\right) \\ & = \int_0^ag(x)\text{d} x = 0\qquad\forall a\in[0,\ L] \end{aligned}

I was thinking that it would be easier to show that if $\int_0^af(x)\text{d}x = 0$ for all $a$ then $f(x)=0$, but I'm still unsure where to go from here (if this is the right route to take).

To be honest, I'm skeptical there's a solution involving just Riemann sums, since if you're given $\lim_{N\to\infty}\frac aN\sum_{i=0}^{N-1}f(ia/N) = 0$ for all $a$, then you'll only be able to conclude that $f(x)$ is zero except at a countable number of points. I'm not sure how you'd use the continuity of $f(x)$.

Any help would be appreciated.

• Presumably you mean for all $a \in [0,L]$? – copper.hat Jan 25 '17 at 19:40
• Yes indeed, thank you. – user3002473 Jan 25 '17 at 19:42

One possible approach:

Since $-\int_{-a}^0 f(x) dx = \int_0^a f(x) dx$, we have $\int_0^a (f(x)+f(-x)) dx = 0$ for all $a\in [0,L]$.

In particular, $\int_b^c g(x) dx = 0$ for all $0 \le b \le c \le L$, where $g(x) = f(x)+f(-x)$.

Now suppose $g(x) \neq 0$ and use continuity along with the Riemann sums to get a contradiction.

• I considered that but couldn't find a contradiction specifically involving Riemann sums (of course, otherwise, finding a contradiction isn't difficult). – user3002473 Jan 25 '17 at 19:54
• If $g(x_0) >0$ for example, then $g(x) > {1 \over 2} g(x_0)$ in some $b < x_0 < c$. Then $L(g,P) \ge {1 \over 2} g(x_0)(c-b)$ for all partitions and hence $\int_b^c g \ge {1 \over 2} g(x_0)(c-b) >0$, a contradiction. – copper.hat Jan 25 '17 at 19:56
• Huh, not what I had in mind but I suppose that works. Thanks! – user3002473 Jan 25 '17 at 19:57

Recall that a continuous function can't be zero except at a countable number of points. If a function $h$ is nonzero only on a countable number of points, then the set of points at which it is zero is dense. Fix $\epsilon > 0$. Let $|h(x)| > \epsilon$; there are $y$ arbitrarily close to $x$ so that $h(y) = 0$, so $|h(x) - h(y)| > \epsilon$, contradicting continuity. So $|h(x)| \leq \epsilon$. But $\epsilon$ was arbitrary, so $h(x) = 0$.

Now, you know $\int_0^ag(x)dx = 0$ for all $a$, so $g$ is zero almost everywhere. Since $g$ is also continuous, $g$ is zero everywhere.

• Sorry, I don't understand: a continuous function can't be zero except at a countable number of points? What about a piecewise continuous function? Also, where in this do you use Riemann sums? – user3002473 Jan 25 '17 at 19:53
• The first statement is incorrect. A continuous function can be zero on an interval. Take $f(x) = \max(0,x)$, this is zero on $(-\infty,0]$. – copper.hat Jan 25 '17 at 19:59
• @copper.hat Not incorrect, just poorly phrased. I should have said "it can't be that a continuous function is only nonzero on a countable number of points." – Reese Jan 25 '17 at 20:26
• @user3002473 This builds off of what you've already done. You used Riemann sums to show $\int_0^ag (x)dx = 0$; what I did was show that this means that $g$ must be zero. – Reese Jan 25 '17 at 20:35