Suppose we have a function $f$ defined over $[a,b]$ to the real numbers, i.e. $f: [a, b] \to \mathbb R.$.
We can approximate this function as Fourier Series.
Suppose $a_n, b_n$ is the Fourier series coefficients,
Then
$$a_n = \frac{2}{b-a} \int_a^bf(x) \cos(nx)$$
$$b_n = \frac{2}{b-a}\int_a^bf(x)\sin(nx) $$
$$f(x) \approx \frac{a_0}{2}+ \sum^\infty_{n=1} a_n\cos(nx) + b_n\sin(nx)$$
My question is, what is the advantage of using the approximate Fourier Series,
rather than the function $f(x)$ itself? When would we use the approximation over the funtion itself?
I think the point is the functions available might be highly irregular, and it is difficult to treat such functions. If we can decompose the function into a series which "converges" globally, then we can substitute the study of the function with its Fourier series.
For many analysis purposes like PDE, this helps to translate properties of the original function into properties of the series in a way we can reasonably control. If the original function is unknown (for example only known the boundary values and some decay conditions), then this information translation process can be extremely helpful because it makes a hard problem much easier. You can also decompose the original function into linear combination of other orthogonal sets, but the results may not be as nice.