what is the difference between local and global maximum?
The global maximum is the largest value attained by a function in its domain, on the other hand, local maximum is a largest value attained by a function in some neighborhood. One important point to note is that, a local maximum value of a function can be smaller than a local minimum value.