College Algebra

Graphing Rational Functions (Advanced)

Last updated: March 2026 · Advanced
Before you start

You should be comfortable with:

In Asymptote Analysis and Oblique Asymptotes, you learned to find the structural features of rational functions. This page ties everything together into a complete graphing strategy that handles any rational function, no matter how complex.

The Seven-Step Graphing Strategy

For any rational function f(x)=P(x)Q(x)f(x) = \frac{P(x)}{Q(x)}:

  1. Factor numerator and denominator completely
  2. Domain — find all xx-values where the denominator is zero
  3. Holes — cancel common factors, note the coordinates of each hole
  4. Asymptotes — find vertical asymptotes (remaining denominator zeros), horizontal or oblique asymptotes (degree comparison or long division)
  5. Interceptsxx-intercepts (set numerator = 0), yy-intercept (evaluate f(0)f(0))
  6. Sign analysis — build a sign chart using all zeros and asymptotes
  7. Plot and sketch — combine all information, adding test points as needed

Example 1: A Standard Rational Function

Graph f(x)=2xx24f(x) = \frac{2x}{x^2 - 4}.

Step 1 — Factor:

f(x)=2x(x2)(x+2)f(x) = \frac{2x}{(x-2)(x+2)}

No common factors.

Step 2 — Domain: x2x \neq 2 and x2x \neq -2.

Step 3 — Holes: None (no common factors).

Step 4 — Asymptotes:

  • Vertical: x=2x = 2 and x=2x = -2
  • Horizontal: Numerator degree 1, denominator degree 2. Since 1<21 < 2, the horizontal asymptote is y=0y = 0.

Step 5 — Intercepts:

  • xx-intercept: 2x=0    x=02x = 0 \implies x = 0. So (0,0)(0, 0).
  • yy-intercept: f(0)=0f(0) = 0. Same point: (0,0)(0, 0).

Step 6 — Sign analysis:

The critical xx-values are 2-2, 00, and 22. Test one value in each interval:

IntervalTest xxSign of 2x2xSign of (x2)(x-2)Sign of (x+2)(x+2)Sign of f(x)f(x)
(,2)(-\infty, -2)3-3----
(2,0)(-2, 0)1-1--++++
(0,2)(0, 2)11++-++-
(2,)(2, \infty)33++++++++

Step 7 — Sketch: The graph passes through the origin, is negative for x<2x < -2 (approaching y=0y = 0 from below on the far left), positive between 2-2 and 00, negative between 00 and 22, and positive for x>2x > 2.

Example 2: With a Hole

Graph g(x)=x21x2+x2g(x) = \frac{x^2 - 1}{x^2 + x - 2}.

Step 1 — Factor:

g(x)=(x1)(x+1)(x+2)(x1)g(x) = \frac{(x-1)(x+1)}{(x+2)(x-1)}

Step 2 — Domain: x2x \neq -2 and x1x \neq 1.

Step 3 — Holes: Common factor (x1)(x - 1). Hole at x=1x = 1.

Simplified: g(x)=x+1x+2g(x) = \frac{x+1}{x+2}, and g(1)=23g(1) = \frac{2}{3}. Hole at (1,23)(1, \frac{2}{3}).

Step 4 — Asymptotes:

  • Vertical: x=2x = -2 (from the remaining denominator)
  • Horizontal: Degrees equal (both 1 after simplification, or both 2 before — same result). Leading coefficient ratio: 11=1\frac{1}{1} = 1. Horizontal asymptote: y=1y = 1.

Step 5 — Intercepts:

  • xx-intercept: x+1=0    x=1x + 1 = 0 \implies x = -1. So (1,0)(-1, 0).
  • yy-intercept: g(0)=12g(0) = \frac{1}{2}. So (0,12)(0, \frac{1}{2}).

Step 6 — Sign analysis (using simplified form):

IntervalTest xxSign of (x+1)(x+1)Sign of (x+2)(x+2)Sign of g(x)g(x)
(,2)(-\infty, -2)3-3--++
(2,1)(-2, -1)1.5-1.5-++-
(1,)(-1, \infty)00++++++

Step 7 — Sketch: The graph is above y=1y = 1 for x<2x < -2 (approaching from above), dips below the xx-axis between 2-2 and 1-1, crosses the xx-axis at 1-1, passes through (0,12)(0, \frac{1}{2}), and approaches y=1y = 1 from below for large positive xx. There is an open circle at (1,23)(1, \frac{2}{3}).

Example 3: With an Oblique Asymptote

Graph h(x)=x22x3x1h(x) = \frac{x^2 - 2x - 3}{x - 1}.

Step 1 — Factor:

h(x)=(x3)(x+1)x1h(x) = \frac{(x-3)(x+1)}{x-1}

No common factors.

Step 2 — Domain: x1x \neq 1.

Step 3 — Holes: None.

Step 4 — Asymptotes:

  • Vertical: x=1x = 1

  • Oblique: Degree 2 over degree 1. Divide x22x3x^2 - 2x - 3 by x1x - 1:

    Step 1: x2÷x=xx^2 \div x = x. Multiply: x2xx^2 - x. Subtract: x3-x - 3.

    Step 2: x÷x=1-x \div x = -1. Multiply: x+1-x + 1. Subtract: 4-4.

    h(x)=x1+4x1h(x) = x - 1 + \frac{-4}{x - 1}

    Oblique asymptote: y=x1y = x - 1.

Step 5 — Intercepts:

  • xx-intercepts: x=3x = 3 and x=1x = -1. Points: (3,0)(3, 0) and (1,0)(-1, 0).
  • yy-intercept: h(0)=31=3h(0) = \frac{-3}{-1} = 3. Point: (0,3)(0, 3).

Step 6 — Sign analysis:

IntervalTest xx(x3)(x-3)(x+1)(x+1)(x1)(x-1)h(x)h(x)
(,1)(-\infty, -1)2-2----
(1,1)(-1, 1)00-++-++
(1,3)(1, 3)22-++++-
(3,)(3, \infty)44++++++++

Step 7 — Sketch: The curve crosses the xx-axis at 1-1 and 33, passes through (0,3)(0, 3), has a vertical asymptote at x=1x = 1 (going to ++\infty from the left and -\infty from the right), and approaches the oblique asymptote y=x1y = x - 1 for large x|x|.

Graph of h(x)=x22x3x1h(x) = \frac{x^2 - 2x - 3}{x - 1} with Oblique Asymptote

12345-1-2-3-41234-1-2-3x = 1y = x - 1(-1, 0)(3, 0)(0, 3)

Example 4: Higher Complexity

Graph r(x)=3(x+1)(x2)(x+3)(x1)2r(x) = \frac{3(x+1)(x-2)}{(x+3)(x-1)^2}.

This function is already factored. Let us apply each step.

Domain: x3x \neq -3 and x1x \neq 1.

Holes: No common factors. No holes.

Asymptotes:

  • Vertical: x=3x = -3 (odd multiplicity, opposite directions) and x=1x = 1 (even multiplicity, same direction)
  • Horizontal: Numerator degree 2, denominator degree 3. Since 2<32 < 3, horizontal asymptote is y=0y = 0.

Intercepts:

  • xx-intercepts: x=1x = -1 and x=2x = 2
  • yy-intercept: r(0)=3(1)(2)(3)(1)=63=2r(0) = \frac{3(1)(-2)}{(3)(1)} = \frac{-6}{3} = -2

Sign analysis:

Critical values: 3,1,1,2-3, -1, 1, 2

Interval33(x+1)(x+1)(x2)(x-2)(x+3)(x+3)(x1)2(x-1)^2r(x)r(x)
(,3)(-\infty,-3)++---++-
(3,1)(-3,-1)++--++++++
(1,1)(-1,1)++++-++++-
(1,2)(1,2)++++-++++-
(2,)(2,\infty)++++++++++++

Notice that the sign does not change at x=1x = 1 — because (x1)2(x-1)^2 is always positive. This confirms even-multiplicity behavior: the function stays negative on both sides of x=1x = 1.

Behavior near x=3x = -3: Odd multiplicity, sign changes from - to ++ — the function goes from -\infty to ++\infty.

Behavior near x=1x = 1: Even multiplicity, sign stays - — the function goes to -\infty on both sides.

Common Graphing Mistakes

  1. Forgetting to cancel before finding vertical asymptotes. Always factor and cancel first. A zero that cancels is a hole, not an asymptote.

  2. Drawing the curve crossing a vertical asymptote. The graph never crosses a vertical asymptote — the function is undefined there.

  3. Assuming the graph cannot cross a horizontal asymptote. It can and often does in its interior. Only the end behavior follows the horizontal asymptote.

  4. Ignoring multiplicity. Even and odd multiplicities in the denominator produce different graphical behaviors. Always check.

  5. Skipping sign analysis. Without sign analysis, you cannot determine which direction the curve approaches each asymptote. A sign chart takes two minutes and prevents major errors.

Real-World Application: Lens Optics

The thin lens equation in optics is:

1f=1do+1di\frac{1}{f} = \frac{1}{d_o} + \frac{1}{d_i}

Solving for image distance did_i as a function of object distance dod_o:

di=fdodofd_i = \frac{f \cdot d_o}{d_o - f}

This is a rational function of dod_o with a vertical asymptote at do=fd_o = f (when the object is at the focal point, the image is at infinity) and a horizontal asymptote at di=fd_i = f (as the object moves far away, the image approaches the focal point). Engineers use this to design camera systems, telescopes, and projectors.

Practice Problems

Test your understanding with these problems. Click to reveal each answer.

Problem 1: Graph f(x)=x+2x24f(x) = \frac{x+2}{x^2-4} by identifying all features.

Factor: f(x)=x+2(x2)(x+2)=1x2f(x) = \frac{x+2}{(x-2)(x+2)} = \frac{1}{x-2}, with hole at x=2x = -2.

Hole: y=122=14y = \frac{1}{-2-2} = -\frac{1}{4}. Hole at (2,14)(-2, -\frac{1}{4}).

Vertical asymptote: x=2x = 2. Horizontal asymptote: y=0y = 0.

No xx-intercept (numerator is constant 1). yy-intercept: f(0)=12=12f(0) = \frac{1}{-2} = -\frac{1}{2}.

Sign: negative for x<2x < 2, positive for x>2x > 2.

Answer: The simplified function is 1x2\frac{1}{x-2} with a hole at (2,14)(-2, -\frac{1}{4}), vertical asymptote x=2x = 2, horizontal asymptote y=0y = 0, and yy-intercept (0,12)(0, -\frac{1}{2}).

Problem 2: Identify all asymptotes of g(x)=x3+xx21g(x) = \frac{x^3 + x}{x^2 - 1} and determine the type of end behavior.

Factor: g(x)=x(x2+1)(x1)(x+1)g(x) = \frac{x(x^2 + 1)}{(x-1)(x+1)}

No common factors. Vertical asymptotes: x=1x = 1 and x=1x = -1.

Degree of numerator (3) minus degree of denominator (2) = 1. Oblique asymptote exists.

Divide: x3+x÷(x21)x^3 + x \div (x^2 - 1):

x3÷x2=xx^3 \div x^2 = x. Multiply: x3xx^3 - x. Subtract: 2x2x.

g(x)=x+2xx21g(x) = x + \frac{2x}{x^2 - 1}

Answer: Vertical asymptotes at x=1x = 1 and x=1x = -1, oblique asymptote y=xy = x.

Problem 3: Complete a sign chart for f(x)=(x3)(x+1)(x1)(x+4)f(x) = \frac{(x-3)(x+1)}{(x-1)(x+4)} and list the intervals where f(x)>0f(x) > 0.

Critical values: 4,1,1,3-4, -1, 1, 3

Interval(x3)(x-3)(x+1)(x+1)(x1)(x-1)(x+4)(x+4)f(x)f(x)
(,4)(-\infty, -4)----++
(4,1)(-4, -1)---++-
(1,1)(-1, 1)-++-++++
(1,3)(1, 3)-++++++-
(3,)(3, \infty)++++++++++

Answer: f(x)>0f(x) > 0 on (,4)(1,1)(3,)(-\infty, -4) \cup (-1, 1) \cup (3, \infty).

Problem 4: A function has vertical asymptotes at x=1x = -1 and x=3x = 3, an xx-intercept at x=0x = 0, a horizontal asymptote at y=2y = 2, and no holes. Write a possible formula.

Vertical asymptotes at x=1x = -1 and x=3x = 3: denominator has (x+1)(x3)(x+1)(x-3).

xx-intercept at x=0x = 0: numerator has factor xx.

Horizontal asymptote y=2y = 2: numerator and denominator have equal degree, with leading coefficient ratio 2.

Since the denominator is degree 2, the numerator must also be degree 2. We need another factor with xx: use 2x(xa)2x \cdot (x - a) for some aa. But we only want the one xx-intercept at x=0x = 0. We can use 2x22x^2 as the numerator (double root at x=0x = 0) or add another zero. Simplest:

f(x)=2x2(x+1)(x3)f(x) = \frac{2x^2}{(x+1)(x-3)}

Answer: f(x)=2x2(x+1)(x3)f(x) = \frac{2x^2}{(x+1)(x-3)} is one valid answer.

Problem 5: A camera lens has focal length f=50f = 50 mm. Using di=50dodo50d_i = \frac{50 \cdot d_o}{d_o - 50}, find the image distance when the object is 200 mm away and describe what happens as the object approaches the focal point.

At do=200d_o = 200:

di=50×20020050=10000150=66.7 mmd_i = \frac{50 \times 200}{200 - 50} = \frac{10000}{150} = 66.7 \text{ mm}

As do50+d_o \to 50^+, the denominator 0+\to 0^+ and the numerator 2500\to 2500, so di+d_i \to +\infty.

Answer: The image distance is approximately 66.7 mm. As the object approaches the focal point (50 mm), the image distance grows without bound — this is the vertical asymptote of the rational function.

Key Takeaways

  • The seven-step strategy (factor, domain, holes, asymptotes, intercepts, sign analysis, sketch) handles any rational function systematically
  • Sign analysis is essential — it tells you which direction the curve approaches each asymptote and which intervals are positive or negative
  • Even multiplicity in the denominator means the function approaches the same direction on both sides; odd multiplicity means opposite directions
  • Always factor and cancel first before looking for vertical asymptotes — cancelled factors produce holes, not asymptotes
  • The strategy combines everything from Asymptote Analysis and Oblique Asymptotes

Return to College Algebra for more topics in this section.

Last updated: March 29, 2026