\delta I(g)$ equal to zero, we get $$\label{ELeq} I_0'(g(x,y)) = - \lambda_1 - 3\lambda_2 h(x,y).$$ Our particular $g(x,y)$ satisfies this equation with $$\label{lambda2} 3 \lambda_2 = \frac{I_0'(2e-\epsilon)-I_0'(\epsilon)}{2(e-\epsilon)^2}.$$

Next we expand $\delta t$ and $\delta I$ to second order in $\delta g$, ignoring $O((\delta g)^3)$ terms. Since $$\delta t = 3\iint h(x,y) \delta g(x,y) dx \, dy + 3 \iiint
g(x,y) \delta g(x,z) \delta g(y,z) dx \, dy \, dz + O((\delta g)^3),$$ and since we are holding $e(g)$ and $t(g)$ fixed, $$\begin{aligned}
 \delta I =&& 
\iint I_0'(g(x,y)) \delta g(x,y)  dx \, dy \cr &&+ \frac{1}{2}\iint
I_0''(g(x,y)) (\delta g(x,y))^2  dx\, dy \cr
=&& \iint (-\lambda_1 -3\lambda_2 h(x,y)) \delta g(x,y)  dx \, dy \cr && + 
\frac{1}{2}\iint
I_0''(g(x,y)) (\delta g(x,y))^2 dx \, dy \cr
=&& -\lambda_1 \delta e - \lambda_2 \delta t + 3 \lambda_2 \iiint
g(x,y) \delta g(x,z) \delta g(y,z) \,dx\, dy\, dz  \cr && + \frac{1}{2}\iint
I_0''(g(x,y)) (\delta g(x,y))^2 \, dx\, dy \cr 
=&& 3 \lambda_2
\iiint g(x,y) \delta g(x,z) \delta g(y,z) dx \,dy \,dz \cr &&+ \frac{1}{4}
\iint I_0''(g(x,y)) \delta g(x,y)^2 dx \,dy + \frac{1}{4}
\iint I_0''(g(x,y)) \delta g(x,y)^2 dx \,dy.\end{aligned}$$ We have split the $\iint I'' \delta g^2$ term into two pieces, as we will be applying different 