In this paper the disturbance attenuation and rejection problem is investigated for a class of nonlinear systems. The unknown external disturbances are supposed to be generated by an exogenous system. By using the successive approximation theory of differential equations, the two-point boundary value (TPBV) problems, which are derived from the original optimal tracking control (OTC) theory, is transformed into solving a sequence of linear TPBV problems. The solution sequence of the linear TPBV problems uniformly converges to the solution of the original OTC problem. The obtained OTC law consists of linear analytic functions of state vectors and a compensation term, which is the limit of a sequence of adjoint vectors. The compensation term can be obtained from a recursion formula of adjoint vectors. By using a finite term of the adjoint vectors sequence, we obtained an approximate optimal tracking control law. Reference input observer and disturbance observer are constructed in order to solve the physically realizable problem. Simulation examples show the effectiveness of the presented approach.