# Fluctuations

Number fluctuations of the occupation probability〈nk〉of a single mode k in an ideal Bose and Fermi gas in the grand canonical ensemble. Used in Exercise Sheet 11 of Statistical Physics by Manfred Salmhofer (2016), available at https://janosh.dev/physics/statistical-physics.

Edit and compile if you like:

% Number fluctuations of the occupation probability〈nk〉of a single mode k in an ideal Bose and Fermi gas in the grand canonical ensemble.
% Used in Exercise Sheet 11 of Statistical Physics by Manfred Salmhofer (2016), available at https://janosh.dev/physics/statistical-physics.

\documentclass{standalone}

\usepackage{pgfplots, mathtools}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel = $T$,
ylabel = $\Delta n_k^+$,
smooth,thick,
axis lines = center,
every tick/.style = thick]

\def\beta{1/x}
\def\ek{1}
\def\mu{0}
\def\bosefluc{1/(2*sinh(\beta/2 * (\ek - \mu)))^2}

\end{axis}
\end{tikzpicture}

\begin{tikzpicture}
\begin{axis}[
xlabel = $T$,
ylabel = $\Delta n_k^-$,
smooth,thick,
ymax = 0.28,
axis lines = center,
every tick/.style = thick,
yticklabel style = /pgf/number format/fixed]

\def\beta{1/x}
\def\ek{1}
\def\mu{0}
\def\fermfluc{1/(2 + 2*cosh(\beta * (\ek - \mu)))}