Manipulating integrals in Fourier transform calculation I am trying to convert the spectral density $S_{XX}$ of an arbitrary time-dependent signal $X(t)$ into the Fourier domain. In particular, I have the following definitions for Fourier/Inverse Fourier transform:
$$
\mathcal{F}\{X(t)\}\equiv X[\omega]=\int_{-\infty}^{\infty}dt\,e^{i\omega t}X(t) \hspace{1cm}(1) \\
X(t)=\frac{1}{2\pi}\int_{-\infty}^{\infty}d\omega\,e^{-i\omega t}X[\omega] \hspace{1cm}(2)
$$
with the Dirac delta function defined as
$$
\delta(t-t^{\prime})=\frac{1}{2\pi}\int_{-\infty}^{\infty}d\omega\,e^{-i\omega(t-t^{\prime})}. \hspace{1cm}(3)
$$
Now, the spectral density in frequency domain $S_{XX}[\omega]$ is defined as
$$
S_{XX}[\omega] = \int_{-\infty}^{\infty}dt\,e^{i\omega t} C(t) \hspace{1cm}(4)
$$
where
$$
C(t) = \big<X(t)X(0)\big>=\int_{-\infty}^{\infty}d\tau\,X(t+\tau)X(\tau). \hspace{1cm}(5)
$$
By substituting Eq. (2) and Eq. (5) into Eq. (4), it can be shown that $S_{XX}[\omega]$ can be written as
$$
S_{XX}[\omega] = \frac{1}{2\pi}\int_{-\infty}^{\infty}d\omega^{\prime}\big<X[\omega]X[\omega^{\prime}]\big>. \hspace{1cm}(6)
$$
This is the step that I'm not sure of. I understand that some convolution theorem can be applied on Eq. (5) to obtain $X[\omega]$ and $X[\omega^{\prime}]$ but I'm overwhelmed by the extra integrals coming from Eq. (5) and Eq. (4). My hunch is that the delta function from Eq. (3) is used to kill off one of the integrals but I'm not getting it.
Edit: I attempted a solution. Here's what I have so far:
$$
S_{XX}[\omega] = \int_{-\infty}^{\infty}dt\,e^{i\omega t}\int_{-\infty}^{\infty}d\tau\,X(t+\tau)X(\tau). \hspace{1cm}(7)
$$
Applying Eq. (2) onto Eq. (7), I have that
$$
\frac{1}{4\pi^{2}}\int_{-\infty}^{\infty}dt\,e^{i\omega t}\int_{-\infty}^{\infty}d\tau\left(\int_{-\infty}^{\infty}d\omega^{\prime}e^{-i\omega^{\prime}(t+\tau)}X[\omega^{\prime}]\right)\left(\int_{-\infty}^{\infty}d\omega\,e^{-i\omega\tau}X[\omega]\right) \hspace{1cm}(8)
$$
where $X[\omega^{\prime}]$ denotes the FT of $X(t+\tau)$ and $X[\omega]$ denotes the FT of $X(\tau)$. I now rearrange Eq. (8) and move $e^{-i\omega^{\prime}t}$ out of the $d\tau$ integral (since it's not dependent on $\tau$) and combine it with the $e^{i\omega t}$ exponent
$$
\frac{1}{4\pi^{2}}\int_{-\infty}^{\infty}dt\,e^{i(\omega-\omega^{\prime})t}\int_{-\infty}^{\infty}d\tau\left(\int_{-\infty}^{\infty}d\omega^{\prime}e^{-i\omega^{\prime}\tau}X[\omega^{\prime}]\right)\left(\int_{-\infty}^{\infty}d\omega\,e^{-i\omega\tau}X[\omega]\right) \hspace{1cm}(9) \\
=\frac{1}{4\pi^{2}}\delta(\omega - \omega^{\prime})\int_{-\infty}^{\infty}d\tau\left(\int_{-\infty}^{\infty}d\omega^{\prime}e^{-i\omega^{\prime}\tau}X[\omega^{\prime}]\right)\left(\int_{-\infty}^{\infty}d\omega\,e^{-i\omega\tau}X[\omega]\right) \hspace{1cm}(10)
$$
while reducing it to the delta function, given as
$$
\delta(\omega\pm\omega^{\prime}) = \int_{-\infty}^{\infty}dt\,e^{i(\omega\pm\omega^{\prime})t} \hspace{1cm}(11).
$$
Now the delta function can be used to kill one of the remaining integrals, but killing off the $\omega^{\prime}$ integral leaves either two $X[\omega]$ or $X[\omega^{\prime}]$ terms, which resembles nothing like Eq. (6). Moreover, the prefactors are incorrect (not $1/4\pi^{2}$, but $1/2\pi$). Where should I take things from here?
 A: Let's start with your expression (8). It is correct, despite the fact that you named the integration variable the same as the fixed one $w$. I'll denote it as $w''$
$$
\frac{1}{4\pi^2}\int dt e^{iwt} \int d\tau \left(\int dw' e^{-iw'(t+\tau)}X[w'] \right)  \left(\int dw'' e^{-iw''\tau}X[w''] \right).
$$
At (9) you did a weird thing pulling the exponent, which depends on $w'$ outside of the integration. Let's write all the integrals in one place to avoid confusion.
$$
\frac{1}{4\pi^2}\int dt \int d\tau \int dw' \int dw'' e^{iwt}  e^{-iw'(t+\tau)} e^{-iw''\tau} X[w']  X[w''] =\\
=\frac{1}{4\pi^2}\int dt \int d\tau \int dw' \int dw'' e^{i(w-w')t}  e^{-i(w'+w'')\tau} X[w']  X[w'']
$$
At the step of getting $\delta$-function you forgot to cancel $2\pi$. Note that here we have two deltas, thus no $2\pi$ factors and no integration over time.
$$
\int dw' \int dw'' \delta(w-w')\delta(w'+w'') X[w']  X[w'']=X[w]X[-w]
$$
If $X(t)$ is a real function, then $X[w]=(X[-w])^*$ and so what we have is
$$
S[w]=|X[w]|^2
$$
