Graphing Rational Functions

{{ 'ml-heading-theory' | message }}

A rational function is a function that contains a rational expression. That is, any function that can be written in the form f(x)=p(x)q(x), f(x) = \dfrac{p(x)}{q(x)}, where pp and qq are polynomial functions. For any values of xx where q(x)=0,q(x) = 0, the rational function is undefined. One example of a simple rational function is

f(x)=1x. f(x) = \dfrac{1}{x}.
Concept

Rational Functions and Asymptotes

An asymptote of a function is a line that the function's graph approaches as the distance to the origin approaches infinity. It is very common for rational functions to have at least one asymptote. These can arise when xx extends to the right or left infinitely, and around xx-values making the denominator equal to zero. The rational function f(x)=1x f(x) = \dfrac{1}{x} has two asymptotes, the xx-axis and the yy-axis. The shape of this function's graph is called a hyperbola, which means that it consists of two mirror images with bow-like appearances.

As xx \to \infty and as x-,x \to \text{-} \infty, the function value approaches 0.0. Thus, the xx-axis, y=0,y = 0, is a horizontal asymptote of f.f. Similarly, as x0,x \to 0, the function value approaches either positive or negative infinity. This means that the yy-axis, x=0,x = 0, is a vertical asymptote of f.f.
Concept

Simple Rational Function

Rational functions of the form f(x)=axh+k f(x) = \dfrac{a}{x - h} + k can be called simple rational functions, as their parent function is g(x)=1x. g(x) = \dfrac{1}{x}.

When xx is equal to h,h, the denominator becomes 0.0. Thus, these functions have a vertical asymptote at x=h.x = h. As xx \to \infty and x-,x \to \text{-} \infty, the fraction tends toward 0.0. This gives the horizontal asymptote y=k.y = k.
Method

Graphing Simple Rational Functions

The identifiable asymptotes of simple rational functions can be used to simplify the process of graphing them. As an example, consider the function f(x)=-1x3+2. f(x) = \dfrac{\text{-} 1}{x - 3} + 2.

1

Draw the asymptotes

Comparing the function rule to the general form of a simple rational function makes it possible to identify the asymptotes x=hx = h and y=k.y = k. For f,f, these are x=3x = 3 and y=2.y = 2. These can be drawn in a coordinate plane.


2

Plot points around the vertical asymptote

Plot some points both to the left and the right of the vertical asymptote. For the example, it would be appropriate to use, for instance, the xx-values 1,1, 2,2, 2.5,2.5, 3.5,3.5, 4,4, and 5.5.

xx -1x3+2\dfrac{\text{-} 1}{x - 3} + 2 f(x)f(x)
1{\color{#0000FF}{1}} -113+2\dfrac{\text{-} 1}{{\color{#0000FF}{1}} - 3} + 2 2.52.5
2{\color{#0000FF}{2}} -123+2\dfrac{\text{-} 1}{{\color{#0000FF}{2}} - 3} + 2 33
2.5{\color{#0000FF}{2.5}} -12.53+2\dfrac{\text{-} 1}{{\color{#0000FF}{2.5}} - 3} + 2 44
3.5{\color{#0000FF}{3.5}} -13.53+2\dfrac{\text{-} 1}{{\color{#0000FF}{3.5}} - 3} + 2 00
4{\color{#0000FF}{4}} -143+2\dfrac{\text{-} 1}{{\color{#0000FF}{4}} - 3} + 2 11
5{\color{#0000FF}{5}} -153+2\dfrac{\text{-} 1}{{\color{#0000FF}{5}} - 3} + 2 1.51.5

The points (x,f(x))(x, f(x)) can be added to the coordinate plane to begin to see the behavior of f.f.


3

Draw the graph


The graph can now be drawn by connecting the points with a smooth curve. It must approach both the horizontal and vertical asymptotes.


Rule

Another Form of Rational Functions

Another common form of rational functions is f(x)=ax+bcx+d, f(x) = \dfrac{ax + b}{cx + d}, where p(x)=ax+bp(x) = ax + b and q(x)=cx+dq(x) = cx + d are linear functions with different xx-intercepts. Just like simple rational functions, these are hyperbolas and have horizontal and vertical asymptotes. The horizontal asymptote is the line y=ac. y = \dfrac{a}{c}. That is, the quotient of the leading coefficients of pp and q.q. The vertical asymptote is the line x=-dc, x = \text{-} \dfrac{d}{c},

which is the xx-value that makes the denominator 0.0.
Exercise

Identify the asymptotes of the given rational function. Then, rewrite it in the form, f(x)=axh+kf(x) = \frac{a}{x - h} + k and draw its graph. f(x)=4x+2x+1 f(x) = \dfrac{4x+2}{x + 1}

Solution
The function is currently written in the form f(x)=ax+bcx+d. f(x) = \dfrac{ax + b}{cx + d}. The horizontal asymptote can be identified as the quotient of the leading coefficients. y=ac=41=4 y = \dfrac{a}{c} = \dfrac{4}{1} = 4 The vertical asymptote is located at the xx-value for which the denominator equals 0.0. x=-dc=-11=-1. x = \text{-} \dfrac{d}{c} = \text{-} \dfrac{1}{1} = \text{-} 1. There is more than one viable strategy to rewrite the expression. Two of which are long division and synthetic division. However, here, we'll use inspection. Notice that, if the numerator was 4x+44x + 4 the quotient would be 4.4. Let's manipulate the expression to make that happen.
f(x)=4x+2x+1f(x) = \dfrac{4x + 2}{x + 1}
f(x)=4x+2+22x+1f(x) = \dfrac{4x + 2 + {\color{#0000FF}{2}} - {\color{#0000FF}{2}}}{x + 1}
f(x)=4x+42x+1f(x) = \dfrac{4x + 4 - 2}{x + 1}

The fraction can now be split into two, where one numerator is 4x+44x + 4 and the other is -2.\text{-} 2.

f(x)=4x+42x+1f(x) = \dfrac{4x + 4 - 2}{x + 1}
f(x)=4x+4x+1+-2x+1f(x) = \dfrac{4x + 4}{x + 1} + \dfrac{\text{-} 2}{x + 1}
f(x)=4(x+1)x+1+-2x+1f(x) = \dfrac{4(x + 1)}{x + 1} + \dfrac{\text{-} 2}{x + 1}
f(x)=4+-2x+1f(x) = 4 + \dfrac{\text{-} 2}{x + 1}
f(x)=-2x+1+4f(x) = \dfrac{\text{-} 2}{x + 1} + 4
As a last step in writing the function in the form f(x)=axh+k,f(x)=\frac{a}{x-h}+k, we need to rewrite the denominator. f(x)=-2x+1+4f(x)=-2x(-1)+4 f(x) = \dfrac{\text{-} 2}{x + 1} + 4 \quad \Leftrightarrow \quad f(x) = \dfrac{\text{-} 2}{x - (\text{-} 1)} + 4 We have now written the function in the desired form. The asymptotes y=4y = 4 and x=-1x = \text{-} 1 can be confirmed here as well. To graph this function, we start by drawing the asymptotes in a coordinate plane.

Next, we can make a table to find points around the vertical asymptote.

xx -2x+1+4\dfrac{\text{-} 2}{x + 1} + 4 f(x)f(x)
-3\text{-} 3 -2-3+1+4\dfrac{\text{-} 2}{{\color{#0000FF}{\text{-} 3}} + 1} + 4 55
-2\text{-} 2 -2-2+1+4\dfrac{\text{-} 2}{{\color{#0000FF}{\text{-} 2}} + 1} + 4 66
00 -20+1+4\dfrac{\text{-} 2}{{\color{#0000FF}{0}} + 1} + 4 22
11 -21+1+4\dfrac{\text{-} 2}{{\color{#0000FF}{1}} + 1} + 4 33

Plotting the points gives the graph.

We can connect the points with two curves that tend toward the asymptote as xx and yy extend in both directions.

Show solution Show solution
Exercise

Below, two rational functions are graphed.

Match the graphs with their corresponding function rule. f(x)=4x+1.5-2x+1g(x)=2x11h(x)=2x+11t(x)=4x+1.52x+1\begin{aligned} f(x) &= \dfrac{4x + 1.5}{\text{-} 2x + 1} & g(x) &= \dfrac{2}{x - 1} - 1\\[0.8em] h(x) &= \dfrac{2}{x + 1} - 1 & t(x) &= \dfrac{4x + 1.5}{2x + 1} \end{aligned}

Solution

We match the graphs with their corresponding rule by identifying the asymptotes. Observing the first graph, it looks as though the asymptotes are I: x=1andy=-1.\begin{aligned} \text{I:}\ x = 1 \quad \text{and} \quad y = \text{-} 1. \end{aligned} For the second graph, II: x=-0.5andy=2.\begin{aligned} \text{II:}\ x = \text{-} 0.5 \quad \text{and} \quad y = 2. \end{aligned} Let's now identify the asymptotes of the given rules. For rational functions in the form f(x)=ax+bcx+d,\begin{aligned} f(x) = \dfrac{ax + b}{cx + d}, \end{aligned} the vertical asymptote is x=-dcx = \text{-} \frac d c and the horizontal asymptote is y=ac.y = \frac a c. For the ones written as f(x)=axh+k,\begin{aligned} f(x) = \dfrac{a}{x - h} + k, \end{aligned} their vertical asymptote is x=hx = h and the horizontal asymptote is y=k.y = k.

Function Vertical asymptote Horizontal asymptote
ff x=-1-2=0.5x = \text{-} \dfrac{1}{\text{-} 2} = 0.5 y=4-2=-2y = \dfrac{4}{\text{-} 2} = \text{-} 2
gg x=1x = 1 y=-1y = \text{-} 1
hh x=-1x = \text{-} 1 y=-1y = \text{-} 1
tt x=-12=-0.5x = \text{-} \dfrac{1}{2} = \text{-} 0.5 y=42=2y = \dfrac{4}{2} = 2

The function gg has the same asymptotes as Graph I, and tt has the same asymptotes as Graph II. Thus, the graphs' corresponding function rules are I: g(x)andII: t(x).\begin{aligned} \text{I:}\ g(x) \quad \text{and} \quad \text{II:}\ t(x). \end{aligned}

Show solution Show solution

Exercises

{{ 'mldesktop-placeholder-grade-tab' | message }}
{{ 'mldesktop-placeholder-grade' | message }} {{ article.displayTitle }}!
{{ grade.displayTitle }}
{{ exercise.headTitle }}
{{ 'ml-btn-focusmode-tooltip' | message }} settings_overscan
Test
{{ 'mldesktop-selftest-notests' | message }} {{ article.displayTitle }}!
{{ tests.error }}

{{ 'ml-heading-exercise' | message }} {{ focusmode.exercise.exerciseName }}

keyboard_backspace
{{ section.title }} keyboard_backspace {{ 'ml-btn-previous' | message }} {{ 'ml-btn-previous-exercise' | message }} {{ 'ml-btn-next-exercise' | message }} keyboard_backspace {{ 'ml-btn-next-exercise' | message }}