The paper concerns a strength optimization of continuous beams with variable cross-section. The continuous beams are subjected to a dead weight and a useful load, the six (seven) combinations of loads were analyzed. Optimal design problems in structural mechanics can by mathematically formulated as optimal control tasks. To solve the above formulated optimization problems, the minimum principle was applied. The paper is an introductory and survey paper of the treatment of realistically modelled optimal control problems from application in the structural mechanics. Especially those problems are considered, which include different types of constraints. The optimization problem is reduced to the solution of multipoint boundary value problems (MPBVP) composed of differential equations. Dimension of MPBVP is usually a large number, what produces numerical difficulties. Optimal control theory does not give much information about the control structure. The correctness of the assumed control structure can be checked after obtaining the solution of the boundary problem.