4
$\begingroup$

$\def\d{\mathrm{d}}$We know that if a function $f:\mathbb{R}\rightarrow\mathbb{R}$ is odd, then$$\int_{-a}^a f(x)\,\d x=0.$$ I'm wondering if the converse is true, and if not, if there are any counterexamples.

Thanks!

Edit: There was confusion about the quantifier for $a$, and I was also looking for continuity, even though I didn't say that in the question. So to clarify, I was wondering if the following statement was true or false:

Given a function $f \in C(I)$, if for some $a$ the integral$$\int_{-a}^af(x)\,\d x=0,$$ then $f$ must be odd.

$\endgroup$
  • 2
    $\begingroup$ Is your hypothesis that the integral is zero FOR ALL $a$? If so better amend the question. $\endgroup$ – ancientmathematician Apr 18 '17 at 15:52
  • $\begingroup$ @ancientmathematician, I was wrestling with that same thing but I think that's what OP does mean because the converse technically would be "If $\int_{-a}^a f(x) \, dx = 0$ for all $a$ then..." $\endgroup$ – tilper Apr 18 '17 at 15:57
  • $\begingroup$ This question is more interesting with the stipulation that $f$ is continuous. $\endgroup$ – Reinstate Monica Apr 18 '17 at 16:18
1
$\begingroup$

The statement is not true, simple counterexample is $f(x) = \cos x$ on $[-\pi,\pi]$ since $\int_{-\pi}^\pi \cos x \,dx=0$.

$\endgroup$
  • 1
    $\begingroup$ The hypothesis of the converse would be $\int_{-a}^a f(x) \, dx = 0$ for all $a$. $\endgroup$ – tilper Apr 18 '17 at 16:17
  • $\begingroup$ I think that's the only interpretation because the well known statement is "If $f$ is odd then $\int_{-a}^a f(x) \, dx = 0$ for all values of $a$" and not "If $f$ is odd then $\int_{-a}^a f(x) \, dx = 0$ for some fixed value of $a$." Downvote isn't mine.. $\endgroup$ – tilper Apr 18 '17 at 16:22
  • $\begingroup$ @tilper Its okay I don't care about downvote. You could say that the well known statement is that given $a>0$ we have if $f(x)$ is odd on $[-a,a]$, then integral is $0$, then opposite would be if integral is $0$ then $f(x)$ is odd ... I think it is really up to OP to decide what he meant. I will hide the answer until then... $\endgroup$ – Sil Apr 18 '17 at 16:26
  • $\begingroup$ Restored the answer as OP clarified the meaning is for some $a$, not for all $a$. $\endgroup$ – Sil Apr 18 '17 at 17:09
4
$\begingroup$

I assume that $f\in L^1(\mathbb R)$ with $\int_{-a}^af(x)dx=0$ for all $a>0$. In this case, the general answer is "no", and you can easily construct counterexamples by simply taking any odd function and changing it on a set of Lebesgue-measure zero to make it not odd. One such example has been given in JJR's answer for any fixed $a>0$.

However, if $f$ is known to have a classical primitive (i.e. a function $F$ that is differentiable everywhere with $F'=f$), then the answer is "yes" (note that every continuous function has such a primitive). In this case, assuming w.l.o.g. that $F(0)=0$, we have \begin{align*} F(a)=\int_0^a f(x)dx \end{align*} and hence \begin{align*} 0=\int_{-a}^a f(x)dx=\int_{-a}^0f(x)dx+\int_0^af(x)dx=-F(-a)+F(a), \end{align*} which shows $F(-a)=F(a)$ for all $a\in\mathbb R$. Thus $F$ is even and hence $f$ is odd. (See also here for more details on that last conclusion).

$\endgroup$
3
$\begingroup$

$f(x) = \left\{ \begin{array}{ll} 1 & \text{ if }x\in[-a,a]\cap\mathbb{Q}\\ 0 & \text{ else} \end{array}\right.$

$\endgroup$
  • $\begingroup$ @Doug M: No, it isn't. $\endgroup$ – Bernard Apr 18 '17 at 15:53
  • $\begingroup$ Is this even integrable? $\endgroup$ – DHMO Apr 18 '17 at 15:56
  • $\begingroup$ Yes it is integrable with integral 0 $\endgroup$ – JJR Apr 18 '17 at 15:57
  • $\begingroup$ Not in Riemann-sense, but in Lebesgue sense it is integrable. $\endgroup$ – sranthrop Apr 18 '17 at 15:57
  • $\begingroup$ You can make it Riemann integrable just by making $f$ nonzero at only two points, say $\pm 1$. It can take any values at those points as long as they are not negatives of each other and you will have a function that is not odd that integrates to zero over any interval, not just those symmetric around zero. $\endgroup$ – Ross Millikan Apr 18 '17 at 15:59
2
$\begingroup$

Counter-example (sketch):

Consider the function, defined on $[-1,1]$ as $$f(x)=\begin{cases}x&\text{if }\;0\le x<\frac12,\\ x-1&\text{if }\;\frac12< x\le 1,\\ 0& \text{if }\;-1\le x<0. \end{cases}$$

For a continuous function on $[-1,1]$, consider the function defined by $$f(x)=\begin{cases}\sin (2\pi x)&\text{if }\;0\le x\le 1,\\ 0& \text{if }\;-1\le x<0. \end{cases}$$

$\endgroup$
  • 1
    $\begingroup$ This does not work, the integral over the interval $-\frac{1}{4}, \frac{1}{4}$ is not zero... (assuming the OP considers the statement to be for all $a \in \mathbb{R}_{>0}$). $\endgroup$ – Student Apr 18 '17 at 15:55
  • $\begingroup$ I didn't suppose it were true for all $a$, of course (and the O.P. does not specify it). $\endgroup$ – Bernard Apr 18 '17 at 15:59
  • 1
    $\begingroup$ I would think the OP asks if the statement "$f$ is odd then for all $a$ $\int_{-a}^{a}f = 0$" is actually an equivalence... $\endgroup$ – Student Apr 18 '17 at 16:00
  • 1
    $\begingroup$ I can't understand why people continues to write that the statement is "for all $\;a\;$ ". The title is very precise: "...along an interval symmetric to..." ! This counter example works just fine. +1 $\endgroup$ – DonAntonio Apr 18 '17 at 16:44
  • $\begingroup$ @DonAntonio, the title is precise but, as is common on this site (although usually not this subtle), the question is different. OP mentions the "well known" fact that "If a function $f$ is odd then $\int_{-a}^a f(x) \, dx = 0$." Those who know this know that it's true for all $a$. So the converse, that OP specifically asks about in the question (thus subtly contradicting the title), is "If $\int_{-a}^a f(x) \, dx = 0$ for all $a$, then $f$ is odd" $\endgroup$ – tilper Apr 18 '17 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.