One-dimension free electon gas: density of states I have calculated the density of states (in fact i reason with the k modulus and not with the energy) for free electrons in 1D box of size L.
I said that the number of states between $k$ and $k+dk$ is:
$$ 2*\frac{dk}{\left(\frac{2 \pi}{L}\right)} *2$$
But I have of "*2" too much.
The first *2 is for the spin, and the second i putted is because in 1D I can have the $\overrightarrow{k}$ and $-\overrightarrow{k}$ states that occurs (it also occurs in 2D and in 3D but they are automatically taken because we integrate on the angles).
But it seems that my second *2 mustn't be here.
Where is my mistake when I say that I have to take the two possible directions for $\overrightarrow{k}$  ?
[edit] In fact the problem is partially solved. In the course that I read they don't put the *2 but it is not a problem. Indeed, we want to compute the total number of electron at $T=0$, so we can either put the *2 on $g(k)$ and integrate from $0$ to $k_f$ or not put it and integrate from $-k_f$ to $k_f$ (what they did). Finally I would have found the same number of electrons than they.
BUT I still have a question because your remark confused me, I will re explain why I want to put the *2.
When we do computation in a 3D system, we have $g(k,\theta, \phi)=\frac{d^3k}{(\frac{2 \pi}{L})^3}$ that represent the number of state around $\overrightarrow{k}=(k,\theta,\phi)$ in the infinitesimal box of size $dk*k\sin(\theta)d\phi*k*d\theta$. As all the directions are allowed for propagation (it is isotropic), we integrate on $k$ and $\theta$, so we end with $g(k)=4 \pi \frac{k^2 dk}{(\frac{2 \pi}{L})^3}$. And we multiply it by 2 to take in account the spin.
So here in 3D we understand that at a given $k$ we are at a given $|| \overrightarrow{k}||$ (just because by definition $k=|| \overrightarrow{k}||$). And we have taken in account all the possible directions by integrating on $d\theta$ and $d\phi$.
In 1D the case is different because when we talk about $dk$ we are at a given $k$ that is not a norm of a 1D vector ($k$ can be negative here). So we have to manually take in account the fact that the wave can also propagate along the opposite axis by putting a *2.
This is the reason why I wanted to put the *2 (which seems to finally be coherent with my course).
[edit 2] I also made the link with the remark of mflynn which doesn't really say that what I said is wrong in the comment below his message.
 A: This actually depends on your boundary conditions in the problem! It's important to say what boundary conditions you are putting on the wavefunctions. The two most common choices for a free electron gas are Dirichlet boundary conditions or periodic boundary conditions. Dirichlet boundary conditions constrain the wavefunctions to vanish at the edges of the box, i.e.,
$\psi(x=0) = \psi(x=L) = 0$
You have probably seen these before when solving the infinite square well, and by saying that your electrons are confined to a box, that's the exact same problem as this. The other possibility is periodic boundary conditions, where the point $x$ is associated with the point $x+L$, i.e.,
$\psi(x) = \psi(x+L)$
Now these may seem like an innocuous distinction, but you can convince yourself that the resulting quantization in these two cases is slightly different: in particular, you probably know that the energy eigenfunctions of the infinite square well with Dirichlet boundary conditions are
$\psi_{n}(x) = \sqrt{\frac{2}{L}}\sin\left(\frac{n\pi x}{L}\right)$
But notice that $\psi_{-n}(x) = -\psi_{n}(x)$. As you know, wavefunctions related by simple multiplication are not linearly independent. In particular, they represent the exact same state in Hilbert space. So if you use Dirichlet boundary conditions for the free electron gas problem, you should NOT count the k and -k states separately! That would kill your factor of 2. I hope that helps, but if you aren't using these boundary conditions, the problem could be elsewhere.
