y<\frac{1}{2} < x \cr \epsilon &\hbox{otherwise,} \end{cases}$$ minimizes the rate function to second order in perturbation theory among graphons with $e(g)=e$ and $t(g)=e^3-(e-\epsilon)^3$. For pointwise small variations $\delta g$ of $g$, the second variation in $I(g)$ is bounded from below by $\frac{1}{2}\iint \limits_{[0,1]^2}(\delta g(x,y))^2 \, dx \, dy$.

We first consider the first variation in $I(g)$ for general graphons and derive the Euler-Lagrange equations. It is easy to check that our specific $g$ satisfies these equations. We then consider the second variation in $I(g)$. Note that the function $I_0$ satisfies $$I_0'(u) = \frac{1}{2} [\ln(u) - \ln(1-u)], \qquad I_0''(u) = \frac{1}{2}
\left [ \frac{1}{u} + \frac{1}{1-u}\right ]\ge 2.$$

To find the Euler-Lagrange equations with the constraints that $(e(g), t(g))$ are equal to fixed values $(e_0,t_0)$, we use Lagrange multipliers and vary the function $I(g) + \lambda_1 (e(g)-e_0) + \lambda_2 (t(g)-t_0)$. To first order, the variation with respect to $g$ is $$\begin{aligned}
 \delta I(g) &=& \int_0^1\!\!\! \int_0^1 I_0'(g(x,y)) \delta g(x,y) \, dx \, dy
+ \lambda_1 \int_0^1\!\!\!\int_0^1 \delta g(x,y) \, dx \, dy \\
&& + 3 \lambda_2\int_0^1\!\!\!\int_0^1
h(x,y) \delta g(x,y) \, dx \, dy,\end{aligned}$$ where we have introduced the auxiliary function $$h(x,y) = \int_0^1 \! g(x,z) g(y,z) \, dz.$$ Setting $ 