How can one expand the function $f_1(x) = x$ on $(−π, π)$in terms of the functions $\cos nx, n = 0, 1, 2, ...$ and $\sin nx, n = 1, 2, ...,$ in a way so that $$f_2(x) = a_0 + \sum_{n=1}^{\infty}(a_n \cos nx + b_n \sin nx)$$
is the expansion of the $f_1$, how is that?
I have asked a question related to the same issue but didn't get full answer, I have been told that this is a standard application of Fourier series, $f_1$ and $f_2$ are equivalent in the sense that $f_1(x)=f_2(x)$ for all $x∈(−π,π)$. For any $x$ in this interval, the Fourier series will converge to $f(x)$, but I didn't get any rigorous proof with elaborate explanation.
So, plz provide rigorous proof of $f_1=f_2$ with elaborate explanation as I am new to the subject. Thanks You.
I have attached the excerpt below -

There are a lot of Pointwise and other types of Fourier series convergence. I bring, for example, one of the first sufficient condition proved by Dirichlet:
If function with period $2\pi$ is piecewise monotonic in segment $[-\pi, \pi]$ and has only finite points of discontinuity, then its Fourier series converged to $f(x_0)$ for each $x_0$ point of continuity, and to $\frac{f(x_0+0)+f(x_0-0)}{2}$ in points of discontinuity.
So, we can consider $f(x)=x$ function on $[-\pi, \pi]$ and use this theorem.
For odd function $\int\limits_{-\pi}^{\pi}f(x)dx=0$ and so $\int\limits_{-\pi}^{\pi}f(x) \cos nxdx=a_n \pi=0$, so in such cases we have $$f(x) \sim \sum_{n=1}^{\infty}b_n \sin nx$$