This article is aimed to propose a simple yet efficient unified numerical strategy for solving both linear and non-linear optimal control problems. To do so, the general form of quadratic performance index function and nonlinear state equations are considered first. Then, the idea of variational differential quadrature method is used to convert the integral/differential equations to the equivalent algebraic form. Since time is the only independent variable is this research, the finite difference method with an equally-spaced discretization scheme would be a more appropriate technique rather than the differential quadrature approach. So, the implemented numerical solution is called now as the variational finite difference method. The method of Lagrange multipliers is then utilized for minimization purpose and, as a result, the final set of nonlinear algebraic equations are obtained. Finally, the quadratic and triadic forms of non-linearity are considered and an explicit formulation is represented for the residual and Jacobian of the Newton-based iterative solution procedure. To demonstrate the accuracy and efficiency of the proposed approach in the quadratic optimal control area, several benchmark problems involving linear time-invariant, linear time-variant and nonlinear examples are successfully solved and the results are confirmed with those existed in the literature.