Gibbs’ Lemma in Thermodynamics Ignoring all physical constants, I wish to show that the Maxwell-Boltzmann distribution $e^{-|v|^2}dv$ minimizes the entropy functional $\int_{\mathbb{R}^3} f\log f\,dv$ among all probability distribution with the same mass, momentum, and energy, i.e. the 0'th, 1st and 2nd moments are fixed. This is what I have: since for any $\varphi\in C^\infty_c(\mathbb{R}^3)$ with vanishing 0,1,2 order moments, we have $0=\frac{d}{d\epsilon}\bigg|_{\epsilon = 0}\int (f+\epsilon\varphi)\log(f+\epsilon\varphi)dv = \int\varphi(\log f +1)dv$. How do I now get the Euler-lagrange equation for $f$? This sounds like a job for lagrange multipliers but it's not clear to me how to implement it.
 A: I'm not sure if this is what you're looking for, but here is how to impose the Lagrange multipliers. We wish to maximize
$$
S=-\int dv \ f(v) \ln f(v)
$$
I'm using $dv=dv_x dv_ydv_z$, and $v=\vec{v}$. Implementing the constraints as Lagrange multipliers $\lambda$ we have
$$
S=-\int dv \ f(v) \ln f(v) + \lambda_0 \left( \int dv \ f(v)-m_0 \right) + \lambda_{1,j} \left( \int dv \ v_j f(v)-m_{1,j} \right)+ \lambda_2 \left( \int dv \ v^2f(v)-m_2 \right)
$$
The $m_n$ are the nth moments the you have specified. We must have $m_0=1$. I've had to label the velocity components with $j$ since this isn't the speed distribution. I think the Maxwell distribution is defined as entropy maximum with fixed energy only, so we shouldn't really have the constraint $\lambda_1$. Leaving it in for now, take the derivative w.r.t. $f$
$$
\partial_fS=-\int dv \ \ln f(v) - \int dv \ +\lambda_0 \int dv + \lambda_{1,j}\int dv \ v_j+\lambda_2\int dv \ v^2=0 \\
\partial_fS=-\int dv \ \left( \ln f +1-\lambda_0-\lambda_{1,j}v_j-\lambda_2v^2\right)=0
$$
Setting the integrand equal to $0$, and solving for $f$
$$
f(v)=\exp(-1+\lambda_0+\lambda_{1,j}v_j+\lambda_2v^2)=A \exp(\lambda_{1,j}v_j+\lambda_2v^2)
$$
I've introduced the constant $A$ for simplicity. Now one solves for the $\lambda$ (and $A$) by imposing the constraints:
$$
1=\int dv \ A \exp(\lambda_{1,j}v_j+\lambda_2v^2) \\
m_{1,k} =\int dv \ v_k A \exp(\lambda_{1,j}v_j+\lambda_2v^2) \\
m_2 = \int dv \ v^2 A \exp(\lambda_{1,j}v_j+\lambda_2v^2)
$$
In principle, you do the integrals, get simultaneous equations for the $\lambda$, and solve for them. Here, I think symmetry alone dictates that $\lambda_{1,j}=0$ and thus $m_{1,k}=0$. Assuming this is so, we have
$$
1=\int dv \ A \exp(\lambda_2v^2) \\
m_2 = \int dv \ v^2 A \exp(\lambda_2v^2)
$$
The first integral is a product of Gaussians. The second may be evaluated in spherical $v$ co-ordinates. In any case, that there are solutions for $A$ and $\lambda_2$ justifies the functional form you seek. I find
$$
A=\left( \frac{3}{2 \pi m_2} \right)^{3/2} \\
\lambda_2 = -\frac{3}{2m_2}
$$
