The work is a computer simulation of the control of a flexible robot arm. The dynamic equations for a single-link flexible robot arm have been derived rigorously. This arm has two degrees of freedom in rotation and one in translation so that the workspace is three-dimensional. The payload is simulated by attaching additional mass to the arm at a specified location. The governing equations of the plant and the measurements are nonlinear. The process of control is divided into two stages; coarse control and fine control. Based on the optimal control theory, a linear observer is constructed for fine control. The numerical results are presented here.