Here, we consider a class of optimal control problems (OCP) containing nonlinear dynamical systems with the quadratic functionals of state variables. The major part of our technique is based upon linear combination property of intervals (LCPI) such that using this property the nonlinear dynamical system is converted to a linear one. And, the major difference of our approach from a large number of direct approaches for solving OCPs is that we nally solve a convex (linear or quadratic) programming problem which its optimal solution is global. We also extend our technique to a class of optimal control problems governed by differential inclusions (DI). The proposed idea is illustrated by numerical examples. Moreover, a comparison is made with a discretization method.