*Relevant textbook sections: 5.6*

*Suggested homework problems: *

*Textbook 5.6: 39-64*

We can use the techniques of the last two sections to graph a rational function `R\par{x}`. The steps:

- Factor the numerator and denominator of `R`. Find the domain of `R`.
- Write `R` in lowest terms. If any factors cancel out, use the lowest-terms version of the function to find the `y` value for each cancelled factor, and plot open points at each "hole."
- Locate the intercepts of the graph, and determine whether the graph crosses or touches the `x`-axis at each `x`-intercept.
- Determine the vertical asymptotes. Graph each one using a dashed line.
- Determine the horizontal or slant asymptote, if one exists. Graph it using a dashed line. Determine points, if any, where the graph intersects this asymptote, and plot them.
- Use the zeroes of both the numerator and denominator to divide the `x`-axis into intervals, and determine whether each interval is above or below the `x`-axis. Plot the points found.
- Use all of these results to draw the graph.

Graph each rational function.

`R\par{x} = \cfrac{x}{x^2 + x - 2}`

**Step 1**: Factor the numerator and denominator of `R`. Find the domain of `R`.

`\eq{R\par{x} &= \frac{x}{x^2 + x - 2} \\[4pt] &= \frac{x}{\par{x - 1} \par{x + 2}}}`

The domain is `\curl{x \mid x \neq -2, x \neq 1}`.

**Step 2**: Write `R` in lowest terms.

`R` is already in lowest terms.

**Step 3**: Locate the intercepts of the graph, and determine whether the graph crosses or touches the `x`-axis at each `x`-intercept.

The numerator tells us the `x`-intercepts: the only one is `x = 0`. Because the multiplicity of `x` is `1`, the graph crosses the `x`-axis at this point.

Since `f\par{0} = 0`, the `y`-intercept is `y = 0`. Thus the only intercept is the origin.

**Step 4**: Determine the vertical asymptotes. Graph each one using a dashed line.

The lines `x = -2` and `x = 1` are vertical asymptotes.

**Step 5**: Determine the horizontal or slant asymptote, if one exists. Graph it using a dashed line. Determine points, if any, where the graph intersects this asymptote, and plot them.

The degree of the numerator is less than the degree of the denominator. Thus `R` is proper, so the line `y = 0` is a horizontal asymptote.

We've already determined that the origin is the `x`-intercept, so the graph will cross the horizontal asymptote at the origin.

**Step 6**: Use the zeroes of both the numerator and denominator to divide the `x`-axis into intervals, and determine whether each interval is above or below the `x`-axis. Plot the points found.

Interval | `\par{-\infty,-2}` | `\par{-2,0}` | `\par{0,1}` | `\par{1,\infty}` |

`x` | `-3` | `-1` | `\cfrac{1}{2}` | `2` |

`R\par{x}` | `-\cfrac{3}{4}` | `\cfrac{1}{2}` | `-\cfrac{2}{5}` | `\cfrac{1}{2}` |

Above/Below | Below | Above | Below | Above |

Point | `\par{-3,-\cfrac{3}{4}}` | `\par{-1,\cfrac{1}{2}}` | `\par{\cfrac{1}{2},-\cfrac{2}{5}}` | `\par{2,\cfrac{1}{2}}` |

**Step 7**: Use all of these results to draw the graph.

We need to see where the graph is approaching all of these asymptotes. Remember, the asymptotes act like fences, corralling the function. The function can never cross the vertical aymptotes, and we've already determined the only place it will cross the horizontal asymptote. So, the points we've already plotted tell us where the function is forced to go.

For the horizontal asymptote `y = 0`:

The graph lies below the `x`-axis when `x < -2`. We know this because we have the point `\par{-3,-\cfrac{3}{4}}` already plotted, and we know that the only place the function crosses the line `y = 0` is where `x = 0`. So as `x` is going off into negative-infinity-land, it is approaching the `x`-axis from below. So we can draw a little arrow under the `x`-axis off on the left of the graph.

The graph lies above the `x`-axis when `x > 1`, so as `x` gets large it approaches the `x`-axis from above. We'll draw a little arrow above the `x`-axis off to the right.

For the vertical asymptote `x = -2`:

When `x < -2`, the graph lies below the `x`-axis. So, as `x \rightarrow -2` from the left, the graph must be heading down in the negative direction. So we'll draw an arrow pointing down at the bottom of the graph, to the left of `x = -2`.

Now, when `-2 < x < 0`, the graph is above the `x`-axis. Thus as `x \rightarrow -2` from the right, the graph is going up in the positive direction. So we draw an arrow at the top of the graph, pointing upwards, to the right of `x = -2`.

For the vertical asymptote `x = 1`:

When `0 < x < 1`, the graph is below the `x`-axis. So a down arrow gets drawn at the bottom, to the left of `x = 1`.

When `x > 1`, the graph is above the `x`-axis, so an up arrow gets drawn to the right of `x = 1`, at the top of the graph.

Now it's just a matter of connecting our dots and arrows.

`R\par{x} = \cfrac{x^2 + 3x - 10}{x^2 + 8x + 15}`

**Step 1**: Factor the numerator and denominator of `R`. Find the domain of `R`.

`\eq{R\par{x} &= \frac{x}{x^2 + x - 2} \\[4pt] &= \frac{\par{x + 5} \par{x - 2}}{\par{x + 5} \par{x + 3}}}`

The domain is `\curl{x \mid x \neq -5, x \neq 3}`.

**Step 2**: Write `R` in lowest terms.

We have a common factor on the top and bottom this time, which cancel out. So in lowest terms,

`R\par{x} = \cfrac{x - 2}{x + 3}, x \neq -5`

This means we'll have a hole in the graph where `x = -5`. To find the `y`-value, we need to plug `x = -5` into the lowest-terms version of the function, even though we aren't technically allowed to do so.

`\eq{R\par{-5} &= \frac{-5 - 2}{-5 + 3} \\[4pt] &= \frac{-7}{-2} \\[4pt] &= \frac{7}{2}}`

Thus the hole is at the point `\par{-5,\cfrac{7}{2}}`.

**Step 3**: Locate the intercepts of the graph, and determine whether the graph crosses or touches the `x`-axis at each `x`-intercept.

The numerator tells us the only `x`-intercept is `x = 2`, and because the multiplicity of `x` is `1`, the graph crosses the `x`-axis at this point.

Since `f\par{0} = -\cfrac{2}{3}`, the `y`-intercept is `y = -\cfrac{2}{3}`.

**Step 4**: Determine the vertical asymptotes. Graph each one using a dashed line.

The only one is the line `x = -3`.

**Step 5**: Determine the horizontal or slant asymptote, if one exists. Graph it using a dashed line. Determine points, if any, where the graph intersects this asymptote, and plot them.

The degree of the numerator is the same as the degree of the denominator. Thus `R` is improper, so it has a horizontal asymptote, which we can find by dividing the dominant terms.

`\cfrac{x}{x} = 1`

The horizontal asymptote is the line `y = 1`.

To see if and/or where the graph crosses the horizontal asymptote, we need to set the function equal to the value of the horiztonal asymptote.

`\eq{\frac{x - 2}{x + 3} &= 1 \\[4pt] x - 2 &= x + 3 \\[4pt] -2 &\neq 3}`

Since this equation has no solution, the graph doesn't cross the horizontal asymptote at all.

**Step 6**: Use the zeroes of both the numerator and denominator to divide the `x`-axis into intervals, and determine whether each interval is above or below the `x`-axis. Plot the points found.

In this case, we can already see where the function must go, since it doesn't cross any of the asymptotes, so we don't really need a table. We can just move on to the next step.

**Step 7**: Use all of these results to draw the graph.

For the horizontal asymptote `y = 0`:

The graph lies below the `x`-axis when `x \lt -3`, as we can see from the point `\par{-5,\cfrac{7}{2}}`. We can draw a little arrow above the `x`-axis off on the left of the graph.

The graph lies above the `x`-axis when `x \gt -3`, so as `x` gets large it approaches the `x`-axis from below. We'll draw a little arrow below the `x`-axis off to the right.

For the vertical asymptote `x = -3`:

Again, the points we've got show us where the arrows need to go.

Now we hook it all up, and...

`R\par{x} = \cfrac{x^3 + 4x^2 + 4x}{x^2 + 2x - 3}`

**Step 1**: Factor the numerator and denominator of `R`. Find the domain of `R`.

`\eq{R\par{x} &= \frac{x^3 + 4x^2 + 4x}{x^2 + 2x - 3} \\[4pt] &= \frac{x \par{x + 2}^2}{\par{x + 3} \par{x - 1}}}`

The domain is `\curl{x \mid x \neq -3, x \neq 1}`.

**Step 2**: Write `R` in lowest terms.

`R` is already in lowest terms.

**Step 3**: Locate the intercepts of the graph, and determine whether the graph crosses or touches the `x`-axis at each `x`-intercept.

The `x`-intercepts are `x = -2` multiplicity `2` and `x = 0`. Thus the graph will touch the `x`-axis at `x = -2`, and cross the `x`-axis at `x = 0` (which is also the `y`-intercept, since `f\par{0} = 0`).

**Step 4**: Determine the vertical asymptotes. Graph each one using a dashed line.

The lines `x = -3` and `x = 1` are vertical asymptotes.

**Step 5**: Determine the horizontal or slant asymptote, if one exists. Graph it using a dashed line. Determine points, if any, where the graph intersects this asymptote, and plot them.

The degree of the numerator is one more than the degree of the denominator. Thus `R` is improper, and there will be an slant asymptote.

`\eq{ \begin{array}{rl} & \begin{array}{rrrr} \phantom{\big)} & \phantom{-(} & x\phantom{^3} & + & 2 \end{array} \\ x^2 + 2x - 3 & \overline{\begin{array}{rrrrrrrrr} \big) & \phantom{-(} & x^3 & + & 4x^2 & + & 4x & \end{array}} \\ & \underline{\begin{array}{rrrrrrr} \phantom{\big)} & -( & x^3 & + & 2x^2 & - & 3x & ) & \end{array}} \\ & \begin{array}{rrrrrrr} \phantom{\big)} & \phantom{-(} & \phantom{x^3} & \phantom{+} & 2x^2 & + & 7x & \end{array} \\ & \underline{\begin{array}{rrrrrrr} \phantom{\big)} & \phantom{x^3} & \phantom{+} & -( & 2x^2 & + & 4x & - & 6 & ) & \end{array}} \\ & \begin{array}{rrrrrrrrr} \phantom{\big)} & \phantom{-(} & \phantom{x^3} & \phantom{+} & \phantom{2x^2} & \phantom{+} & 3x & + & 6 & \end{array} \\ \end{array} }`

Thus we have

`\eq{R\par{x} &= \frac{x^3 + 4x^2 + 4x}{x^2 + 2x - 3} \\[4pt] &= x + 2 + \frac{3x + 6}{x^2 + 2x - 3}}`

The slant asymptote is `y = x + 2`. To see if/where the graph will cross this asymptote, we solve `R\par{x} = x + 2`.

`\eq{x + 2 &= \frac{x^3 + 4x^2 + 4x}{x^2 + 2x - 3} \\[4pt] \par{x + 2} \par{x^2 + 2x - 3} &= x^3 + 4x^2 + 4x \\[4pt] x^3 + 4x^2 + x - 6 &= x^3 + 4x^2 + 4x \\[4pt] x - 6 &= 4x \\[4pt] -6 &= 3x \\[4pt] x &= -2}`

The graph will cross the asymptote at `x = -2`, which happens to be one of the zeroes.

**Step 6**: Use the zeroes of both the numerator and denominator to divide the `x`-axis into intervals, and determine whether each interval is above or below the `x`-axis. Plot the points found.

Interval | `\par{-\infty,-3}` | `\par{-3,-2}` | `\par{-2,0}` | `\par{0,1}` | `\par{1,\infty}` |

`x` | `-4` | `-\cfrac{5}{2}` | `-1` | `\cfrac{1}{2}` | `2` |

`R\par{x}` | `-\cfrac{16}{5}` | `\cfrac{5}{14}` | `\cfrac{1}{4}` | `-\cfrac{25}{14}` | `\cfrac{32}{5}` |

Above/Below | Below | Above | Above | Below | Above |

Point | `\par{-4,-\cfrac{16}{5}}` | `\par{-\cfrac{5}{2},\cfrac{5}{14}}` | `\par{-1,\cfrac{1}{4}}` | `\par{\cfrac{1}{2},-\cfrac{25}{14}}` | `\par{2,\cfrac{32}{5}}` |

**Step 7**: Use all of these results to draw the graph.

For the vertical asymptote `x = -3`:

When `x < -3`, the graph lies below the `x`-axis. We'll draw a down arrow at the bottom of the graph, to the left of `x = -3`.

When `-1 < x < 0`, the graph is above the `x`-axis. We'll draw an up arrow at the top of the graph, to the right of `x = -3`.

For the vertical asymptote `x = 1`:

When `0 < x < 1`, the graph is below the `x`-axis. So a down arrow gets drawn at the bottom, to the left of `x = 1`.

For the slant asymptote `y = x + 2`:

This is a little tougher to figure out. As `x` gets huge, the function will behave like the line `y = x + 2`. We know the graph crosses the slant asymptote in one place, between the two vertical asymptotes.

So to the left of `x = -3`, the graph is either entirely above or entirely below the slant asymptote. From the table in Step 6, we have the point `\par{-4,-\cfrac{16}{5}}`, which tells us the graph is below the asymptote. Thus the graph will approach the asymptote from the left.

Likewise, the point `\par{2,\cfrac{32}{5}}` tells us the portion of the graph to the right of the line `x = 1` is above the slant asymptote, and approaches it from the left.

We hook everything up...

`R\par{x} = \cfrac{2 - x}{\par{x - 1}^2}`

**Step 1**: Factor the numerator and denominator of `R`. Find the domain of `R`.

We can't factor this any further. The domain is `\curl{x \mid x \neq 1}`.

**Step 2**: Write `R` in lowest terms.

`R` is already in lowest terms.

**Step 3**: Locate the intercepts of the graph, and determine whether the graph crosses or touches the `x`-axis at each `x`-intercept.

The only `x`-intercept is `x = 2`, with multiplicity `1`. The graph crosses the `x`-axis here.

`f\par{0} = 2`, thus the `y`-intercept is `y = 2`.

**Step 4**: Determine the vertical asymptotes. Graph each one using a dashed line.

The line `x = 1` is the only vertical asymptote.

**Step 5**: Determine the horizontal or slant asymptote, if one exists. Graph it using a dashed line. Determine points, if any, where the graph intersects this asymptote, and plot them.

The degree of the numerator is less than the degree of the denominator. Thus `R` is proper, so the line `y = 0` is a horizontal asymptote.

Since the horizontal asymptote is the `x`-axis, and we've already found the `x`-intercept, we know the graph crosses the horizontal asymptote at `x = 2`.

**Step 6**: Use the zeroes of both the numerator and denominator to divide the `x`-axis into intervals, and determine whether each interval is above or below the `x`-axis. Plot the points found.

Interval | `\par{-\infty,1}` | `\par{1,2}` | `\par{2,\infty}` |

`x` | `0` | `\cfrac{3}{2}` | `3` |

`R\par{x}` | `2` | `2` | `-\cfrac{1}{4}` |

Above/Below | Above | Above | Below |

Point | `\par{0,2}` | `\par{\cfrac{3}{2},2}` | `\par{3,-\cfrac{1}{4}}` |

**Step 7**: Use all of these results to draw the graph.

For the horizontal asymptote `y = 0`:

The graph lies above the `x`-axis when `x < 1`, so as `x` is going off towards negative infinity, it is approaching the `x`-axis from above. An arrow goes under the `x`-axis off on the left of the graph.

The graph lies below the `x`-axis when `x > 1`, so as `x` gets big it approaches the `x`-axis from below. So we put an arrow below the `x`-axis off to the right.

For the vertical asymptote `x = 1`:

When `x < 1`, the graph is above the `x`-axis. So an up arrow gets drawn at the top, to the left of `x = 1`.

When `1 < x < 2`, the graph is above the `x`-axis, so an up arrow gets drawn to the right of `x = 1` at the top of the graph as well.

And finally, we make a pretty picture out of all of this.

The thing to note here is that this function has a repeated asymptote with multiplicity `2`.

Compare this graph to the previous examples. In those, each vertical asymptote had the graph approaching it in opposite directions - for example, the graph would approach from the left going up into infinity, and approach from the right going down into negative infinity.

With this function, the graph approaches the vertical asymptote from both sides, heading off in the same direction, positive infinity. That's what even multiplicity for asymptotes means.

Thus, if the multiplicity of a vertical asymptote is odd, then the graph approaches said asymptote on either side, going in opposite directions. If the multiplicity of an asymptote is even, the graph approaches the asymptote from either side, going in the same direction.

Find a rational function that might have the graph shown above.

There's no reason to get freaked out about this. Identifying the zeroes and asymptotes will give us everything we need to come up with a function.

First of all, there is a horizontal asymptote, so we know the degrees of the numerator and the denominator must be the same. There are two vertical asymptotes, and one zero with multiplicity `2`. So there we go: degree `2` in the numerator, and degree `2` in the denominator.

The zero is `x = 2`, so the numerator contains `\par{x - 2}^2`. The vertical asymptotes are `x = -4` and `x = 4`, so the denominator is `\par{x + 4} \par{x - 4}`.

One more thing, though. The horizontal asymptote is `y = 3`, so it must be that the quotient of the `x^2` terms, from the numerator and denominator, is `3`. That is,

`\cfrac{3x^2}{x^2} = 3`

Therefore, the numerator contains `3` as well. And so the function is

`R\par{x} = \cfrac{3 \par{x - 2}^2}{\par{x + 4} \par{x - 4}}`

There are other possibilities, but this is the simplest one.