[edit]: My misunderstanding is more precisely asked here: Density of states and boundary conditions: how the density of states is physical if it depends on box size :it was suggested to open a new post as the details of the question changed too much from this one.
My question is about the motivation of defining density of states. This is a notion I did not use since a while so I might be saying stupid mistakes here.
I take a simple example: density of states of $1D$ gas of electron.
If I want to describe a function defined in $[0,L]$ I can describe use Fourier series, considering the wavevectors $k_n=n \frac{2 \pi}{L}, n \in \mathbb{Z}$. My function will then be $L$-periodic, but as soon as the physics I am interested in is within $[0,L]$, I can encode an "arbitrary" shape playing with the Fourier coefficients.
Now, the energy of a free electron of wavelength $k$ is $E=\frac{\hbar^2 k^2}{2m}$.
The density of states in the $|k|$ space is: $L/(2\pi)*2*2$ where the first $*2$ is here to take in account the two possible spins for the electron, the second one is to take in account the two direction of propagations (as it is the modulus of $|k|$ space)
From this, I can deduce the density of states in the $E$ space:
$$\rho(E)=\frac{d|k|}{dE} \rho(k(E))=\sqrt{\frac{m}{2E}}\frac{1}{\hbar}*L/(2\pi)*4=\sqrt{\frac{m}{2 E \hbar^2}}\frac{2 L}{\pi}$$
Then we use this density of state $\rho(E)$ in order to compute various quantities depending on $E$ by the mean of an integral:
$$\int_0^{+\infty} dE\rho(E) f(E)$$
My questions
When using the density of states to compute quantities, an approximation is being done. Indeed we approximate a sum by an integral. This will be more and more correct the bigger the length $L$ is. But for any fixed length $L$ we are doing a "mistake" by integrating. Is that correct ?
The starting point of all this reasonning is a "mathematical trick". We want to use Fourier series to describe the physics. This comes at the cost of desribing the physics in a finite length space $[0,L]$ but this has the advantage to be easier to handle: we can easily find the density of states that then allow us to go into the continuum. Is that correct as well ?
Can we then say that the notion of density of state is just a mathematical tool that is introduced to go from an easy physical situation (the physics is discrete) to a more complicated scenario (continuum). But someone could come and start by a continuum description right from the beginning. Then, he would never need to use any density of states.