Prove that $\int_{- \infty}^{\infty} f(x) dx = \int_{- \infty}^{\infty} f(-x) dx.$ (Analysis)

Let $f: \mathbb{R} \to \mathbb{R}$ be a bounded nonnegative function which is $0$ outside some closed interval $[a,b]$. Assume $f$ is Riemann integrable on $[a,b]$. Define $$\int_{- \infty}^{\infty} f(x) \text{ } dx = \int_{a}^{b} f(x) \text{ } dx.$$ Prove that $$\int_{- \infty}^{\infty} f(x) \text{ } dx = \int_{- \infty}^{\infty} f(-x) \text{ } dx.$$

Attempt: Denote $g(x) = f(-x).$ Let $P = \{x_0, \cdots , x_n\}$ be a partition of $[a,b]$ and let $Q = \{y_0 , \cdots , y_n \}$ with $y_k = -x_{n-k}$. We will show $$U(P,f) = U(Q,g).$$ Note that $$\sum_{i=1}^n M_i (x_i-x_{i-1}) = \sum_{i=1}^n N_i(y_i - y_{i-1}),$$ where $N_i = \sup g(z)$ for $z \in [y_{i-1},y_i]$.

I am not sure how to proceed and show the result we want to prove, or if there is another way to do so. Any ideas on how to conclude?

EDIT: $M_i = \sup \{f(t) : t \in [x_{i-1},x_i]\}$ and $m_i = \inf \{f(t) : t \in [x_{i-1},x_i]\}$.

You did not define $M_i$ my guess is that $M_i=\sup f|_{[x_{i-1},x_i]}$. But then\begin{align}\sum_{i=1}^nN_i(y_i-y_{i-1})&=\sum_{i=1}^nN_i(-x_{n-i}+x_{n+1-i})\\&=\sum_{j=1}^nN_{n+1-j}(x_j-x_{j-1})\\&=\sum_{j=1}^nM_j(x_j-x_{j-1})\\&=U(P,f).\end{align}
• I made an edit to the question clarifying the notation, you were correct. Since you showed that $U(P,f) = U(Q,g)$, we can similarly show that $L(P,f) = L(Q,g)$. This concludes the proof, right? Or am I forgetting to show something else? – Dominated Convergence Theorem Mar 2 '18 at 13:58