How do you find the local extrema of a function?