Graphing Rational Functions

The material on this page is incomplete. Please help contribute and expand this article.

A rational function is a subset of functions that relate one variable to another. Specifically, rational functions deal with ratios, comparing one thing to another. In the case of rational functions, we are comparing a variable to another variable that is a part of a ratio. These functions due to their nature have certain discontinuities, and they are useful especially for studying inverse relationships, such as gravitational pull and distance.

In this tutorial, we will define rational functions and learn how to graph them as well as distinguish certain features and how they came about.


Mathematically, a rational function is a certain function that compares one variable to a ratio in which a different variable is contained in the denominator. These rules must be kept in mind:

  • Can be written as a polynomial over polynomial (like a fraction)
  • Variables do not have fractional or imaginary exponents
  • A variable must at least be in the denominator of a ratio
  • Variables cannot be exponents themselves
  • Variables cannot exist within absolute value delimiters
  • Variables cannot be applied to a trigonometric function

The following are examples of a rational function:

\begin{align} y = {1 \over x} \\ y = {x^2+3x-2 \over x+1} \\ y = {2x \over 3x-1}+2 \\ y = 3x^{-1}-2x^{-2} \\ \end{align}

The following are not examples of a rational function because they do not obey the restrictions above:

\begin{align} y = x+2 \\ y = x^{1.3}-x^{2+3i} \\ y = {3^x+2 \over 2-x} \\ y = {\sin(x) \over |x+1|-3x^2} \\ \end{align}


Rational functions can be written in many different ways, but there are only a couple of standard forms, ones that look "pretty" mathematically speaking.

Standard Form:

\begin{align} f(x) = {p(x) \over q(x)} \end{align}

where p(x) and q(x) are both polynomials either written in standard or factored form. This form simply states that a rational function the ratio of two polynomials. It is in this form that we will receive the most information from a rational function. Note that this form doesn't include a rational expression over a rational expression, since that can be simplified to a polynomial over polynomial form anyway (given a few restrictions).

Quotient Form:

\begin{align} f(x) = a_0x^n+a_1x^{n-1}+...+a_{n-1}x+a_n+{p_0x^{m_1}+p_1x^{m_1-1}+...+p_{m_1-1}x+p_{m_1} \over q_0x^{m_2}+q_1x^{m_2-1}+...+q_{m_2-1}x+q_{m_2}} \end{align}

where m1<m2. Do not be intimidated by this form. In simple terms, it is the standard form of a polynomial function with a polynomial over polynomial tagged on the end in which the polynomial of the denominator is of greater degree than that of the numerator. This is the typical result in completing polynomial division.


In terms of degrees, there primarily exists three types of rational functions determined by the degree of the numerator in relation to the degree of the denominator, in standard form1. Concisely, the three scenarios are as follows:

  • The numerator's degree could be larger than the denominator's degree (called top-heavy)
  • The denominator's degree could be larger than the numerator's degree (called bottom-heavy)
  • The numerator's degree and denominator's degree are equal (called even)

Each scenario has a different sort of behavior, so it is important that these scenarios are tracked in order to get an idea of the general shape of the graphed function.

The following are examples of the three scenarios:

\begin{align} x^3-2x^2+6x+1 \over x+1 \end{align}
\begin{align} x+2 \over 2x-1 \end{align}
\begin{align} 3 \over (x+1)(x-2) \end{align}

Defining Features

Rational Function Features
Image Unavailable
The function is outlined in a dark gray. The x-intercepts are the red circles. The y-intercept is the purple circle. The extrema are the blue X's. The derivative is the green function. The end behaviors are shown with red arrows. The imaginary roots cannot be pictured on the coordinate plane, so they are not present. The function asymptote is shown as the red oblique dashed line. Both types of discontinuities are also shown: a vertical asymptote shown vertically and dashed, and a hole at x=5.

There are a few defining features that all rational functions have in common that are extremely useful to note when graphing. These things since they are common for all rational functions are used as the base for graphing the function in an easy and quick fashion. It also will ensure an accurate rendering of the graph.

These things are:

  • x-intercept: where the graph crosses or touches the x-axis
  • y-intercept: where the graph crosses the y-axis
  • End Behavior: what the function does at the negative end and positive end graphically and mathematically
  • Extrema: the local minimums and maximums of the graph (tops of hills, bottoms of valleys)
  • Derivative: a secondary function to describe the slope of the polynomial at various parts of the curve
  • Imaginary Roots: roots that do not exist on the real coordinate plane
  • Function Asymptote: a function that the graph attempts to imitate in the domain's negative and positive extremes
  • Discontinuities: disruptions in the graph where a particular domain yields no defined value. These take two forms:
    • Vertical Asymptotes: vertical lines that the graph attempts to imitate in the range's negative and positive extremes
    • Holes: single point that would normally be on the graph, though its x causes an undefined value for the y, and therefore isn't included in the final rendering

To graph a rational function, all of the above must be considered. We will take you through this systematically so that the functions can be graphed to their fullest.

Graphing the Rational Function

To graph a rational function, it is best to find all of the defining features above. To do this, both forms of the rational function will be useful, though we will mostly start with the standard form. With all the data retrieve, you can easily "connect the dots" and get an accurate sketch of the graph. This article will detail how to find each of these defining features, in optimal order, and show how they help.


While this is not a defining feature of the graph itself, restrictions of rational functions are so important that they must be considered first. A restriction is a particular x-value that cannot be used since it will yield an undefined y-value. For example, consider the simple function below:

\begin{align} f(x) = {1 \over x-1} \end{align}

We know that for fractions, when a 0 appears as the denominator, the result of the ratio is an undefined value. The fraction $\frac{1}{0}$ is considered undefined since dividing by 0 is impossible. Therefore, when we consider restrictions, we must ask ourselves for what x-value does the ratio return undefined, or more simply, when does the denominator become 0?

By setting our denominator equal to 0, we can pinpoint the exact x-values for which the ratio will be undefined. For our above equation, x cannot be 1. Therefore, we would write to the side "x≠1", for safe keeping and reference. These restrictions will help identify future discontinuities.

This step must be done before altering the original equation into any other form! Otherwise, certain restrictions may become lost.

A couple of notes on restrictions:

  • A Restriction occurs when an x-value yields an undefined y-value
  • A ratio may have more than one restriction
  • Sometimes, no restrictions are present


After noting all restrictions, you may simplify the expression into either quotient of standard form2. While simplifying, you may come across the following scenario:

\begin{align} f(x) = {(x+2)(x-3) \over (x+2)(x-5)} \end{align}

Notice how the numerator and denominator have (x+2) in common. Because of this, the two factors cancel (effectively become 1) and can be eliminated, thus yielding the below:

\begin{align} f(x) = {(x-3) \over (x-5)} \end{align}

The two are essentially the same except for the restrictions (which is why we listed them above).

The Type

Note: From here on, all equations will be assumed to be in standard form unless otherwise stated.

The type of rational function refers to the relationship between the numerator's degree and the denominator's degree. Degree can be read more about here. In practicality, there are three types that will be discussed: top-heavy, bottom-heavy, and even.

  • Top-heavy equations occur when the numerator's degree is greater than the denominator's degree. In quotient form, if the non-remainder is of a degree greater than or equal to 1, then the function is top-heavy.
  • Bottom-heavy equations occur when the numerator's degree is less than the denominator's degree. In quotient form, the remainder would be the only part of the function present.
  • Even equations occur when the numerator's degree is equal to the denominator's degree. In quotient form, if the non-remainder is of degree 0, then the function is even.

The type of equation helps determine what the end behavior of the equation will be and what the function asymptote will look like.


Next, let us identify the discontinuities. First of all, a discontinuity is a disruption in the graph where a particular domain yields no defined value. This will stem from the restrictions already listed. In essence, there are two types of discontinuities: vertical asymptotes, and holes. A vertical asymptote is an imaginary vertical line that the graph will attempt to imitate as it approaches the range's negative and positive extremes. In simpler words, the graph as it approaches this line will attempt to get closer and closer to it, but never actually reach it. A hole is simply a single point on the graph that doesn't actually exist, due to a restriction.

Of these discontinuities, the vertical asymptotes are the easiest to find and the most common. Therefore, those are typically identified first.

Vertical Asymptotes

When the function is fully simplified, the vertical asymptotes simply are the x-values for which the denominator becomes 0. This may sound familiar to having found the restrictions because it is. To find the vertical asymptotes, simply set the denominator equal to zero and solve for x. Let us say we had the below equation:

\begin{align} f(x) = {2x^2-5x+3 \over (x+6)(x-3)(x+2)} \end{align}

To find the vertical asymptotes, all we would need to do is solve the denominator for 0 and find the values for x that satisfy the equation:

\begin{align} (x+6)(x-3)(x+2) = 0 \\ x = {-6,-2,3} \\ \end{align}

Therefore, the function has three vertical asymptotes at x=-6, x=-2, and x=3. These are very similar to the restrictions from before, if not exactly the same, depending on how the function simplified after identifying said restrictions.

Odd Behavior
Image Unavailable
The behavior of a vertical asymptote with odd asymptotic multiplicity.
Vertical asymptotes are some of the key behaviors that are tracked when dealing with rational functions. The image to the left shows the exact behavior of these vertical asymptotes graphically. From the left, as the graph approaches a vertical asymptote, it begins to sort of "squish" into it, becoming closer and closer but never quite reaching the line. At the line itself, the graph is not existent. Then, on the other side of the line, the graph reappears on the opposite side of the graph from where the graph was originally going. So, if the graph were going down, then it comes from the top on the other side of the asymptote.

However, this is not the only case with vertical asymptotes. Sometimes, they appear as the graph to the right. In this case, the graph approaches the line, but on the other side, instead of coming from the opposite side of the plane, it comes from the same side. This is due to a behavior very much similar to the multiplicity of polynomial functions. This idea of asymptotic multiplicity in this case refers to the number of times something appears as a vertical asymptote.

Even Behavior
Image Unavailable
The behavior of a vertical asymptote with even asymptotic multiplicity.

Consider the below example:

\begin{align} f(x) = {1 \over (x+3)(x-6)^2(2x+1)^3} \end{align}

In this example, we get the asymptotes x=-3, x=6 twice, and x=-1/2 three times. The asymptotes x=-3 and x=-1/2 both have an odd asymptotic multiplicity, while x=6 has even asymptotic multiplicity. Odd multiplicity will yield the first behavior (which was on the left, above), and even multiplicity will yield the second behavior (which was on the right, above). This idea of asymptotic multiplicity is important when considering how a graph will appear.


Holes are the other type of discontinuity that occur. These are less often and are, in ways, even stranger than the vertical asymptotes. Simply, a hole is a single point on the graph that, due to a restriction, does not exist. This is different from an asymptote. An asymptote is a vertical line that the graph models itself around; a hole on the other hand seems to sit like a point on the graph with the exception that it simply isn't there.

How does a hole even occur? This is best suited with an example. Consider the following function:

\begin{align} f(x) = {(x-1)(x+1) \over (x-1)} \end{align}

You would first note the restriction x≠1. Then, you can actually simplify the equation by eliminating the (x-1) terms, thus yielding a simple linear function of f(x)=x+1.

Image Unavailable
A hole, as evidenced by an open circle, exists on this graph of the equation to the left.

However, remember the restriction? The x still cannot be 1! Therefore, a hole exists at x=1 for the simplified function. The hole represents a point on the graph, so we need to find out where this point is. To do this, you would plug in the restriction into the simplified function.

\begin{align} f(x) = x+1 \\ f(1) = (1)+1 \\ f(1) = 2 \\ (1,2) \\ \end{align}

Thus, the hole would be located at (1,2) marked by a small open circle. The rest of the graph is normal.

So, you can see that a hole exists for every x that is restricted but does not have a vertical asymptote running through it. If in the process of simplifying, you canceled out terms, you will have a hole where that term's restriction was.

Function Asymptote

Every rational function has exactly one function asymptote, or some sort of secondary function that the original function will attempt to imitate at the domain's negative and positive extremes. This idea works very similarly to the idea of vertical asymptotes, except that rather than being vertical, this asymptote runs horizontally, diagonally, or even in a curve. Another thing to note, whereas the graph could never cross a vertical asymptote, the graph actually can cross the function asymptote.

This is the reason that we wanted to know the type of rational function we had. Based on the type, we can predict what kind of function asymptote we will have. If the function is…

  • Bottom-heavy: The function asymptote is automatically y=0.
  • Even: The function asymptote is horizontal, but not necessarily at y=0
  • Top-heavy: The function asymptote is not horizontal, but either linear or curved
    • If the numerator's degree is exactly 1 above the denominator's degree, then the asymptote is diagonal (oblique) and linear

Here, we will show you precisely how to find the asymptote for each scenario and how they graphically look.


This is rather simple: for a bottom heavy function, the function-asymptote is always y=0. This means the x-axis actually acts as an asymptote. Note, however, that just because the x-axis may be asymptotic at its ends, x-intercepts may still occur in the middle behavior!

Bottom Heavy
Image Unavailable
This rational function is bottom heavy, so its function asymptote is the x-axis. Notice that the function asymptote can still be crossed!
The graph to the left is represented by the below function:(16)
\begin{align} f(x) = {x-3 \over x^2+2x-8} \end{align}

Since it is bottom-heavy, the function asymptote is y=0, or the x-axis.


Image Unavailable
This is the graph for the function to the left. The asymptote at y=2 is horizontal, but not the x-axis.

Even rational functions have a horizontal asymptote that is not necessarily at the x-axis. To find the asymptote, you must first have the equation in standard form, with both of the polynomials in the ratio in standard form as well (see standard form). When you have the function in this form, take the two leading coefficients and divide them to get the horizontal asymptote.

For instance, let us take the below function:

\begin{align} f(x) = {4x+5 \over 2x-3} \end{align}

To find the horizontal asymptote, take the two leading coefficients (the coefficients in front of the x's of highest exponent), and divide them, numerator over denominator. In this case, the leading coefficients are 4 and 2 respectively. Therefore, to get the horizontal asymptote, we divide:

\begin{align} \frac{4}{2} \\ y = 2 \\ \end{align}

Therefore, the horizontal asymptote is y=2. This means the function will level out at 2 at the negative and positive ends of the graph, as displayed below.


Top-heavy functions have the strangest and hardest to obtain function asymptote. This asymptote is not horizontal. Rather, it is either vertical or possibly even curved like a regular polynomial. Regardless of the shape, the method to obtain the asymptote is the same, and the general behavior the graph has toward them are the same: it will try to get close, but never quite become the asymptote.

The end product will look like a regular polynomial function. To get this special function, you need to do a lot of tough work: you must actually divide the numerator and denominator and get the function into quotient form3. Dividing the two things may require long division, which is detailed here.

Once you have the function in quotient form, then the function-asymptote is simply the non-remainder part. As a reminder, the remainder part is the last term in which x is in the denominator.

For this function, in quotient form:

\begin{align} f(x) = x+3+{2 \over x+1} \end{align}

The asymptote is y=x+3. Note that this is a diagonal asymptote, since the equation is linear. The diagram below shows this behavior, along with an example of a quadratic asymptote.

Image Unavailable
This shows a diagonal, or oblique, asymptote.
\begin{align} f(x) = x+3+{2 \over x+1} \end{align}

The function asymptote is y=x+3.

Image Unavailable
This shows a curved asymptote. This particular one is quadratic in nature.
\begin{align} f(x) = \frac{1}{2}x^2-x-2+{4 \over x} \end{align}

The function asymptote is y=1/2x2-x-2.

Asymptotic Intercepts

As mentioned before, a function asymptote can be crossed by the graph under the right circumstances. Sometimes, it can be difficult to ascertain whether or not the function does indeed cross the asymptote, and if it does where. Knowing exactly where is not normally necessary, and can even be trivial, but it is important to know when the asymptote is crossed.

Asymptotic Intercept
Image Unavailable
The graph can intercept function asymptotes as shown here. This function is the one to the left in the example.

An asymptotic intercept occurs for a particular x value when the equation of the rational function equals the equation of the asymptote. For instance, let's consider the simple example below:

\begin{align} f(x) = 2x+1+{x+4 \over x^2-4} \end{align}

We know that our function asymptote is y=2x+1, since that is the remainder part. However, what happens when x is set to -4? The remainder part becomes 0, so we are left with an answer of -7. This is the same output when -4 is substituted into the function asymptote! Therefore, since each equation shares that point, they intercept at the point of (-4,-7), and therefore the rational function will cross the asymptote at that point. The graph ends up looking like the one to the right.

So to find if and where an asymptotic intercept occurs, simply set the function asymptote equal to the original function and solve.

\begin{align} 2x+1 = 2x+1+{x+4 \over x^2-4} \end{align}

Finally, note that if the function asymptote is y=0, then all asymptotic intercepts are x-intercepts, so this step is unnecessary.

End Behavior

The end behavior is a description of what the function does at the two horizontal ends of the graph. The end behavior asks the question, "What does the graph do as it approaches positive or negative infinity?" Using the end behavior, we can tell how the graph will look at the positive and negative ends of the plane therefore becoming guidelines as to how the general shape of the graph will be conformed. For instance, the most basic rational function, $y = \frac{1}{x}$ infinitely approaches 0 at each end.

The end behavior of a rational function is dependent on what the function asymptote. In fact, the function asymptote dictates what the end behavior is.

The general rule is that the end behavior of the rational function is the same as the end behavior of the function asymptote. For instance, let us say we had the function below, and we wanted to identify the end behavior:

\begin{align} f(x) = {3 \over x-4} \end{align}

All we would need to do is identify the end behavior of the function asymptote, which would have been found in the previous step. The function asymptote for this equation is y=0, since it is bottom heavy, and therefore, the end behavior will be that as the function approaches negative and positive infinity, the graph will approach 0.

Since the function asymptotes are polynomials, you can find end behavior using the methods here. In general, you will either get a "U", "n", "/", "\", or "— @ #" type of behavior, using these symbols as a short hand (for the above equation, I would shorthand "— @ 0" for saying the graph balances at 0).


The x-intercepts are the points where the graph crosses or touches the x-axis. These special points occur when the y value is equal to 0. Due to the curves and exotic shapes of rational functions, they are able to have multiple x-intercepts, a single x-intercept, or none at all. In fact, even if the function asymptote happens to be the x-axis, the function may still harbor x-intercepts. When dealing with x-intercepts, it is best to have the function in standard form, since the standard form will tell the most about the x-intercepts.

The x-intercepts are key points for graphing a rational function; for equations, these would be known as solutions. They occur when the y, or f(x) is set equal to 0. Before solving though, it is best to know what to expect. How many x-intercepts are even possible? In standard form, the numerator tells you everything you need to know. The degree of the numerator is the maximum number of x-intercepts you can have. If the degree of the numerator is 1, you can expect 1 or no x-intercepts. If the degree is 2, you can expect 1, 2, or no x-intercepts, and so on. If the degree is 0 (meaning the numerator is just some constant), then you know for sure that the graph has no x-intercepts.

Once you determine how many solutions are possible, you can actually go about solving for them by setting y to 0. This is demonstrated below:

\begin{align} f(x) = {5x-10 \over 2x+1} \\ 0 = {5x-10 \over 2x+1} \\ \end{align}

You may notice a short-cut: the denominator doesn't even seem to matter! The first step for solving for 0 would be to multiply by the denominator, which means it simply disappears. Simply, to find the x-intercepts, all you need to do is set the numerator to 0, assuming the function is in standard form4.

\begin{align} 0 = 5x-10 \\ x = 2 \\ (2,0) \\ \end{align}

The x-intercept of this equation is (2,0).

If the numerator is in factored form, then finding the x-intercepts is a matter of setting each factor equal to zero. For instance, in this polynomial:

\begin{align} f(x) = {x(x^2+1) \over x^6-1} \end{align}

You can set the numerator equal to 0.

\begin{equation} 0 = x(x^2+1) \end{equation}

Then, set each factor to 0.

\begin{align} 0 = x, \hspace{5pt} 0 = x^2+1 \end{align}

One x-intercept is the origin, (0,0). The other factor, however, does not solve into real numbers. In fact, it solves into $\pm i$, which are imaginary roots. This simply means that the other factor yields no x-intercepts, so this function has one x-intercept, despite its degree being 3.


Usually, x-intercepts cross the x-axis straight through. However, there is more than one way that the polynomial can intercept the x-axis. There are actually three total ways that the graph intercepts the x-axis. In the first, it passes straight through no problem. In the second, it goes down and touches the x-axis and then rebounds off it. In the third, the graph sort of lingers around the interception point before crossing.

Why are there three types of intercepts? This is governed by a mathematical thing called multiplicity. Multiplicity is the number of times a particular x-intercept or solution appears. What if you ended up with the same x-intercept twice? That means that that particular x-intercept has a multiplicity of 2. It occurs twice, and it therefore has a multiplicity of 2. An x-intercept that occurs 3 times has a multiplicity of 3.

Let us look at the following example.

\begin{align} f(x) = {(x-1)(x+2)(x+2) \over 2x+3} \end{align}

We could commence the normal procedure for finding x-intercepts by setting the y equal to zero and solving. However, we end up with $0 = x+2$ twice, which means we get the intercept, (-2,0), twice. The x-intercept, (-2,0), has a multiplicity of 2.

So what does multiplicity do the shape of the graph? Depending on the multiplicity of an x-intercept, you obtain one of the three types of x-intercepts from the first paragraph in this section. How do you know what type?

Multiplicity 1
Image Unavailable
The graph passes straight through when the x-intercept has a multiplicity of one.

Normally, an x-intercept has a multiplicity of one, or it only occurs once. When this happens, the graph simply passes straight through the x-axis. It occurs once, so it passes through and continues along with the normal path that it takes.

Even Multiplicity
Image Unavailable
The graph touches and rebounds the x-axis when the particular x-intercept has an even multiplicity, like 2, 4, 6, etc.

If the intercept has an even multiplicity, meaning it occurs twice, four times, eight times, etc., then the graph appears to touch the x-axis and then bounces off in the same direction it came from. The graph never passes through the x-axis, it simply touches it and goes back. As multiplicity increases, the valley will become flatter and flatter.

Odd Multiplicity
Image Unavailable
The graph sort of lingers around the point of interception before actually crossing. This happens when the multiplicity of the x-intercept is odd, like 3, 5, 7, etc. It doesn't happen if the multiplicity is 1.

If the x-intercept has an odd multiplicity, meaning it occurs three times, five times, etc., then the graph kind of lingers around the interception point before passing through. The graph does actually pass through, but it is sort of delayed before actually passing through, like in the image. As multiplicity increases, the deflection becomes closer and closer to the x-axis.


The y-intercept is the point where the graph crosses the y-axis. Unlike the x-intercepts, any function can only have up to one y-intercept. However, whereas polynomials must have a y-intercept, rational functions may in some cases lack one. Even the most basic rational function, $y= \frac{1}{x}$, does not have a y-intercept.

Mathematically, the y-intercept occurs when x is 0. If the rational function has the restriction "x≠0", then it will not have a y-intercept, and you can skip this step. If x can be 0, then finding the y-intercept is as simple as plugging in 0 for every x in the equation. This is opposite of the x-intercepts where y became 0.

Let us for instance take the following function:

\begin{align} f(x) = {2x^2-7x+16 \over 7x-8} \end{align}

To find the y-intercept, simply make x equal to 0 and then simplify:

\begin{align} y = {2(0)^2-7(0)+16 \over 7(0)-8} \\ y = \frac{16}{-8} \\ y = -2 \\ (0,-2) \\ \end{align}

One you have this, then you have the one y-intercept. If the y-intercept is (0,0), then it is also an x-intercept.


The derivative is more of a calculus topic, but nonetheless it is extraordinarily helpful when extracting information from a polynomial in order to graph it. The derivative is a secondary function that exposes the slope of the original function at given points. What the heck does that mean?

Tangent Line
Image Unavailable
The green line is tangent to the red point on the graph of y=x2.

Think about a first degree polynomial, or a simple line. For example, we will use $y = 3x+1$. This line is said to have a slope, a sort of definition to how steep it is compared to the x-axis. The slope is 3 everywhere since the value of y increases by three for every unit increase of x.

Consequentially, all other functions have multiple slopes. Take the quadratic polynomial, $y = x^2$, for instance. We cannot say it has a slope since the slope constantly changes. It continues to curve. However, every single point on the curve has a definitive slope. Take a look at the image to the right. A line touches a single point on the curve, but it doesn't go through it. It simply touches the point. And it keeps going.

The slope of the line represents the slope of the curve at that particular point. This special line is called a tangent line. Every point has a slope. The job of the derivative is to tell us specifically the slope of every point on the curve5. Therefore, there is a very large graphical connection between the function and its derivative.

When the slope of the function is positive, the derivative is above the x-axis. When the slope is negative, the derivative is under the x-axis. When the slope is zero, this means that the point is either the top of a hill or bottom of a valley, the derivative is crossing the x-axis. This is helpful in finding the extrema of a rational function (discussed later).

How do you find the derivative of a function? There is a complex calculus formula that defines the derivative of a function, but our concern is simply graphing a rational function. So, we will take the shortcut way. First, the function should be in standard form. Then, you must alter the function into the following format.

\begin{align} {p(x) \over q(x)} \rightarrow {q(x) \times p'(x) - p(x) \times q'(x) \over q^2(x)} \end{align}

This formula may look very complicated at first glance, and to simplify it will require some advanced algebraic skill. First off, it is best to explain the notation used. When an apostrophe appears after the function name, as in p'(x), that means we are taking the derivative of p(x). Secondly, q2(x) simply means to square the denominator, or multiply it by itself. So if the denominator were q(x)=x+1, then q2(x)=(x+1)2. Note that we haven't taken the derivative yet; we have only changed the form of the equation to prepare it for a correct derivation.

After arranging the information, now you must actually take the derivative of p(x) and q(x). If these parts are in the standard polynomial form, then you can apply the power rule. Simply, apply the below formula to each term of the two polynomials.

\begin{align} ax^n \rightarrow anx^{n-1} \end{align}

Once you have done this, you may move on to the next step; you don't even have to simplify, though it would be a good idea to at least simplify the numerator.

Let's go through an example. We want to take the derivative of the below function:

\begin{align} f(x) = {x^2+3x-2 \over 2x-1} \end{align}

First, put the polynomial into the new format6:

\begin{align} f'(x) = {(2x-1)\frac{d}{dx}(x^2+3x-2) - (x^2+3x-2)\frac{d}{dx}(2x-1) \over (2x-1)^2} \end{align}

Next, apply the Power Rule to the two things of which you are taking the derivative of, notably the quantities directly after the d/dx:

\begin{align} f'(x) = {(2x-1)((2)x^{2-1}+3(1)x^{1-1})-(x^2+3x-2)(2(1)x^{1-1}) \over (2x-1)^2} \\ f'(x) = {(2x-1)(2x+3)-(x^2+3x-2)(2) \over (2x-1)^2} \\ \end{align}

Then, you may simplify the numerator. The denominator will not need simplification.

\begin{align} f'(x) = {(4x^2+4x-3)-(2x^2+6x-4) \over (2x-1)^2} \\ f'(x) = {2x^2-2x+1 \over (2x-1)^2} \\ \end{align}

This is a long process, it may seem, but it is necessary for the next step. The derivative function will help you identify the extrema for the original rational function.


Extrema are the local minimums and maximums of the graph; in other words, these are the low points in valleys and high points of hills, where the graph turns around and begins going the other direction (from up to down, or vice versa). However, as a technical definition, and more accurately, an extremal point occurs when the slope of that point of the graph is 0, as determined by the derivative function found earlier. Because of this, certain points do not get counted as the extrema. Mainly, this will exclude the points just before and just after a hole, and of course while a hole may pose as an extremal point, since it doesn't exist it wouldn't actually be an extremum.

Finding the extrema is essential to sketching an accurate graph, though a rough sketch can be made without them. In the previous paragraph, we mentioned how an extremal point occurs when that point's slope is 0. Therefore, since the derivative tells the slope of the graph at certain points, we can actually use the derivative to solve for the locations of the extrema. Since we want the slope to be 0, we simply need to set the derivative equal to 0; and if we have the derivative in standard form, only the numerator needs to be set to 0! From there, we can solve the equation for the extremal points' x locations.

So, let us take the below function as an example.

\begin{align} f(x) = {1 \over x^2-1} \end{align}

We want to find the extrema of this equation. So, we need to first find the derivative.

\begin{align} f'(x) = {(x^2-1)\frac{d}{dx}(1)-(1)\frac{d}{dx}(x^2-1) \over (x^2-1)^2} \\ f'(x) = {(x^2-1)(0)-(1)(2x) \over (x^2-1)^2} \\ f'(x) = {-2x \over (x^2-1)^2} \\ \end{align}

Now, set the numerator of the derivative equal to 0 and solve for the x's for which an extremal point occurs.

\begin{align} -2x = 0 \\ x = 0 \\ \end{align}

Therefore, we know there is an extremum at x=0. However, extrema are points which have both x and y components, in the form of a coordinate point. We have the x, so we need to find the y. Since we have the x of the point, giving us so far the point (0,y) as the extremum, all we need to do is substitute the x into the original equation (not the derivative). Substituting 0 for x in the original equation yields -1. Therefore, this equation has one extremal point at (0,-1).

Many times, the extremal points will not be integer or even rational. Sometimes, a function might not yield any extrema. In the cases where no extrema occur, do not plot points for them. Finally, remember that any x-intercept with even multiplicity will itself be extremal.

Concisely, these are the general steps:

  • Find the derivative of the polynomial
  • Set the numerator of the polynomial equal to 0
  • Solve this for x
  • Substitute the solutions into the original function
  • Write as coordinates

Imaginary Roots

In the section describing x-intercepts, we mentioned how the degree of the numerator tells how many x-intercepts to expect. Sometimes, though, we end up with less than that expected number, even with multiplicity accounted for. However, this does not mean you have missing solutions. Rather, these solutions are known as imaginary roots. These are solutions to the original rational function but have an imaginary $i$ part. Because of this, they cannot be graphed.

For instance, consider the below polynomial:

\begin{align} f(x) = {x^2+1 \over 2x^2} \end{align}

To find the possible x-intercepts, we must set the numerator equal to 0. However, we quickly find that we get no real answer.

\begin{align} x^2+1 = 0 \\ x^2 = -1 \\ x = \pm \sqrt{-1} \\ \end{align}

Taking the square root of a negative number can never return a real answer. Therefore, we get two complex answers, $\pm i$. These are not x-intercepts, so they cannot be graphed, and they furthermore do not provide much clue as to how the end graph will appear. Nonetheless, these imaginary solutions are an intricate part of the function and should be found if possible.

Stringing the Information Together

Once you have all the defining features found by the above steps, you can "connect the dots" and actually plot the graph. The above information is all that is necessary for plotting an accurate sketch of the graph.

All you really have to do is put all of the defining features on the graph and then use those to know where the graph is going. The general order presented here is a simple guideline for actually graphing the function, as to minimize mistakes.

First, draw the vertical asymptotes in as light dashed lines. Do not forget about asymptotic multiplicity! If a vertical asymptote has multiplicity, write its multiplicity above it. Then, plot the function asymptote, which should be a normal polynomial function. This too should be drawn in as dahsed. Sometimes, though rarely, the asymptote may be of a higher degree polynomial, in which case you may have to follow some of the guidelines for polynomial functions. Don't forget to plot asymptotic intercepts if applicable.

Next, plot the y-intercept and extrema. If you don't have extrema, then just plot the y-intercept, unless that also doesn't exist.

Now, plot the x-intercepts, including the labeling of their multiplicity. After plotting the x-intercepts, plot the holes of the graphs. Mark these as open circles on the graph instead of filled in points.

Finally, you must mark the end behavior. This is perhaps the most difficult of the bunch since it requires some logic, despite all it being is writing out arrows in the direction that the graph leaves the plane. The end behavior is simple the end behavior of the function asymptote, but you can help yourself by writing the arrows on the correct side of the asymptote. If the graph is going to leave and get closer to the top of an asymptote, then write the arrow above the asymptote. If it is getting closer to the bottom, then write the arrow on the bottom. How do you know which side? There isn't a set pattern; it is all logic. Follow the points already plotted to estimate where the graph enters and exits.

Once you have done this, connect the dots! Remember that at an asymptote, the graph gets closer and closer to it without actually touching. Asymptotes with odd multiplicity will exit on one side and reappear on the other, whereas asymptotes with even multiplicity will exit and reappear on the same side of the plane. At every extremum or x-intercept with even multiplicity, make the graph go the other direction. Never fill in the holes or cross through them. Once you have done this, then the graph is complete!

Image Unavailable

Example Walk Through

This section will walk you through actually graphing a rational function. The one presented here is complicated to expose you to many possible scenarios that you may encounter.

Graph the following:

\begin{align} f(x) = x+5+\left({(x^2-x-20)(2x+1) \over (2x+10)(20x+5)}\right)^{-1} \end{align}

Step 1

First, observe the problem. Find out what kind of problem it is so you can better prepare your strategy for graphing it. First off, we see that this function is almost in quotient form. We see the two parts that make up the quotient form: the non-remainder part is x+5, and the rest looks like a remainder. However, the whole rational part is taken to the negative first power. When something is taken to the negative first power, we simply take the reciprocal of it, meaning that eventually, to put this function in quotient form, all we would need to do is flip the ratio (make the denominator the numerator, and vice versa).

Finally, when we observe the ratio part, we find that the numerator and denominator both appear to be in factored form. We know this because each component is a factor being multiplied by other factors; no addition or subtraction appears outside of the parentheses. Having the ratio in factored form is rather convenient since our first step, finding restrictions, will require it anyway. So, all we need to ensure is that the polynomials are entirely factored; that is, can we actually factor these terms any further?

Let us observe the numerator first. The second factor, 2x+1, cannot be factored further. But what about x2-x-20? The squared part tells that we might end up with two binomials if it factors. In fact, this quadratic expression does factor:

\begin{equation} x^2-x-20 = (x-5)(x+4) \end{equation}

In the denominator, the two factors each have Greatest Common Factors that can be taken out of them. In 2x+10, each term is divisible by 2, so we can factor out the 2 and end up with 2(x+5). In the second factor, we can factor out 5 and end up with 5(4x+1). Therefore, our new fully factored function is below:

\begin{align} f(x) = x+5+\left({(x-5)(x+4)(2x+1) \over 10(x+5)(4x+1)}\right)^{-1} \end{align}

Notice that we did not take that negative first power yet! We need to leave the function in this form so that we can note restrictions before altering our dangerous denominator.

Step 2

Note your restrictions. This is a crucial step before changing up the equation's denominator. After simplifying, you may lose some restrictions. For instance, in this, if you went ahead and simplified before noting restrictions, you may miss the fact that this function has a hole at x=-5. The value -5 will work in the simplified function, but it will not work in the original function; therefore, we must list ALL restrictions before moving on. What can x not equal?

Set the denominator(s) equal to zero to find out.

\begin{align} 10(x+5)(4x+1) \ne 0 \\ x+5 \ne 0, \hspace{5pt} 4x+1 \ne 0 \\ x \ne \{-5,-\frac{1}{4}\} \\ \end{align}

So far, our restrictions are:

  • x≠-5
  • x≠-1/4

More restrictions may come during the simplification process, which is in the next step. For now, simply write all the restrictions off the side for safe keeping.

Restrictions: x≠-5,-1/4

Step 3

Now it is time to simplify the expression and put it into standard form. Since we are already so close to having it in quotient form, and since we would need that form later anyway, we will convert this function into quotient form first. Luckily, that only requires us to do one thing: fix that negative first power.

A negative first power (x-1) means to take the reciprocal of. In other words, all we need to do is flip that fractional part so that the denominator becomes the numerator, and vice versa, according to the identity below:

\begin{align} \left(\frac{a}{b}\right)^{-1} = \frac{b}{a} \end{align}

So, let us do this to our equation.

\begin{align} f(x) = x+5+{10(x+5)(4x+1) \over (x-5)(x+4)(2x+1)} \end{align}

Therefore, this is our quotient form. Before we move on, we should note the new restrictions that pop up, since we now have a new denominator. Setting the denominator equal to 0 and solving, we can add x≠5,-4, and -1/2 to the list of restrictions:

Restrictions: x≠-5,-1/4,5,-4,-1/2

Now, we can put our function into standard form so that some of the defining features we need can be more easily found. To do this, we need to somehow combine x+5 with the big fraction next to it. This works as it does with normal numerical fractions; to add them, you make common denominators.

So in this case, we need to give x+5 the common denominator of (x-5)(x+4)(2x+1).

Practice Problems

\begin{align} f(x) = \left({5-x \over x^2-4}\right)\left({x^3-5x+12 \over x-5}\right)\left({4x-11 \over 5x+10}\right) \end{align}
\begin{align} f(x) = \cfrac{1}{x-\cfrac{1}{x+\cfrac{1}{x-\cfrac{1}{x}}}} \end{align}

Related Tutorials

Works Cited

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License