Skip to main content
K12 LibreTexts

2.3.2: Graphs of Rational Functions when the Degrees are Equal

  • Page ID
    14197
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\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]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\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]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    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.

    f-d_a3a64de3d69d107bea525849daf9f8571934d7518b918e48e6e42c8f+IMAGE_TINY+IMAGE_TINY.png

    [Figure1]

    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.

    f-d_d971b1875a193d41e84190d20d87d865802e2896e6b186da10eedc5f+IMAGE_TINY+IMAGE_TINY.png

    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.

    f-d_d2131266aa3d6f540d0b531695e7b92168afe3b862bb893d2b7815dc+IMAGE_TINY+IMAGE_TINY.png[Figure2]

    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

    f-d_709305460ecef2f7024217751eb82d71e653a333a0281158022f14be+IMAGE_TINY+IMAGE_TINY.png
    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.

    f-d_7a39e212c7f9a249cc62c26e76f7bc2718d17ddabbc5b5bf402b158f+IMAGE_TINY+IMAGE_TINY.png[Figure3]
    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, ∞)

    f-d_3a3f27a503a826f6267cc5d23bcb374f4e1ca6ee69ab0f884d3af41e+IMAGE_TINY+IMAGE_TINY.png
    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}\)

    f-d_777b9ee852bc2a2dbfa8943cfa0206cced94c7e0a86fc24823bc1e7e+IMAGE_TINY+IMAGE_TINY.png

    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.

    CK-12 Foundation
    LICENSED UNDER
    CK-12 Foundation is licensed under CK-12 Curriculum Materials License