End behavior of rational functions