The optimal control of nonlinear systems has been studied for years by many researchers. However, the application of optimal control problem to nonlinear non-affine systems needs more attention. In this paper we propose an optimal control design technique for a class of nonlinear and control non-affine equations. The dynamic equations of a flexible shaft supported by a pair of active magnetic bearings (AMBs) are used as the nonlinear control non-affine equations. Mathematical model for the flexible beam is chosen to be the well known Timoshenko beam model, which takes rotary inertia and shear deformations into account, and it is assumed that the shaft is supported by two frictionless bearings at the ends. The effective control of such systems is extremely important for very high angular velocity shafts which are a feature of many modern machines. The control must be able to cope with unbalanced masses and hence be very robust. We shall approach the problem by discretising the Timoshenko beam model and using standard difference formulae to develop a finite-dimensional model of the system. Then we use a recently developed technique for controlling nonlinear systems by reducing the problem to a sequence of linear time-varying (LTV) systems. An optimal control designed for each approximating linear, time-varying system and recent results show that this method will converge uniformly on compact time intervals to the optimal solution. approximation technique, nonlinear optimal control, timoshenko beam, active magnetic bearings Citation:Tombul G S, Banks S P. Nonlinear optimal control of rotating flexible shaft in active magnetic bearings.