Does $\int_{-a}^af(x)\,\text{d}x=0$ implies $f$ is odd? We know if a function is odd then $\int_{-a}^af(x)\,\text{d}x=0$,
but I am queried if the converse is true or not.
I.e., if $\int_{-a}^af(x)\,\text{d}x=0$ does it imply function $f$ is odd?
 A: Consider the function
$$f(x)=\begin{cases}3&x<-1\\-1&x\ge-1\end{cases}$$
Then $\int_{-2}^2f(x)\,dx=0$ but $f$ is not odd.
A: If this relationship is true for all $a$ in a symmetrical interval $I$ around the origin, and $f$ is continuous (as remarked by Hans Lundmark), the answer is yes.
Consider identity:
$$\forall a \in I, \int_{-a}^{a}f(x)dx=0 \iff \int_{-a}^{0}f(x)dx+\int_{0}^{a}f(x)dx=0$$
$$\iff \int_{0}^{a}f(x)dx=-\int_{-a}^{0}f(x)dx$$
$$\iff \int_{0}^{a}f(x)dx=\int_{0}^{-a}f(x)dx$$
and differentiate it with respect to $a$: you will get:
$$f(a)=-f(-a)$$
as desired.
Recall: by composition: $$\dfrac{d}{da}\int_0^{\varphi(a)}f(x)dx=f(\varphi(a))\varphi'(a)$$
A: As shown in Jean Marie's answer this has to be true for all $a$.
Here is maybe a more disturbing example than the piecewise and discontinuous one given by Parcly Taxel.
Take $f(x)=3x^2-1$, this is an even continuous function, yet $\displaystyle\int_{-1}^1 f(x)\mathop{dx}=0$
A: As shown in Jean Marie's answer you have to assume that $f$ is continous and that this holds for all $(-a, a) \subset I$, where $I$ is a symmetric intervall about the origin. There is also another interesting relationship here:
Assume that $f : I \rightarrow \mathbb{R}$ is differentiable and that its derivative is continous on $I$. If for all $(-a, a) \subset I$ we have
$$\int_{-a}^{a} f'(x) \, dx = 0,$$
then $f$ is even.
PROOF: Let $x \in I$. We have
$$\int_{-x}^{x} f'(x) \, dx = 0$$
By the fundamental theorem of calculus, we have
$$f(x)-f(-x)=0 \implies f(x) = f(-x)$$
