Non-derivative algorithm for optimization and control of steady-state systems