How does the first derivative test work?