In the present paper the optimization problem of dynamically loaded simply supported beams is handled. The concept of a rigid-plastic body is used. The shape of the beam is sought, for which the integral residual deflection for a given time-instant and load is minimal. Two numerical methods for solving the problem are proposed. The numerical results are compared with those obtained by Lepik (1982).