It is generally taught in calculus classes that it is not always true that the Fourier series expansion is equal to the function being expanded into Fourier series. The series can actually fail to converge entirely, and if it does converge, it could converges to something totally different than the function itself.
Over 15+ years experience in the topic, I have never encountered such a situation so far. I am curious is to see at least one example or two highlighting this interesting fact. Thank you!
Orthonormal Expansion
To properly discuss about Fourier Series, we have to understand orthonormal basis expansion / approximation. Briefly, a point in a vector space can be approximated by linear combination of basis for another space:
$$ \mathbf{w} \approx \tilde{\mathbf{w}} = \sum_{m=1}^{d} w_{m} \mathbf{v}_{m} , \phantom{x} \mathbf{v}_{m}\in\mathbb{V} \phantom{x} \forall \phantom{x}m \in \left\{1,...,d\right\} $$
We can define a criteria to evaluate how well this approximation perform e.g. we define the criteria as $L_{2}$ error:
$$ e= \left\| \mathbf{w} - \tilde{\mathbf{w}}\right\|^{2} = \left\langle \mathbf{w} - \tilde{\mathbf{w}}, \mathbf{w} - \tilde{\mathbf{w}} \right\rangle $$
If the basis are orthonormal, the scalars $w_{i}$ that minimises the aforementioned error is given by the following expression:
$$ w_{m} = \left\langle\mathbf{v}_{m}, \mathbf{w}\right\rangle $$
Worth noting that the approximation $\tilde{\mathbf{w}}$ is the projection of $\mathbf{w}$ to $\mathbb{V}$.
Connecting The Dots
Fourier series expansion is an orthonormal expansion. It approximate a function using some orthonormal basis for sinusoidal function space:
$$ f(t) \approx \tilde{f}(t) = \sum_{m=1}^{d} f_{m}\cdot \frac{1}{\sqrt{T}} e^{j2\pi m \frac{t}{T}} $$
The inner product is defined as the following:
$$ \left\langle f(t),g(t) \right\rangle = \int_{0}^{T} \bar{f} (t)\cdot g(t) \phantom{.}dt $$
The Fourier series coefficient is given by:
$$ f_{i} = \left\langle \frac{1}{\sqrt{T}}e^{j2\pi m \frac{t}{T}}, f(t) \right\rangle = \frac{1}{\sqrt{T}}\int_{0}^{T} e^{-j2\pi m \frac{t}{T}} \cdot f(t) \phantom{.}dt $$
I hope that last part looks familiar :)
Remarks
We have seen that Fourier series is an approximation of a function using sinusoidal function. Most of the time, approximation is not equal to the function being approximated. Some guiding questions:
In many engineering / science program, Fourier transform & Fourier series are taught without solid basics of functional analysis and linear algebra. Therefore, students often fail to see them as what they are: approximation and projection.