Use Sophia to knock out your gen-ed requirements quickly and affordably. Learn more
×

Writing Rational Functions

Author: Sophia

what's covered
In this lesson, you will use the graph and/or characteristics of a rational function to write its equation. Specifically, this lesson will cover:

Table of Contents

1. Writing an Equation of a Rational Function Given Its Characteristics

Earlier, we were using the equation of a rational function to determine all its characteristics. Because of the relationship between the equation and these characteristics, we can also write a possible equation of a rational function if we know its characteristics.

EXAMPLE

Write an equation of the rational function whose graph is shown here.

A graph with an x-axis and a y-axis ranging from −9 to 10. The graph has a horizontal dashed line that coincides with the x-axis, representing a horizontal asymptote; and two vertical dashed lines at x equals −3 and x equals 4. The graph also has three curves, separated by the vertical asymptotes. The curve on the left starts on the left side of the lower left quadrant, slightly below the x-axis, then decreases away from the axis to head toward the left side of the vertical dashed line at x equals -3. The curve in the middle is contained between the vertical dashed lines at x equals -3 and x equals 4, rising indefinitely to the left and falling indefinitely to the right, with a more gradual decrease through the point (0, 1). The curve on the right starts at the top of the upper right quadrant slightly to the right of the vertical dashed line x equals 4, decreases sharply at first, then more gradually toward the x-axis, running along the axis without crossing it.

Let’s list the characteristics we see from the graph.

  • The horizontal asymptote is y equals 0. This suggests that the degree of the numerator is smaller than the degree of the denominator.
  • The vertical asymptotes are x equals short dash 3 and x equals 4.
  • The x-intercept is open parentheses 3 comma space 0 close parentheses.
  • The y-intercept is open parentheses 0 comma space 1 close parentheses.
Now, let’s translate all these characteristics to parts of the function.

The vertical asymptotes are x equals short dash 3 and x equals 4 comma which means that the denominator contains open parentheses x plus 3 close parentheses and open parentheses x minus 4 close parentheses as factors. Upon further inspection, the behavior of the graph around the asymptotes suggests that each has odd multiplicity (f open parentheses x close parentheses rightwards arrow infinity on one side of the asymptote and f open parentheses x close parentheses rightwards arrow short dash infinity on the other side). Thus, the factored form of the denominator is open parentheses x plus 3 close parentheses open parentheses x minus 4 close parentheses.

The x-intercept is open parentheses 3 comma space 0 close parentheses comma which means that open parentheses x minus 3 close parentheses is a factor of the numerator.

At this point, we can form our rational function. Our function has the form f open parentheses x close parentheses equals a times fraction numerator open parentheses x minus 3 close parentheses over denominator open parentheses x plus 3 close parentheses open parentheses x minus 4 close parentheses end fraction comma where a is a stretch factor that isn’t apparent from the graph. Similar to our work with polynomials, we use another point on the graph to determine what the value of a is. In this case, we use the y-intercept.

Since the y-intercept is open parentheses 0 comma space 1 close parentheses comma we know f open parentheses 0 close parentheses equals 1. By our equation, f open parentheses 0 close parentheses equals a times fraction numerator open parentheses 0 minus 3 close parentheses over denominator open parentheses 0 plus 3 close parentheses open parentheses 0 minus 4 close parentheses end fraction equals 1 fourth a.

Thus, 1 fourth a equals 1 comma which means a equals 4.

In conclusion, an equation of the pictured rational function is f open parentheses x close parentheses equals 4 times fraction numerator open parentheses x minus 3 close parentheses over denominator open parentheses x plus 3 close parentheses open parentheses x minus 4 close parentheses end fraction comma which is also written f open parentheses x close parentheses equals fraction numerator 4 open parentheses x minus 3 close parentheses over denominator open parentheses x plus 3 close parentheses open parentheses x minus 4 close parentheses end fraction.

Now that we have worked through one example, here are some steps to follow when building an equation of a rational function.

step by step
  1. For each x-intercept, create a factor and place it in the numerator. Raise factors to appropriate powers if needed to account for behaviors around the x-axis.
  2. For each vertical asymptote, create a factor and place it in the denominator. Raise factors to appropriate powers if needed to account for behaviors on both sides of each vertical asymptote.
  3. If there are other characteristics not accounted for (such as a y-intercept or a horizontal or slant asymptote), find the value of the stretch factor that is needed to accommodate the other characteristics.

Now, let’s look at a more involved example.

EXAMPLE

Write an equation of the rational function whose graph is shown below.

A graph with an x-axis and a y-axis ranging from −9 to 10. The graph has a horizontal dashed line at (0, 0) and two vertical dashed lines at x equals −1 and x equals 2. The graph also has three curves, where one curve starts in the second quadrant at the point (−1, 10.8), extends downward overlapping the dashed line x equals −1, opens leftward passing through the marked point labeled (−2, 0), and extends beyond the point (−9, 0). The second curve starts in the fourth quadrant at the point (−9.5, 2.2), extends upward parallel to the dashed line at x equals 2, opens rightward passing though the marked point (3, 0), and extends beyond the point (10, 0). The third curve starts in the third quadrant at the point (−1, −9.7), extends upward overlapping the vertical dashed line at x equals −1, opens downward at the marked point labeled (0, −1), and extends downward into the fourth quadrant close to the dashed line at x equals 2. These curves extend toward infinity while never touching the origin.

Let’s list the characteristics we see from the graph:

  • The horizontal asymptote is y equals 0. This suggests that the degree of the numerator is smaller than the degree of the denominator.
  • The vertical asymptotes are x equals short dash 1 and x equals 2.
  • The x-intercepts are open parentheses short dash 2 comma space 0 close parentheses and open parentheses 3 comma space 0 close parentheses.
  • The y-intercept is open parentheses 0 comma space short dash 1 close parentheses.
Now, let’s translate all these characteristics to parts of the function.

The vertical asymptotes are x equals short dash 1 and x equals 2 comma which means that the denominator contains open parentheses x plus 1 close parentheses and open parentheses x minus 2 close parentheses as factors.

Upon further inspection, the behavior of the graph around x equals short dash 1 suggests odd multiplicity since f open parentheses x close parentheses rightwards arrow infinity on one side and f open parentheses x close parentheses rightwards arrow short dash infinity on the other side.

However, the behavior around x equals 2 suggests even multiplicity since f open parentheses x close parentheses rightwards arrow short dash infinity on both sides of x equals 2. Therefore, the factored form of the denominator is open parentheses x plus 1 close parentheses open parentheses x minus 2 close parentheses squared.

The x-intercepts are open parentheses short dash 2 comma space 0 close parentheses and open parentheses 3 comma space 0 close parentheses comma which means that open parentheses x plus 2 close parentheses and open parentheses x minus 3 close parentheses are factors of the numerator. Since the graph crosses the x-axis at each intercept, each factor has odd multiplicity, so we will assume that each is linear (multiplicity 1). Then, the numerator is open parentheses x plus 2 close parentheses open parentheses x minus 3 close parentheses.

At this point, we can form our rational function. Our function has the form f open parentheses x close parentheses equals a times fraction numerator open parentheses x plus 2 close parentheses open parentheses x minus 3 close parentheses over denominator open parentheses x plus 1 close parentheses open parentheses x minus 2 close parentheses squared end fraction comma where a is a stretch factor that isn’t apparent from the graph. Similar to our work with polynomials, we use another point on the graph to determine what the value of a is. In this case, we use the y-intercept.

Since the y-intercept is open parentheses 0 comma space short dash 1 close parentheses comma we know f open parentheses 0 close parentheses equals short dash 1. By our equation, f open parentheses 0 close parentheses equals a times fraction numerator open parentheses 0 plus 2 close parentheses open parentheses 0 minus 3 close parentheses over denominator open parentheses 0 plus 1 close parentheses open parentheses 0 minus 2 close parentheses squared end fraction equals short dash 2 over 3 a.

Thus, short dash 2 over 3 a equals short dash 2 comma which means a equals 2 over 3.

In conclusion, an equation of the pictured rational function is f open parentheses x close parentheses equals 2 over 3 times fraction numerator open parentheses x plus 2 close parentheses open parentheses x minus 3 close parentheses over denominator open parentheses x plus 1 close parentheses open parentheses x minus 2 close parentheses squared end fraction comma which is also written f open parentheses x close parentheses equals fraction numerator 2 open parentheses x plus 2 close parentheses open parentheses x minus 3 close parentheses over denominator 3 open parentheses x plus 1 close parentheses open parentheses x minus 2 close parentheses squared end fraction.

Here is one more worked-out example that involves an oblique asymptote.

EXAMPLE

Write an equation of the rational function whose graph is shown here.

A graph with an x-axis ranging from −9 to 10 and a y-axis ranging from −6 to 11. The graph has a vertical dashed line at x equals 1 and a slanted dashed line that extends upward from the third quadrant, passes through the points (−2, 0) and (0, 2), and extends into the first quadrant. The graph also has two curves, where the curve on the left starts in the lower left quadrant slightly above the slanted dashed line, and as x increases, the curve pulls away from the slanted line, passes through the point (0, 6), then continues to rise rapidly along the left side of the vertical dashed line. To the right of the vertical dashed line, the graph starts at the bottom of the lower right quadrant, increases rapidly and then more gradually to pass through the point (2, 0), then increases toward the slanted dashed line in the first quadrant, remaining under the line and never crossing it.

Let’s list the characteristics we see from the graph.

  • This function has an oblique asymptote. This suggests that the degree of the numerator is greater than the degree of the denominator.
  • The vertical asymptote is x equals 1.
  • The x-intercepts are open parentheses short dash 3 comma space 0 close parentheses and open parentheses 2 comma space 0 close parentheses.
  • The y-intercept is open parentheses 0 comma space 6 close parentheses.
Now, let’s translate this information into parts of the equation.

Since f open parentheses x close parentheses rightwards arrow infinity on one side of the vertical asymptote and f open parentheses x close parentheses rightwards arrow short dash infinity on the other side, x equals 1 has odd multiplicity. This means that the denominator is x minus 1.

Since the graph crosses the x-axis at each x-intercept, assume that each corresponds to a linear factor. Since open parentheses short dash 3 comma space 0 close parentheses corresponds to x plus 3 and open parentheses 2 comma space 0 close parentheses corresponds to x minus 2 comma the factored form of the numerator is open parentheses x plus 3 close parentheses open parentheses x minus 2 close parentheses.

Next, our function has the form f open parentheses x close parentheses equals a times fraction numerator open parentheses x plus 3 close parentheses open parentheses x minus 2 close parentheses over denominator x minus 1 end fraction for some stretch factor a.

With the given y-intercept at open parentheses 0 comma space 6 close parentheses comma we know f open parentheses 0 close parentheses equals 6.

From the function we built, we have f open parentheses 0 close parentheses equals a times fraction numerator open parentheses 0 plus 3 close parentheses open parentheses 0 minus 2 close parentheses over denominator 0 minus 1 end fraction equals 6 a.

Then, 6 a equals 6 comma which means a equals 1.

In conclusion, f open parentheses x close parentheses equals 1 times fraction numerator open parentheses x plus 3 close parentheses open parentheses x minus 2 close parentheses over denominator x minus 1 end fraction comma or f open parentheses x close parentheses equals fraction numerator open parentheses x plus 3 close parentheses open parentheses x minus 2 close parentheses over denominator open parentheses x minus 1 close parentheses end fraction.

try it
Consider the graph shown below:

A graph with an x-axis ranging from −13 to 13 and a y-axis ranging from −8 to 11. The graph has a dashed line that overlaps the x-axis, representing the horizontal asymptote and two vertical dashed lines at x equals −3 and x equals 3, representing vertical asymptotes. The graph also has three curves, separated by the vertical asymptotes. The curve on the left starts on the left side of the second quadrant slightly above the x-axis, runs along the axis and pulls away as x increases, passes through the point (-4, 3), then increases rapidly along the left side of the vertical dashed line at x equals -3. The curve in the middle decreases toward x equals -3 to the left and increases toward x equals 2 to the right.  The curve increases from left to right, flattening out briefly around (0, -2), then increasing again. The curve on the right starts high in the first quadrant slightly to the right of the dashed line x equals 3, decreasing more gradually as it pulls away from the vertical line, passing close to the point (7, 0.8), then onward toward the x-axis, continuing to the right without crossing it.

Write an equation of the rational function that corresponds to this graph.
First, note that the graph has vertical asymptotes at x equals 3 and x equals short dash 3. Since both sides of the graph approach infinity around x equals 3 comma the factor x minus 3 will have even multiplicity (2).

This means the denominator of the rational expression is open parentheses x plus 3 close parentheses open parentheses x minus 3 close parentheses squared.

There is one x-intercept at open parentheses 2 comma space 0 close parentheses. This means that the numerator has a factor of open parentheses x minus 2 close parentheses. Since the graph crosses the x-axis at open parentheses 2 comma space 0 close parentheses comma the factor open parentheses x minus 2 close parentheses has odd multiplicity. In this case, we’ll use multiplicity 1, since the graph doesn’t flatten out at the intercept.

Putting this together so far, this means the equation for f open parentheses x close parentheses has the form f open parentheses x close parentheses equals a times fraction numerator open parentheses x minus 2 close parentheses over denominator open parentheses x plus 3 close parentheses open parentheses x minus 3 close parentheses squared end fraction comma where a is a stretch factor (not apparent from the graph).

Note that the numerator has degree 1 and the denominator has degree 2, which guarantees that the graph of f open parentheses x close parentheses has a horizontal asymptote with the equation y equals 0.

To find a comma we’ll use the y-intercept open parentheses 0 comma space short dash 2 close parentheses comma which means f open parentheses 0 close parentheses equals short dash 2.

From the equation, f open parentheses 0 close parentheses equals a times fraction numerator 0 minus 2 over denominator open parentheses 0 plus 3 close parentheses open parentheses 0 minus 3 close parentheses squared end fraction equals short dash 2 over 27 a.

Since f open parentheses 0 close parentheses equals short dash 2 comma we have short dash 2 over 27 a equals short dash 2 comma which means a equals 27.

Thus, an equation for the graph is f open parentheses x close parentheses equals 27 times fraction numerator open parentheses x minus 2 close parentheses over denominator open parentheses x plus 3 close parentheses open parentheses x minus 3 close parentheses squared end fraction comma or written in a more condensed form, f open parentheses x close parentheses equals fraction numerator 27 open parentheses x minus 2 close parentheses over denominator open parentheses x plus 3 close parentheses open parentheses x minus 3 close parentheses squared end fraction.

watch
This video presents another example of writing the equation of a rational function given its graph.

hint
Using technology to graph rational functions can be very useful. However, there are some pitfalls, which make the analysis we do (finding intercepts, asymptotes, holes in the graph, etc.) even more important. For example, if the graph contains a hole, most programs do not show this on the graph. This is just one reason why it is important to analyze the function algebraically to determine its graph’s characteristics.


2. Interpreting Characteristics of a Rational Function in Real-Life Situations

Earlier, we discussed real-life situations that were modeled by rational functions. Since we know so many more characteristics of rational functions now, they can be interpreted with real-life meaning.

EXAMPLE

Suppose you have a saltwater solution that contains 5 pounds of salt dissolved in 50 gallons of water. A tap is turned on that adds 4 gallons of water to the solution each minute, and at the same time, 0.5 pounds of salt is added each minute.

We found the concentration of salt (measured in pounds per gallon) to be C open parentheses t close parentheses equals fraction numerator 5 plus 0.5 t over denominator 50 plus 4 t end fraction comma where t is the number of minutes since the water was turned on.

The function is in its simplest form. Let’s find the vertical asymptote:

50 plus 4 t equals 0 Set the denominator equal to 0.
t equals short dash 12.5 Solve for t.

Since this value of t suggests a negative amount of time, the vertical asymptote has no meaning in this situation.

Let’s now find the horizontal asymptote. Since the degrees of the numerator and denominator are the same, the horizontal asymptote is y equals fraction numerator 0.5 over denominator 4 end fraction equals 0.125.

Remember that the horizontal asymptote represents the end behavior of a function. Thus, the horizontal asymptote tells us that the concentration of the solution approaches 0.125 pounds of salt per gallon of water.

try it
Currently, you have 100 ounces of a 50% acid solution. You want to add x ounces of an 80% acid solution.
Write a simplified expression for the number of ounces of acid in the solution after x ounces of 80% acid solution is added to the original solution.
At the start, there are 100 open parentheses 0.50 close parentheses equals 50 ounces of acid in the mixture.

In the x ounces that are added, 80% of them, or 0.80 x comma are actual acid.

This means that the amount of acid in the solution is 50 plus 0.80 x.
Write an expression for the total number of ounces of acid solution there is after x ounces of the 80% solution is added.
At the beginning, there are 100 ounces of fluid, then x ounces of fluid are added. This means that the total number of ounces of fluid is 100 plus x.
Write a rational function to represent the concentration C   (x  ) of acid in the solution after x ounces have been added.
Dividing the number of ounces of acid by the number of ounces of fluid, the concentration is C open parentheses x close parentheses equals fraction numerator 50 plus 0.80 x over denominator 100 plus x end fraction.
Find the horizontal asymptote, then interpret its meaning in this situation.
Since the degrees of the numerator and denominator are equal, the equation of the horizontal asymptote is determined by taking the ratio of the leading coefficients. In this case, y equals fraction numerator 0.80 over denominator 1 end fraction equals 0.80.

This means that in the long run, as more and more ounces of solution are added, the concentration of the solution will get closer and closer to 80%.

summary
In this lesson, you learned how to write an equation of a rational function given its characteristics. For instance, given the graph of a rational function, a possible equation can be formed by first considering vertical asymptotes, holes in the graph, and x-intercepts, along with their behavior near these locations, then finding the vertical stretch factor to accommodate the other characteristics such as the y-intercept or another asymptote. You also learned how to interpret characteristics of a rational function in real-life situations, exploring scenarios where rational functions are used to model the concentration of a solution, and the horizontal asymptote represents the concentration the solution approaches long term, either over time or as more solution is added.

SOURCE: THIS TUTORIAL HAS BEEN ADAPTED FROM OPENSTAX "PRECALCULUS” BY JAY ABRAMSON. ACCESS FOR FREE AT OPENSTAX.ORG/DETAILS/BOOKS/PRECALCULUS-2E. LICENSE: CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL.