Density of states in 3D quantum mechanics For a particle that is confined in a volume $V$ the following relation is often used:
$\Delta^3 n = \frac V {(2 \pi \hbar)^3}\Delta^3P$
Since the particle is confined in $V$ it it doesn't have a determined momentum $P$, so it looks weird that there are $\Delta^3 n$ eigenstates of the momentum in $\Delta^3P$.
For this reason my question is: what is the meaning of the above formula?
One idea that I have is: there are $\Delta^3n$ stationary states with average momentum in $\Delta^3P$ even thought no one of them has a determined momentum.
 A: I will assume that the confining volume is a cubic box of side $L$ and volume $V=L^3$. Your question has two answers, according to the boundary conditions that you impose on the box in which you confine the particle: you can impose (1) periodic boundary conditions, or you can impose (2) the wave function to be zero on the faces of the box.

(1) PERIODIC BOUNDARY CONDITIONS (PBC)
Imposing periodic boundary conditions means to require the wave function and its derivatives to assume the same values in corresponding points of opposite faces of the box. This means that the box is seen as one cell of an infinite periodic structure.
In this conditions, you can have states of definite momentum, that is the wave functions of the type
$$ \Psi ( \vec{r}) = \frac{1}{\sqrt{V}}e^{i\vec{k} \cdot \vec{r}} $$
where the wave vector $\vec{k}$ has to be chosen so to respect the cubic periodicity, i.e. its components have to be integer multiples of $2\pi/L$:
$$ \vec{k} = \frac{2\pi}{L} \vec{n} $$
where $\vec{n} $ is a vector made of three integers.
For every $\vec{n}$, you have a state of momentum $\hbar \vec{k} = \frac{2\pi \hbar}{L} \vec{n}$. Then the possible momenta form a cubic grid of side $\frac{2\pi \hbar}{L}$, yielding a density of states of $\left( \frac{L}{2\pi \hbar} \right)^3 = \frac{V}{\left(2\pi \hbar\right)^3} $.

(2) ZERO WAVE FUNCTION ON THE FACES OF THE BOX
This corresponds to the more intuitive setting of a confining box with empty space outside of it, where the particle is not allowed to go.
In this situation the particle indeed cannot have a definite momentum. However, it can have a definite momentum modulus, without a definite direction. In a 1D space of length $L$, you can build such a wavefunction as
$$\psi(x) = \frac{1}{\sqrt{L}} \cdot \frac{e^{ik_x x} - e^{-ik_x x}}{i\sqrt{2}} = \sqrt{\frac{2}{L}} \sin ( k_x x) \tag{A}$$
It is clear that this 1D state has definite momentum modulus $\left| \hbar k_x \right|$, but the "motion" happens at the same time towards the right and the left. In order to respect the boundary conditions, we need $\psi(0)=\psi(L)=0$, and this happens if and only if $k_x$ is an integer multiple of $\pi/L$. This time we consider only positive integers, because switching from $k_x$ to $-k_x$ would only switch the overall sign of the wave function, which is irrelevant.
Coming back to our 3D box, the wave function has to be of the form
$$\Psi(\vec{r}) = \psi(x) \phi(y) \chi(z)$$
where $\psi$, $\phi$ and $\chi$ are 1D wave functions of the form $(\mathrm{A})$, with wave vectors $k_x$, $k_y$ and $k_z$, which are (positive) integer multiples of $\pi/L$.
For every triple $(k_x, k_y, k_z)$ we have a different state, but beware: the triple does not represent the components of a definite wave vector, it only identifies the moduluses of those components.
Then the states in the space of "momenta" $\hbar(k_x, k_y, k_z)$ form a cubic grid of side $\frac{\pi\hbar}{L}$. Therefore the density this time is $\left(\frac{L}{\pi\hbar}\right)^3=\frac{V}{(\pi\hbar)^3}$, that is eight times the density of the PBC case. However, this time we are considering only momenta with positive components, as we said.
If we are interested in integrating over the space of the states a property that depends on the modulus of the momentum, we can artificially extend the space of integration also to momenta that have negative as well as positive components. This makes the space of integration eight times bigger. Then, to have the same final result, we have to divide the density of states by eight, and obtain the "corrected" density $\frac{V}{(2\pi\hbar)^3}$, the same density as in the PBC case.
This extension of the space of the states is artificial, but it is sometimes useful for calculations.
