Suppose for a fixed continuous function $g$, all even continuous real-valued functions $f$ satisfy $\int_{-1}^1 fg = 0$, is it true that $g$ is odd on $[-1,1]$?

My intuition is telling me that this is correct, as I have not found any counterexamples. I've tried proving this by generating a contradiction by assuming $g$ is not odd and so there is a point such that $g(-x) \neq -g(x)$ on $[-1,1]$, but this doesn't yield any information that I think I can readily use to prove the claim.

Any help would be very much appreciated!

  • $\begingroup$ If $g$ is continuous and the statement holds for any even continuous function $f$, then the conclusion is true. But if it holds only for a given function $f$, then it need not be true. We have so much room for cooking up counter-examples. For instance, fix $f \equiv 1$ and try to determine a non-trivial $g(x)=ax^2+b$. $\endgroup$ Jul 5, 2020 at 22:59
  • $\begingroup$ For a simple family of counterexamples, let $f$ be $0$ on $[-1/2, 1/2]$. Outside this interval, define $f$ to be any even function you want. Then you can define $g$ to be anything you want on $[-1/2, 1/2]$ without affecting the integral of the product. $\endgroup$
    – davidlowryduda
    Jul 5, 2020 at 23:03
  • $\begingroup$ @SangchulLee Sorry! I totally forgot to include the $\forall$ quantifier on $f$ in the question description. Given that this holds for all even functions $f$, you mentioned that the statement is true? $\endgroup$ Jul 5, 2020 at 23:04

2 Answers 2


For the edited question: The answer is yes. Indeed, let $f$ be an arbitrary continuous function on $[0,1]$ and extend it to a continuous even function

$$ \tilde{f}(x) = \begin{cases} f(x), & x \geq 0; \\ f(-x), & x < 0; \end{cases} $$

on $[-1, 1]$. (Check that $\tilde{f}$ is indeed continuous!) Then by the assumption,

$$ 0 = \int_{-1}^{1} \tilde{f}(x)g(x) \, \mathrm{d}x = \int_{0}^{1} f(x)(g(x)+g(-x)) \, \mathrm{d}x. $$

Now pick $f(x) = g(x)+g(-x)$ and note that

$$ \int_{0}^{1} (g(x)+g(-x))^2 \, \mathrm{d}x = 0. $$

Together with the continuity of $g$, this implies that $g(x)+g(-x) = 0$ for all $x \in [0, 1]$, which then implies that $g$ is odd.

  • $\begingroup$ Thanks for the answer! I'm wondering how the last integral implies that $g(x) + g(-x) = 0$? $\endgroup$ Jul 5, 2020 at 23:30
  • $\begingroup$ @learning_linalg, Note that $(g(x)+g(-x))^2\geq0$ and its integral is zero. This and the continuity together implies that $(g(x)+g(-x))^2=0$. For more details, this posting might be helpful. $\endgroup$ Jul 5, 2020 at 23:34

Simple counterexample: let $f=0$, then $g$ can be any function. For a non-zero $f$ this still does not hold. Can you think of a counterexample?

  • $\begingroup$ Edited the question! I'm sorry. I totally missed saying that the statement holds for all even functions. Careless on my part, sorry. $\endgroup$ Jul 5, 2020 at 23:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .