The optimized pentadiagonal compact finite difference schemes were presented in this paper.Through Fourier analysis,the optimization object was converted to find the minimum of a nonlinear multi-variable function with multi-constraint.The advanced sequential quadratic programming(SQP) method was employed to find the minimum.In order to obtain high accuracy and resolution,the following strategies were applied:(1) the minimum is computed directly from integral errors of the scaled wavenumbers;(2) absolute error criterion is used for evaluating the deviation between effective and exact wavenumbers,and the waves with different wavelengths have the same error limit under this criterion;(3) the wavenumber domain for optimization is identical with the well-resolved domain.The asymptotical stability of the schemes is satisfied by adjusting the Taylor accuracy and error limits,and proved through the theoretical analysis.The increased performances of the optimized schemes are demonstrated through application to benchmark problems.