The formulae for the Fourier series coefficients contain f(x), e.g.
$$ b_n = \frac 1\pi \int_{-\pi}^\pi f(x)sin(nx)dx $$
But if I don't know what f(x) is, e.g.
or
then how can I get the coefficients?
The formulae for the Fourier series coefficients contain f(x), e.g.
$$ b_n = \frac 1\pi \int_{-\pi}^\pi f(x)sin(nx)dx $$
But if I don't know what f(x) is, e.g.
or
then how can I get the coefficients?
If the periodic time can be determined by inspection, you can proceed numerically and use Fourier Series analysis. In this case, Fourier Series is probably better than Fourier Transform, since: the FT is not particularly accurate in the calculation of phase angles; FS is potentially faster than FT (or FFT); it's preferable to use all available a-priori knowledge of a signal, rather than discard it; the FS can be derived quite simply using, e.g., Excel, whereas calculating the FT is not as straightforward, so you'd probably need access to a package.
If the waveform is not periodic, or if the periodic time is not easily discernible (eg the fundamental frequency may not be present in the signal), then the FT is indicated.
If you have a symbolic expression, apply the formula for the transform.
If you have an unknown waveform, you can use an FFT algorithm. Just capture it with a digital scope, then throw it into Excel