You may have correctly realized that each hill has two points where , but perhaps thought that each valley also had two such points. All of the points in each valley are below the horizontal axis, so the function has only negative values there.