Precalculus Precalculus Rational Functions Explained Simply

I'm hitting a wall with rational functions in my Precalculus class. My teacher explained it, but I'm still not totally getting how to find the asymptotes or even what the domain really means for these. Could someone break it down super simply for me, like I'm just starting out with them?

1 Answers

✓ Best Answer

Rational Functions: The Basics ➗

A rational function is simply a function that can be written as a ratio of two polynomials. Mathematically, it looks like this:

$f(x) = \frac{P(x)}{Q(x)}$

Where $P(x)$ and $Q(x)$ are both polynomials, and importantly, $Q(x) \neq 0$. The domain of a rational function excludes any values of $x$ that make the denominator zero.

Finding Asymptotes 📈

Asymptotes are lines that the graph of the rational function approaches but never quite touches. There are three main types:

1. Vertical Asymptotes ⬆️

Vertical asymptotes occur where the denominator $Q(x)$ equals zero, provided that the numerator $P(x)$ is not also zero at that point. To find them:

  1. Set the denominator equal to zero: $Q(x) = 0$
  2. Solve for $x$. The solutions are the vertical asymptotes.

Example:

Consider the function $f(x) = \frac{1}{x-2}$. Setting the denominator to zero gives $x-2 = 0$, so $x = 2$ is a vertical asymptote.

2. Horizontal Asymptotes ↔️

Horizontal asymptotes describe the behavior of the function as $x$ approaches positive or negative infinity. To find them, compare the degrees of the numerator and denominator polynomials:

  • If degree(P(x)) < degree(Q(x)): The horizontal asymptote is $y = 0$.
  • If degree(P(x)) = degree(Q(x)): The horizontal asymptote is $y = \frac{\text{leading coefficient of } P(x)}{\text{leading coefficient of } Q(x)}$.
  • If degree(P(x)) > degree(Q(x)): There is no horizontal asymptote (but there may be a slant asymptote).

Examples:

  • $f(x) = \frac{x}{x^2 + 1}$: degree(numerator) < degree(denominator), so $y = 0$ is the horizontal asymptote.
  • $f(x) = \frac{3x^2}{2x^2 + 5}$: degree(numerator) = degree(denominator), so $y = \frac{3}{2}$ is the horizontal asymptote.

3. Slant (Oblique) Asymptotes ↘️

Slant asymptotes occur when the degree of the numerator is exactly one greater than the degree of the denominator. To find them, perform polynomial long division.

Example:

Consider $f(x) = \frac{x^2 + 1}{x}$. Dividing $x^2 + 1$ by $x$ gives $x + \frac{1}{x}$. As $x$ becomes very large, $\frac{1}{x}$ approaches zero, so the slant asymptote is $y = x$.

Graphing Rational Functions ✍️

Here's a step-by-step guide to graphing rational functions:

  1. Find the asymptotes: Vertical, horizontal, and slant.
  2. Find the intercepts:
    • x-intercepts: Set $P(x) = 0$ and solve for $x$.
    • y-intercept: Evaluate $f(0)$.
  3. Create a sign chart: Determine the intervals where the function is positive or negative.
  4. Plot points: Choose additional $x$ values in each interval to get a better sense of the graph's shape.
  5. Sketch the graph: Draw the asymptotes as dashed lines, plot the intercepts and additional points, and connect the points, approaching the asymptotes but never crossing them (unless there's a specific reason, like the graph crossing a horizontal asymptote near the origin).

Example Graph 📊

Let's graph $f(x) = \frac{x+1}{x-2}$:

  1. Vertical asymptote: $x = 2$
  2. Horizontal asymptote: $y = 1$ (since the degrees of the numerator and denominator are equal)
  3. x-intercept: $x = -1$ (set $x+1 = 0$)
  4. y-intercept: $f(0) = \frac{0+1}{0-2} = -\frac{1}{2}$

By analyzing the sign chart and plotting a few additional points, you can sketch the graph, which approaches the asymptotes $x = 2$ and $y = 1$.

Code Example 💻

Here's how you can use Python with Matplotlib to plot a rational function:

import numpy as np
import matplotlib.pyplot as plt

def rational_function(x):
    return (x + 1) / (x - 2)

x = np.linspace(-5, 7, 400)
y = rational_function(x)

# Exclude the vertical asymptote from the plot
y[np.abs(x - 2) < 0.05] = np.nan

plt.figure(figsize=(8, 6))
plt.plot(x, y, label='$f(x) = \\frac{x+1}{x-2}$')
plt.axvline(x=2, color='r', linestyle='--', label='Vertical Asymptote $x=2$')
plt.axhline(y=1, color='g', linestyle='--', label='Horizontal Asymptote $y=1$')
plt.xlabel('x')
plt.ylabel('f(x)')
plt.title('Graph of Rational Function')
plt.legend()
plt.grid(True)
plt.ylim(-10, 10)  # Limit y-axis for better visualization
plt.show()

Know the answer? Login to help.