# 2.3.2: Graphs of Rational Functions when the Degrees are Equal

$$\newcommand{\vecs}{\overset { \rightharpoonup} {\mathbf{#1}} }$$ $$\newcommand{\vecd}{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$$$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

## Graphing when the Degrees of the Numerator and Denominator are the Same

Darnell says that the function $$\ y=\frac{2 x^{4}+5}{x^{4}-16}$$ has two vertical asymptotes, Barb says it has only one, and Aruna says it has four. Which one of them is correct?

## Graphing Rational Functions

We have already graphed functions in the form $$\ y=\frac{1}{x-h}+k$$, where x=h and y=k are the asymptotes. In this concept, we will extend graphing rational functions when both the denominator and numerator are linear or both quadratic. So, there will be no “k” term in this concept. Let’s go through some practice problems to determine any patterns in graphing this type of rational function.

Let's graph $$\ f(x)=\frac{2 x-1}{x+4}$$ and find asymptotes, x and y intercepts, domain and range.

To find the vertical asymptote, it is the same as before, the value that makes the denominator zero. In this case, x=−4. Also the same is how to find the x and y intercepts.

y-intercept (when x=0): $$\ y=\frac{2 \cdot 0-1}{0+4}=-\frac{1}{4}$$

x-intercept (when y=0):

$$\ \begin{array}{l} 0=\frac{2 x-1}{x+4} \\ 0=2 x-1 \\ 1=2 x \\ \frac{1}{2}=x \end{array}$$

When solving for the x-intercept, to get the denominator out, we multiplied both sides by x+4. But, when we multiply anything by 0, it remains 0. Therefore, to find the x-intercept, we only need to set the numerator equal to zero and solve for x.

The last thing to find is the horizontal asymptote. We know that the function is positive, so the branches will be in the first and third quadrants. Let’s make a table.

x y
−13 3
−7 5
−5 11
−3 −7
−1 −1
0 −0.25
2 0.5
5 1
14 1.5

It looks like the horizontal asymptote is y=2 because both branches seem to approach 2 as x gets larger, both positive and negative. If we plug in x=86,y=1.9 and when x=−94,y=2.1. As you can see, even when x is very large, the function is still approaching 2.

Looking back at the original equation, $$\ f(x)=\frac{2 x-1}{x+4}$$, extract the leading coefficients and leave them numerator over denominator, $$\ \frac{2}{1}$$. This is the horizontal asymptote. We can generalize this pattern for all rational functions. When the degree of the numerator is equal to the degree of the denominator, the horizontal asymptote is the ratio of the leading coefficients.

Finally, the domain is all real numbers; x≠−4 and the range is all real numbers; y≠2.

Now, let's graph $$\ y=\frac{3 x^{2}+10}{x^{2}-1}$$ and find the asymptotes, intercepts, domain, and range.

From the previous problem above, we can conclude that the horizontal asymptote is at y=3. Because the denominator is squared, there will be two vertical asymptotes because x2−1 factors to (x−1)(x+1). Therefore, the vertical asymptotes are x=1 and x=−1. As for the intercepts, there are no x-intercepts because there is no real solution for 3x2+10=0.

Solving for the y-intercept, we have $$\ y=\frac{10}{-1}=-10$$.

At this point, put the equation in your calculator to see the general shape. To graph this function using a TI-83 or 84, enter the function into Y= like this: $$\ \frac{\left(3 x^{\wedge} 2+10\right)}{\left(x^{\wedge} 2-1\right)}$$ and press GRAPH. You will need to expand the window to include the bottom portion of the graph. The final graph is below.

The domain is still all real numbers except the vertical asymptotes. For this function, that would be all real numbers; x≠−1,x≠1.

The range is a bit harder to find. Notice the gap in the range from the horizontal asymptote and the y-intercept. Therefore, the range is (−∞,−10]∪(3,∞).

The notation above is one way to write a range of numbers called interval notation and was already introduced. The ∪ symbol means “union.” Notice that −∞ and ∞ are not included in the range.

In general, rational functions with quadratics in the denominator are split into six regions and have branches in three of them, like the problem above. However, there are cases when there are no zeros or vertical asymptotes and those look very different. You should always graph the function in a graphing calculator after you find the critical values and make as accurate a sketch as you can.

Finally, let's graph $$\ f(x)=\frac{x^{2}-8 x+12}{x^{2}-x-6}$$ and find the intercepts, asymptotes, domain and range.

Let’s factor the numerator and denominator to find the intercepts and vertical asymptotes.

$$\ f(x)=\frac{x^{2}-8 x+12}{x^{2}+x-6}=\frac{(x-6)(x-2)}{(x+3)(x-2)}$$

Notice that the numerator and denominator both have a factor of (x−2). When this happens, a hole is created because x=2 is both a zero and an asymptote. Therefore, x=2 is a hole and neither a zero nor an asymptote.

There is a vertical asymptote at x=−3 and a zero at x=6. The horizontal asymptote is at y=1. The graph of $$\ f(x)=\frac{x^{2}-8 x+12}{x^{2}-x-6}$$ will look like the graph of $$\ f(x)=\frac{x-6}{x+3}$$, but with a hole at x=2. A hole is not part of the domain. And, the output value that corresponds with the hole is not part of the range. In this problem, $$\ f(2)=\frac{2-6}{2+3}=\frac{-4}{6}=-\frac{2}{3}$$ is not part of the range. If you were to graph this function on your graphing calculator, the calculator would not show there is a hole.

The domain is x∈ℝ; x≠2, −3 and the range is y∈ℝ; y≠1, $$\ -\frac{2}{3}$$.

## Examples

###### Example 1

Earlier, you were asked to determine which student is correct.

Solution

The vertical asymptote(s) occur(s) when the denominator of the function equals zero. For the function $$\ y=\frac{2 x^{4}+5}{x^{4}-16}$$, the denominator equals zero when x4−16=0.

$$\ \begin{array}{r} x^{4}-16=0 \\ x^{4}=16 \end{array}$$

$$\ x=2 \text{ or } x=−2$$

Therefore, there are two vertical asymptotes and Darnell is correct.

Graph the following functions. Find all intercepts, asymptotes, the domain and range. Double-check your answers with a graphing calculator.

###### Example 2

$$\ y=\frac{4 x-5}{2 x+7}$$

Solution

y-intercept: $$\ y=\frac{-5}{7}=-\frac{5}{7}$$, x-intercept: $$\ 0=4 x-5 \rightarrow x=\frac{5}{4}$$, horizontal asymptote: $$\ y=\frac{4}{2}=2$$, vertical asymptote: $$\ 2 x+7=0 \rightarrow x=-\frac{7}{2}$$, domain: $$\ \mathbb{R} ; x \neq-\frac{7}{2}$$, range: \mathbb{R}: y \neq 2

###### Example 3

$$\ f(x)=\frac{x^{2}-9}{x^{2}+1}$$

Solution

y-intercept: $$\ y=\frac{-9}{1}=-9$$, x-intercepts: 0=x2−9→x=±3, horizontal asymptote: y=1, vertical asymptote: none, domain: ℝ, range: ℝ; y≠1

Special Note: When there are no vertical asymptotes and the numerator and denominator are both quadratics, this is the general shape. It could also be reflected over the horizontal asymptote.

###### Example 4

$$\ y=\frac{2 x^{2}+7 x+3}{x^{2}+3 x+2}$$

Solution

y-intercept: $$\ \left(0, \frac{3}{2}\right)$$, x-intercepts: $$\ (−3,0)$$ and $$\ \left(-\frac{1}{2}, 0\right)$$, horizontal asymptote: y=2, vertical asymptotes: x=−2, x=−1.

domain: ℝ; x≠−1, −2

range: y∈(−∞, 2.1] ∪ [12, ∞)

###### Example 5

$$\ y=\frac{x^{2}-4}{2 x^{2}-5 x+2}$$

Solution

horizontal asymptote: $$\ y=\frac{1}{2}$$, y-intercept: (0,−2)

vertical asymptotes: $$\ x=\frac{1}{2}$$, x-intercept: (−2,0)

hole: $$\ x=2, f(2)=\frac{4}{3}$$

domain: $$\ \mathbb{R} ; x \neq \frac{1}{2}, 2$$

range: $$\ \mathbb{R} ; y \neq \frac{1}{2}, \frac{4}{3}$$

## Review

1. What are the vertical and horizontal asymptotes for $$\ y=\frac{x-2}{x+7}$$?
2. What is the domain of this function?
3. What is the range of this function?
4. Are there any x-intercepts? If so, what are they?
5. Is there a y-intercept? If so, what is it?

Graph the following rational functions. Write down the equations of the asymptotes, the domain and range, x and y intercepts and identify any holes.

1. $$\ y=\frac{x+3}{x-5}$$
2. $$\ y=\frac{5 x+2}{x-4}$$
3. $$\ y=\frac{3-x}{2 x+10}$$
4. $$\ y=\frac{x^{2}+5 x+6}{x^{2}-8 x+12}$$
5. $$\ y=\frac{x^{2}+4}{2 x^{2}+x-3}$$
6. $$\ y=\frac{2 x^{2}-x-10}{3 x^{2}+10 x+8}$$
7. $$\ y=\frac{x^{2}-4}{x^{2}+3 x-10}$$
8. $$\ y=\frac{6 x^{2}-7 x-3}{4 x^{2}-1}$$
9. $$\ y=\frac{x^{3}-8}{x^{3}+x^{2}-4 x-4}$$
10. Graph $$\ y=\frac{1}{x-2}+3$$ and $$\ y=\frac{3 x-5}{x-2}$$ on the same set of axes. Compare the two. What do you notice? Explain your results.

## Answers for Review Problems

To see the Review answers, open this PDF file and look for section 9.5.

## Vocabulary

Term Definition
Degree The degree of a polynomial is the largest exponent of the polynomial.
Hole A hole exists on the graph of a rational function at any input value that causes both the numerator and denominator of the function to be equal to zero.
Interval Notation Interval notation is the notation [a,b), where a function is defined between a and b. Use ( or ) to indicate that the end value is not included and [ or ] to indicate that the end value is included. Never use [ or ] with infinity or negative infinity.

This page titled 2.3.2: Graphs of Rational Functions when the Degrees are Equal is shared under a CK-12 license and was authored, remixed, and/or curated by CK-12 Foundation via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.