An optimization problem of linear elastic statically indeterminate beams is discussed. The cross-section of the beam is variable and determined for the equal stress criterion. The problem is solved with the aid of Castiglianos second theorem. Some optimization conditions are deduced. A few illustrating examples are given.