Within Matsubara formalism, we often add one chemical potential term to our Lagrangian density: $\mu\phi^\dagger\phi$, claiming that the chemical potential $\mu$ is one Lagrange multiplier. But at this stage, it doesn’t work that the equation of motion $\delta\mathcal{L}/\delta\mu=0$ of the chemical potential imposes the constraint, rather we want to impose: $$\int\phi^\dagger\phi=N.$$ For example we may consider Bogoljubov’s model of dilute Bosonic gas, equipped with $U(1)$ global internal symmetry, as discussed in the book by e.g. Schakel (section 2.2):
\begin{equation} \mathcal{L} = \imath\hbar\phi^\dagger\partial_t\phi - \frac{\hbar^2}{2m}\nabla\phi^\dagger\nabla\phi+\mu\phi^\dagger\phi, \end{equation}
where we impose $\int\phi^\dagger\phi=N$, with $N$ being the total particle number. At this stage I would rather write the following Lagrangian: \begin{equation} \mathcal{L} = \imath\hbar\phi^\dagger\partial_t\phi - \frac{\hbar^2}{2m}\nabla\phi^\dagger\nabla\phi+\mu(\phi^\dagger\phi-\rho), \end{equation} with $\int\rho = N$, but certainly no one does that. I understand that in statistical mechanics, $\mu$ is indeed the Lagrange multiplier when we try to extremize the entropy. But I haven’t heard of functional representation of entropy, my question would be in what sense does the chemical potential act as a Lagrange multiplier in Matsubara formalism?
It seems that, the term to which the so called ‘Lagrange multiplier’ couples is constant of motion, but if we want to be extremely honest and say we want to extremize the action with respect to the ‘Lagrange multipliers’, then the constant of motion is set to zero. In some other part of theoretical physics, one would like to add non-dynamical auxiliary field to ensure the symmetry of a Lagrangian (e.g. BRST formalism), I also try to view them as extra constraints. This also partially constitutes my intuition behind the question.