Mathematical tools from physics: the optimization problem