The definition of Fourier series states that
It decomposes any periodic function or periodic signal into the weighted sum of a (possibly infinite) set of simple oscillating functions, namely sines and cosines (or, equivalently, complex exponentials)
I was a little confused as to how then, non-periodic functions like $f(x) = e^{\frac{-ax}{L}}$ defined over an interval $[0,L]$ can have a Fourier expansion ? We know that $$f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty}a_n\cos(nx) + \sum_{n=1}^{\infty}b_n\sin(nx)$$
Note $\rightarrow$ $a,L$ are constants $>0$
What I fail to understand is, how is this possible for a non-periodic function like an exponential ? Somewhere on another question in MSE, I learned that The Fourier series is described for the periodic extension of a non-periodic function, which failed to clarify my doubts.
The motivation to ask this question comes from my attempts to solve
Two fluids flowing perpendicular in thermal contact with a Wall [Help to mathematically model] and
Evaluating Coefficients for a Fourier Series when Exponential terms are present [Approach needed]