Why does the odd part of the function integrate to $0$? When evaluating the integral $$\int^1_{-1}\frac{\cos(x)}{1+e^{1/x}}dx,$$ the author says that the odd part of the function integrates to $0$ over $-1$ to $1$. I have calculated the even part of the function ($\frac{1}{2}\cos(x)$), so the integral is equal to $\sin(1)$.
But why exactly does the odd part integrate to $0$?
 A: If $I:=\int_0^ao(x)dx$ is finite with $o$ odd, $y=-x$ obtains $\int_{-a}^0o(y)dy=\int_0^ao(-x)dx=-\int_0^ao(x)dx=-I$, so $\int_{-a}^ao(x)dx=-I+I=0$.
A: A function $f(x)$ is called odd iff $f(x) = - f(-x)$.
Now if you integrate a symmetric function over an interval $[-a, a]$ you can rewrite it to
$$
\begin{align}
\int_{-a}^a f(x)\, dx &= \int_{-a}^0 f(x) \,dx + \int_0^a f(x) \,dx \\
&\text{reverse the order of integration for the first} \\
&= \int_0^{-a} -f(x) \,dx + \int_0^a f(x) dx \\
&\text{pull the negative sign of $-a$ inside (and in front of every $x$ we find)}\\
&= \int_0^a -f((-1)x) \,(-1)dx + \int_0^a f(x) dx \\
&\text{and make use of $f(x)$ being symmetric} \\
&= -\int_0^a f(x) \,dx + \int_0^a f(x) dx \\
&= 0
\end{align}
$$
A: Replacing $x\mapsto -x$ transforms the integral to the following, such that $2I=2\int_{0}^{1}{\cos x}\mathrm dx$. The odd part of the function evaluates to $0$, because the set of values taken by it from $x=0$ to $x=1$ is the negative of that taken in $x=-1$ to $x=0$, so by the symmetry of the argument, the algebraic sum evaluates to $0$.
$$2I=\int_{-1}^{1}\left(\frac{\cos x}{1+e^{1/x}}+\frac{\cos(x)e^{1/x}}{1+e^{1/x}}\right)\mathrm dx$$
A: Express the integrand as a sum of an even and an odd functions as,
$$\int^1_{-1}\frac{\cos x}{1+e^{1/x}}dx 
= \frac12 \int^1_{-1}\cos x\left(1-\tanh\frac1{2x}  \right)dx = \frac12 \int^1_{-1}\cos xdx = \sin 1$$
