Derivation of the Mexican wave as Mean field equilibrium of an ergodic control problem I'm dealing with a Mean Field system introduced by Gueant, Lasry, Lions in their "Mean Field Games and Applications" which admits as solution the so-called Mexican wave. Without going into the details of the derivation (I don't know which one of you has read this work), they introduce the following ergodic control problem
\begin{equation}
\inf_{z(t,x)}  \liminf_{T \to +\infty}  \int_0^T \left( \left[ \frac{1}{\epsilon^2} \int_\mathbb{R}  \bigl( z(t,x) - z(t,x-y) \bigr)^2 \frac{1}{\epsilon} g \left( \frac{y}{\epsilon} \right)  dy \right] + F \bigl( z(t,x) \bigr) + \frac{\dot{z}(t,x)^2}{2} \right) dt
\end{equation}
where for any $t>0$ and for any $x \in [0,L]$, $z(t,x) \in [0,1]$ denotes the position at time $t$ of any individual which is sitting into the stadium at the position $x$ ($z=0$ means that the individual is sitting, $z=1$ that is standing). Moreover, $g$ is a Gaussian kernel, and the term in square brackets models, roughly speaking, the taste of mimicry of each individual. Finally, $F$ is a given function (is the cost payed if one decides to stay neither sitting nor standing) and the quadratic term is, intuitively, the cost due to the effort of standing up or sitting.
Is said that the previous ergodic control problem can be transformed, at least formally, in a differential way. More precisely the follwing relation is deduced
\begin{equation}
\left[ \frac{2}{\epsilon^2} \int_\mathbb{R}  \bigl( z(t,x) - z(t,x-y) \bigr)^2 \frac{1}{\epsilon} g \left( \frac{y}{\epsilon} \right)  dy \right] + F' \bigl( z(t,x) \bigr) =  \partial_{tt}^2 z(t,x)
\end{equation}
and finally it is said that letting $\epsilon \to +\infty$ the previous one becomes
\begin{equation}
\frac{\partial^2 z}{\partial t^2} (t,x) - \frac{\partial^2 z}{\partial x^2} (t,x) =  F' \bigl( z(t,x) \bigr)
\end{equation}
in the sense of distributions. Now, I am unable to explain me anyone of the two derivations. Could someone help me understand something more? I would be very grateful. 
 A: The first one seems to be the Euler Lagrange equation.
The second one is obtained formally as follow:
$$ \frac{2}{\epsilon^2} \int_\mathbb{R}  \bigl( z(t,x) - z(t,x-y) \bigr)^2 \frac{1}{\epsilon} g \left( \frac{y}{\epsilon} \right)  dy =
\frac{2}{\epsilon^2} \text{Var } z(t,x+\epsilon N) + O(\epsilon)
$$
where $N$ is distributed according to a standard normal law.
But $$
z(t,x+\epsilon N) \sim z(t,x) +  \epsilon N\partial_x z(t,x)
+ \frac 12 \epsilon^2 N^2\partial^2_{xx} z(t,x)
$$
so, as $EN = 0$ and $EN^2 = 1$, $$
\text{Var }z(t,x+\epsilon N) = \frac 12 \epsilon^2 \partial^2_{xx} z(t,x)
$$
giving the result.
A: Sorry to join late to this conversation, I just saw it. I'm afraid you have a typo in your question that can lead to further conffusion. Lions said it could be formally transformed in a differential way to
$$
-\frac{2}{\epsilon^2}\int \left(z(t,x)-z(t,x-y)\right)\frac{1}{\epsilon}g\left(\frac{y}{\epsilon}\right)dy+F'\left(z(t,x)\right)=-\partial^2_{tt}z(t,x)
$$
Note the absence of the squared sign. I've going a lot through this question and applying the Euler-Lagrange equation obviously can't give the same term squared. 
Now applying the Euler-Lagrange equation (or starting with variational calculus if you have problems with the $z(t,x-y)$ term) gives the first equation correctly.
For the second equation a derivation similar to the one stated by mookid gives you the answer. First note that
$$
\int (z(t,x)-z(t,x-y))\frac{1}{\epsilon}g\left(\frac{y}{\epsilon}\right)dy=\mathbb{E}\left\{ z(t,x)-z(t,x-\epsilon \mathcal{N}) \right\}
$$
We can expand the whole term in parenthesis with Taylor series, leaving
$$
\mathbb{E}\left\{ \epsilon \mathcal{N} \partial_x z(t,x) - \frac{1}{2}\epsilon^2 \mathcal{N}^2 \partial_{xx}^2 z(t,x) \right\}=-\frac{1}{2} \epsilon^2 \partial_{xx}^2 z(t,x)
$$
So the whole term with the integral is equal to $\partial^2_{xx} z(t,x)$ and the equation reduces to
$$
\partial^2_{tt}z(t,x)+\partial^2_{xx}z(t,x)=-F'(z(t,x)) 
$$
Cheers
P.S. This is the essay by Lions http://mfglabs.com/wp-content/uploads/2012/12/paris-princeton.pdf
