Energy will be conserved as the solution evolves from a given initial condition, but is only imposed as a constraint (in the form of a penalty) on the search for initial conditions when the first component of the residual in (\[eq:r:def\]) is set to $r_1=E-a$. In the present calculation, we use $r_1=\eta(0,0)-a$ instead. In the second example, presented below, we will constrain energy. In either case, projecting onto the space of initial conditions satisfying (\[eq:init:trav\]) can cause $r_1$ to increase, but it will decrease to zero in the course of minimizing $\tilde f$. This projection is essential for the symmetry arguments of §\[sec:obj:fun\] to work.

![\[fig:evol:kdv2\] Time-periodic solutions near the Stokes waves of Figure \[fig:evol:kdv1\]. (left) $h=0.05$, $\eta(0,0) =
  0.0707148$, $T=138.387$, $\tilde f=4.26\times10^{-27}$. (right) $h=0.0503$, $\eta(0,0)=0.0707637$, $T=138.396$, $\tilde f=1.27\times
  10^{-26}$. The background radiation was minimized by hand in the right panel by varying $h$ and $\eta(0,0)$.](figs/evol_kdv2){width="\linewidth"}

![\[fig:pov:kdv2\] Same as Figure \[fig:pov:kdv1\], but showing the time-periodic solutions of Figure \[fig:evol:kdv2\] instead of the Stokes waves of Figure \[fig:evol:kdv1\]. The Stokes waves generate new background radiation with each collision while the time-periodic solutions are synchronized with the background waves to avoid generating additional disturbances. ](figs/pov_kdv2){height="2in"}

We minimize $\tilde f$ subject to the 