The Extended Ritz Method for Functional Optimization: Overview and Applications to Single-Person and Team Optimal Decision Problems