In this paper, an efficient Legendre pseudospectral approach for the accurate solution of nonlinear quasi bang-bang optimal control problems (OCPs) is investigated. In this approach, after linearizing the dynamical system, control and state functions are considered as piecewise constant and piecewise continuous polynomials, respectively, and the switching points are also taken as decision variables. Furthermore, for simplicity in discretization, a integral formulation of the dynamical equations is considered. Thereby, the problem is converted into a mathematical programming problem which can be solved by well-developed parameter optimization algorithms. Through a numerical implementation we show the efficiency of the proposed method via com...