In this paper, we propose a method for finding the best piecewise linearization of nonlinear functions. For this aim, we try to obtain the best approximation of a nonlinear function as a piecewise linear function. Our method is based on an optimization problem. The optimal solution of this optimization problem is the best piecewise linear approximation of nonlinear function. Finally, we examine our method to some examples.