I am having difficulty in making the following integration using Fubini's.
$f \in L^1_{loc}(\mathbb{R})$ (Or any suitable space). Suppose $F(x):= \int_a^x f(t) \, dt $ for some $a \in \mathbb{R}$.
Let $c= \pi$. $F$ also be $2 \pi$-periodic. Suppose $-c <a < c$, then
$$ \int_{-c}^c f(x) e^{inx} dx = in \int_{-c}^c F(x) e^{inx} \, dx $$
Some how I have a factor of $-1$ in my calculation which is really bothering me.
$\int _{-c}^c F(x) e^{inx} \, dx = \int_{-c}^a \int_x^a [-f(t)] e^{inx} dt dx + \int_a^c \int_a^x f(t) e^{inx} dt dx $
The first term $$ \int_{-c}^a (-f(t)) \int_{-c}^t e^{inx} dx dt = \frac{1}{in} \int_{-c}^a f(t)(e^{-inc}-e^{int} ) \, dt $$
The second term $$ \int_a^c \int_{t}^c f(t)e^{inx} \, dt dx = \frac{1}{in} \int_a^c f(t) (e^{inc} - e^{int}) \, dt $$
Combining yields, $$ \frac{1}{in} (-\int_{-c}^c f(t) e^{int} \, dt ) + (-F(-c)e^{-inc} )+F(c)e^{inc} = \frac{-1}{in} \int_{-c}^c f(t) e^{int} \, dt$$
where did the factor of $1$ come from?