Pontryagin's principle is used to study the shape of the supersonic part of the nozzle
of a carbon dioxide gas-dynamic laser whose gain is maximal. The exact shape is
obtained for the uncoupled approximation of Anderson's bimodal model. In this case,
if sharp corners are allowed, the ceiling of the supersonic part consists of a slant
rectangular sheet followed by a horizontal one; otherwise, a parabolic cylinder joins
the two sheets smoothly. Pontryagin's principle reduces the optimal control problem
to a multifactor optimal problem of the types treated by S.A. Losev, V.N. Makarov,
N.M. Reddy, and V. Shanmugasundaram