TITLE: How do I understand "odd parity"
QUESTION [6 upvotes]: In my Calc 2 course, we're in the u-sub section at the moment. One of my homework problems was $$\int_{-\pi/2}^{\pi/2}{(\cfrac{x^6\sin(3x)}{1+x^{10}})dx}$$
I realized substitution nor integration by parts will work. It turns out the answer is 0 because

If $f(x)$ is an odd function and is continuous on the interval [-a, a], then $\int_{-a}^af(x)dx=0$

Can somebody explain the logic behind this; especially why $f$ has to be odd? Is there a simple illustration showing why I should trust the theory?

REPLY [6 votes]: $\int_a^b f(x)\,dx$ is the algebraic sum of the areas (positive and negative) of the function under the x-axis, from a to b.
In case of $\int_{-a}^a f(x)\,dx$, if $f(x)$ is an odd function, $f(x)=-f(-x)$.
So if for positive $x$, whatever area $A_+=\int_0^a f(x)\,dx$, the area for negative $x$: $A_-=\int_{-a}^0f(x)\,dx$ will be equal to negative of $A_1$.
i.e. $A_+=-A_-$
If you want to see a more mathematical approach to this, substitute $x$ as $-x$ in $A_-$
$$A_-=\int_0^af(x)\,d(-x)$$
$$A_-=-\int_0^af(x)\,dx=-A_+$$
From here, $A_-+A_+=0$
$$\int_{-a}^0f(x)\,dx+\int_0^af(x)\,dx=0$$
$$\int_{-a}^af(x)\,dx=0$$
If you want to see a graphical way to see this,
 
Here it is clear how the algebraic sum of the areas is $0$.
Here you can play around with the graph to understand...Also try changing the function in it to another odd function (Desmos link)
NOTE: If you try to change the function in the linked graph, make sure to change it in every formula (including the inequalities)