Let $\hat{f}(\xi) = \int_\mathbb{R}f(x)e^{-2\pi ix\xi}dx$ be the Fourier transform of a function $f\in L^1$. I'm trying to prove that if $f$ is a linear combination of characteristic function of compacts interval, then $||\hat{f}||_{L^2}=||f||_{L^2}$. I know this is valid for more functions, but the exercise asks us to calculate that. I've managed to show this is true when $f(x)=\lambda\cdot\chi_{[a,b]}(x)$, where $\chi_{[a,b]}(x)$ is the characteristic/indicator function of the interval $[a,b]$, but I'm having trouble when $f$ is a linear combination with more than one term, since we must square the absolute value of $f$ in the $L^2$ norm. Any tips?
Here's what I got so far:
Suppose $f = \sum_{j=1}^n\lambda_j\chi_{[a_j,b_j]}$. We can assume the intervals are disjoint. Then $||f||_{L^2} = \sqrt{\sum|\lambda_j|^2(b_j-a_j)}$
While, $$ \int|\hat{f}(\xi)|^2d\xi = \sum_{j=1}^n|\lambda_j|^2\int|\mathcal{{F}(\chi_{[a_j,b_j]}})|^2+2\sum_{j\neq i}\lambda_j\lambda_i\int\Re(\mathcal{{F}(\chi_{[a_j,b_j]}})\overline{\mathcal{{F}(\chi_{[a_i,b_i]}}))}$$ Where $\mathcal{F}(f)=\hat{f}.$ But $$\mathcal{{F}(\chi_{[a_j,b_j]}}) = \frac{e^{-2\pi i\xi a_j}-e^{-2\pi i\xi b_j}}{2\pi i\xi}$$
Is the last term zero? I'm having trouble calculating this integral, it doesn't seem to converge even. Notice the exercise becomes trivial if I assume $\langle f,g\rangle = \langle \hat{f},\hat{g}\rangle$, as some users suggested, so I believe I can't use that.
You can always assume that characteristic functions have disjoint support - if not then you just split two characteristic functions, say of sets $A$ and $B$ into sum of three sets $A-B$, $B-A$ and $A\cap B$. Once you have this note that second power of linear combinations is the sum on second powers i.e. products of two characteristics functions is $0$ (since they have disjoint support). Now, just use your prove for a single characteristic function.