# The formula for the average number of fermions $\langle N \rangle$

In the context of Fermi gases (or fluids in general), one would typically in the grand-canonical formalism use the formula

$\langle N \rangle = -\frac{\partial \psi}{\partial \mu}$, where $\psi$ is the grand/Landau potential (generally interpreted as an integral weighted by the density of states).

However I came across some solutions to problems (the problems all were oriented around a gas enclosed in a container of some geometry) where $\langle N \rangle$ was calculated using a formula along the lines

$\langle N \rangle=k\int\int f(x,p) d^np d^nx$, where $k$ is some constant and $f$ is some function both of which I haven't yet been able to figure out the general expression for from the examples I have ($k$ is most likely $\frac{2}{4\pi^2\hbar^2}$). The limits oftenly are related to the Fermi energy $\varepsilon_F$.

Due to my limited information about this approach I am not having much luck finding information about it. Could someone kindly provide me an explanation or point me into the direction of one?

EDIT: Here's an example question to showcase how it is used

A fully degenerate Fermi gas (spin $\frac12$) is characterised by $\langle N \rangle$ non-interacting electrons confined to a plane within a circle of radius $R$ centered at the origin. The energy of a single particle is $\varepsilon=\frac{p^2}{2m}+\alpha r$ where $\alpha>0$ and $r$ is the radial distance from the origin. Determine $\varepsilon_F$ for $\alpha R << \varepsilon_F$.

The allowed domain of integration is obtained by imposing $\varepsilon \leq \varepsilon_F$

$$\langle N \rangle = \frac{2}{4\pi^2\hbar^2}\int\int_D d^2pd^2q=\frac{2}{\hbar^2}\int_0^R\int_0^{^{\sqrt{2m(\varepsilon_F-\alpha r)}}} (p r) dpdr=...$$