Graphing Rational Functions
How to graph a rational function? A step by step tutorial. The properties such as domain, vertical and horizontal asymptotes of a rational function are also investigated. Free graph paper is available.

Definition of a Rational FunctionA rational function f has the form
f(x) = \dfrac{g(x)}{h(x)}
The domain of f is the set of all real numbers except the values of x that make the denominator h (x) equal to zero. In what follows, we assume that g (x) and h (x) have no common factors. Vertical AsymptotesLet
f(x) = \dfrac{2}{x3}
The domain of f is the set of all real numbers except 3, since 3 makes the denominator equal to zero and the division by zero is not allowed in mathematics. However we can try to find out how does the graph of f behave close to 3. let us evaluate function f at values of x close to 3 such that x < 3. The values are shown in the table below:
Let us now evaluate f at values of x close to 3 such that x > 3.
The graph of f is shown below. 1) As x approaches 3 from the left or by values smaller than 3, f (x) decreases without bound. 2) As x approaches 3 from the right or by values larger than 3, f (x) increases without bound. We say that the line x = 3, broken line, is the vertical asymptote for the graph of f. In general, the line x = a is a vertical asymptote for the graph of f if f (x) either increases or decreases without bound as x approaches a from the right or from the left. This is symbolically written as: Horizontal AsymptotesLet
f(x) = \dfrac{2x + 1}{x}
In general, the line y = b is a horizontal asymptote for the graph of f if f (x) approaches a constant b as x increases or decreases without bound. How to find the horizontal asymptote? Let f be a rational function defined as follows Theorem m is the degree of the polynomial in the numerator and n is the degree of the polynomial in the numerator. case 1: For m < n , the horizontal asymptote is the line y = 0. case 2: For m = n , the horizontal asymptote is the line y = a_{m} / b_{n}case 3: For m > n , there is no horizontal asymptote. Example 1Let f be a rational function defined by
f(x) = \dfrac{x + 1}{x1}
a  Find the domain of f. b  Find the x and y intercepts of the graph of f. c  Find the vertical and horizontal asymptotes for the graph of f if there are any. d  Use your answers to parts a, b and c above to sketch the graph of function f. Answer to Example 1 a  The domain of f is the set of all real numbers except x = 1, since this value of x makes the denominator zero. b  The x intercept is found by solving f (x) = 0 or x+1 = 0. The x intercept is at the point (1 , 0). The y intercept is at the point (0 , f(0)) = (0 , 1). c  The vertical asymptote is given by the zero of the denominator x = 1. The degree of the numerator is 1 and the degree of the denominator is 1. They are equal and according to the theorem above, the horizontal asymptote is the line y = 1 / 1 = 1. e  Although parts a, b and c give some important information about the graph of f, we still need to construct a sign table for function f in order to be able to sketch with ease. The sign of f (x) changes at the zeros of the numerator and denominator. To find the sign table, we proceed as in solving rational inequalities. The zeros of the numerator and denominator which are 1 and 1 divides the real number line into 3 intervals: ( ∞ , 1) , (1 , 1) and (1 , + ∞). We select a test value within each interval and find the sign of f (x). In ( ∞ , 1) , select 2 and find f (2) = ( 2 + 1) / (2  1) = 1 / 3 > 0. In (1 , 1) , select 0 and find f(0) = 1 < 0. In (1 , + ∞) , select 2 and find f (2) = ( 2 + 1) / (2  1) = 3 > 0. Let us put all the information about f in a table.
To sketch the graph of f, we start by sketching the x and y intercepts and the vertical and horizontal asymptotes in broken lines. See sketch below. We now start sketching the graph of f starting from the left. In the interval (∞ , 1) f (x) is positive hence the graph is above the x axis. Starting from left, we graph f taking into account the fact that y = 1 is a horizontal asymptote: The graph of f is close to this line on the left. See graph below.
Between 1 and 1 f (x) is negative, hence the graph of f is below the x axis. (0 , 1) is a y intercept and x =1 is a vertical asymptote: as x approaches 1 from left f (x) deceases without bound because f (x) < 0 in( 1 , 1). See graph below. For x > 1, f (x) > 0 hence the graph is above the x axis. As x approaches 1 from the right, the graph of f increases without bound ( f(x) >0 ). Also as x increases, the graph of f approaches y = 1 the horizontal asymptote. See graph below. We now put all "pieces" of the graph of f together to obtain the graph of f. Let f be a rational function defined by
f(x) = \dfrac{x + 2}{x+4}
a  Find the domain of f. b  Find the x and y intercepts of the graph of f. c  Find the vertical and horizontal asymptotes for the graph of f if there are any. d  Use your answers to parts a, b and c above to sketch the graph of function f. More References and Links on Graphing and Rational FunctionsGraphing Functions Rational Functions  Applet Solver to Analyze and Graph a Rational Function Home Page 