Finding The Maximum Of A Function