Optimized explicit finite-difference schemes for spatial derivatives