When graphing rational functions, how do I know which directions the graphs go?

Example, for equation y = 9/x - x, how would you graph this?

Also, why is the horizontal asymptote for f(x)= 2+x / x-7 is 1 instead of 0?

When graphing rational functions, there are a few key steps you can follow to determine the direction of the graph:

1. Identify vertical asymptotes: For a rational function, vertical asymptotes occur at values of x for which the denominator of the function equals zero. To find these values, set the denominator equal to zero and solve for x. In your example, the denominator of the function is x, so there is a vertical asymptote at x = 0.

2. Determine horizontal asymptotes: To find the horizontal asymptotes, you need to look at the degrees of the numerator and denominator. If the degree of the numerator is less than the degree of the denominator, the horizontal asymptote is at y = 0. If the degree of the numerator is equal to the degree of the denominator, the horizontal asymptote is at the ratio of the leading coefficients. If the degree of the numerator is greater than the degree of the denominator, there is no horizontal asymptote.

In your example, the degree of the numerator is 1 and the degree of the denominator is also 1. Therefore, to find the horizontal asymptote, you can take the ratio of the leading coefficients, which is 2/1 = 2. So the horizontal asymptote of the function f(x) = (2+x)/(x-7) is y = 2, not 1.

3. Analyze end behavior: Finally, you can analyze the end behavior of the function to determine the direction of the graph. If the degree of the numerator is greater than the degree of the denominator, the graph will have a slant asymptote. If the degree of the numerator is equal to the degree of the denominator, the graph will approach the horizontal asymptote as x goes to positive or negative infinity. If the degree of the numerator is less than the degree of the denominator, the graph will approach the horizontal asymptote as x goes to either positive or negative infinity (depending on the sign of the leading coefficient of the denominator).

For your specific example, the degree of the numerator is 1 and the degree of the denominator is also 1, which means there is no slant asymptote. Since the horizontal asymptote is at y = 2, the graph of the rational function will approach this horizontal line as x goes to positive or negative infinity.

To graph the function y = 9/x - x, you can start by plotting a few key points. Choose x-values, compute the corresponding y-values using the equation, and then plot those points on the graph. Consider both positive and negative x-values to capture the behavior in different quadrants.

Next, you can plot the vertical asymptote at x = 0, indicating a "hole" in the graph. As x approaches 0 from the positive and negative sides, the function y = 9/x approaches positive and negative infinity, respectively.

Finally, you can draw the graph by connecting the plotted points and showing how the function approaches the vertical asymptote and horizontal asymptotes as x goes to infinity or negative infinity.

Keep in mind that graphing rational functions can be more complex if there are additional factors or terms involved, so it's always useful to plot more points and analyze the behavior to accurately depict the graph.