# Compute Fourier series coefficients from spectral analysis

I'm looking for a way to compute the Fourier coefficients for a periodic wave, knowing its spectral decomposition (i.e., amplitudes $$A_n$$ for each $$F_n$$ harmonics).

By "Fourier coefficients", I mean the $$\alpha$$ and $$\beta$$ in this formula:

$$f(t) = \sum_{n\ge0} \alpha_n\cos(n\omega t) + \sum_{n>0} \beta_n\sin(n\omega t)$$

I've seen quite a lot of explanations on how to compute spectral analysis knowing the coefficients, but I'm looking for the reverse process. I'm not really an engineer or a physicist though, so my math skills are a bit rusty.

We know that $$A_n ={ \sqrt {\alpha_n ^2+\beta_n ^2}}\,\text{ and }\,\theta_n=-\tan^{-1}\frac{\beta_n} {\alpha_n}$$ therefore $$\alpha_n=A_n\cos(\theta_n) \,\text{ and }\,\beta_n=-A_n\sin(\theta_n)$$ where $$A_n$$ is amplitude & $$\theta_n$$ is phase of the harmonic frequency.
• Thank you for your answer. In your definition of $\theta_n$ you use $a_n$ and $b_n$ but didn't define them, what are those ? – Kiljaeden Zamenhof Oct 30 '19 at 16:39
• He means $\alpha$ and $\beta$, not $a$ and $b$ in the tan. The problem is to find the phase. Spectral intensity gives the $A_n$. More inflormation is required beyond spectral intensity to get the phase. This is huge problem with more than a century of research devoted to it. – mike stone Oct 30 '19 at 19:38