[![derrzet](https://i.stack.imgur.com/CKQRKm.png)](https://i.stack.imgur.com/CKQRKm.png)
[![derrzet](https://i.stack.imgur.com/hlVDLm.png)](https://i.stack.imgur.com/hlVDLm.png)

Hi,

I'd like to understand the context in between an oscillogramm and the resulting FFT. My example is a full-wave rectifier and I am try to calculate some harmonics.

Because the function is symmetric I only need to calculate the an-values:
$$
A\_n = a\_n = \frac{2}{\pi}\int\_0^{2\pi} \! f(t) \* cos(nt) \, \mathrm{d}t \\
a\_n = \frac{2}{\pi}\int\_0^{2\pi} \! |sin(t)| \* cos(nt) \, \mathrm{d}t
$$
dividing up for integrating
$$
a\_n = \frac{2}{\pi} \left( \int\_0^{\pi} \! sin(t) \* cos(nt) \, \mathrm{d}t + \int\_{\pi}^{2\pi} \! (-sin(t)) \* cos(nt) \, \mathrm{d}t \right) \\
$$
result of the integral
$$
a\_n = \frac{2}{\pi} \left( -\frac{cos(\pi n) + 1}{n^2 - 1} - \frac{cos(2\pi n) + cos(\pi n)}{n^2 - 1} \right)
$$
My question is whether my way was right up to here and how I have to transfer this into the fft?