TITLE: Proving Plancherel's theorem using Cauchy integral formula
QUESTION [6 upvotes]: Plancherel's theorem says that
$f(x) = \frac{1}{2\pi} \int^\infty_{-\infty} F(k) e^{ikx} dk$
where
$F(k) = \int^\infty_{-\infty} f(x)e^{-ikx}dx$.
I'm wondering if we can prove this using Cauchy's integral formula somehow like this.
$f(x) = \frac{1}{2\pi} \int^\infty_{-\infty} \int^\infty_{-\infty} f(x')e^{-ikx'} dx' e^{ikx} dk$
$= \frac{1}{2\pi} \int^\infty_{-\infty} \int^\infty_{-\infty} e^{ik(x-x')} dk f(x') dx'$
$= \lim_{k_0\rightarrow\infty} \frac{1}{2\pi} \int^\infty_{-\infty} \frac{1}{i(x-x')} (e^{ik_0(x-x')}-e^{-ik_0(x-x')}) f(x') dx'$
$= \lim_{k_0\rightarrow\infty} -f(x)+f(x)$
$=0$
where I used Cauchy's integral formula in the next to last equality. I did contour integral over a upper half-circle and assumed f(x) goes to 0 at large x. However I got 0 instead of $f(x)$ at the last equality. I believe there are some problems in my understanding of complex analysis, so please let me know them!

REPLY [4 votes]: Observe that
$$\begin{align}
 \frac{1}{2\pi} \int\limits^\infty_{-\infty} \int\limits^\infty_{-\infty} \textstyle f\left(x'\right)\,\exp\left({-\text{i}kx'}\right)\, \text{d}x'\, \exp({\text{i}kx})\, \text{d}k
&=\lim_{k_0\rightarrow\infty}\, \frac{1}{2\pi}\, \int\limits^{+\infty}_{-\infty} \textstyle\frac{\exp\big({+\text{i}k_0\left(x-x'\right)}\big)-\exp\big({-\text{i}k_0\left(x-x'\right)}\big)}{\text{i}(x-x')} \,f\left(x'\right)\, \text{d}x'
\\
&=\lim_{k_0\rightarrow\infty}\,\frac{1}{2\pi\text{i}}\,\int\limits^{+\infty}_{-\infty}\textstyle \,\frac{\exp\big({\text{i}k_0\left(x'-x\right)}\big)}{x'-x} \,\big(f\left(x'\right)+f\left(2x-x'\right)\big) \,\text{d}x'\,.
\end{align}$$
Furthermore, your contour goes about the pole at $x$ half a turn.  Hence, we have that
$$\lim_{k_0\rightarrow\infty}\,\frac{1}{2\pi\text{i}}\,\int\limits^{+\infty}_{-\infty} \,\frac{\exp\big({\text{i}k_0\left(x'-x\right)}\big)\big)}{x'-x}\, \big(f\left(x'\right)+f\left(2x-x'\right)\big)\, \text{d}x'=\frac{1}{2}\big(f(x)+f(x)\big)=f(x)\,.$$