Possible variational principles for excitation of an electromagnetic field in
a wave guide are discussed. Our emphasis is not on the calculation of the
modal shapes, which is common in previous art, but rather on the calculation
of modal amplitude evolution, which are important in electron devices such
as free electron lasers and gyrotrons. The variational formalism allows us
to show that the electromagnetic field can be defined by a single complex
function.