Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Recipe

Graph a rational function

Use when: you're given f(x) = p(x)/q(x) and asked to sketch or fully describe its graph

Goal: a complete graph: every hole, every asymptote, both intercepts, and the correct sign in every region

Taught in Asymptotes, holes, and graphs of rational functions

  1. 1

    Factor the numerator and denominator completely. The domain excludes every zero of the denominator, before anything gets cancelled.

    Example

    f(x) = \dfrac{x^2-4}{x^2-x-2} = \dfrac{(x-2)(x+2)}{(x-2)(x+1)}: the denominator is zero at x=2 and x=-1, so both are excluded from the domain immediately.

    Why: The domain is decided by the original denominator, exactly as this chapter's opening section established — cancelling later can't undo it.

  2. 2

    Cancel any factor shared by the numerator and denominator. A factor that cancels completely leaves a hole: still excluded from the domain, but the graph merely skips that one point instead of blowing up. A factor that survives in the denominator is a vertical asymptote.

    Example

    (x-2) cancels completely, leaving \dfrac{x+2}{x+1}: x=2 is a hole. (x+1) has no partner upstairs, so x=-1 is a vertical asymptote.

    • The shared factor cancels completely — mark that x-value as a hole.
    • The factor survives in the denominator — mark that x-value as a vertical asymptote.

    Why: The same-looking "denominator zero" hides two very different behaviors, and the cancellation test is the only way to tell them apart.

  3. 3

    Compare the numerator's degree n to the denominator's degree m. Bottom heavier (n<m) gives y=0; equal degrees give the ratio of leading coefficients; top heavier by exactly one gives a slant asymptote from polynomial division; top heavier by more than one gives neither.

    Example

    Both x^2-4 and x^2-x-2 have degree 2, an even match, so the horizontal asymptote is the ratio of leading coefficients: y = \frac{1}{1} = 1.

    Why: This is the same tug-of-war comparison from earlier in this section — only the two heavyweight terms decide what happens far from the origin.

  4. 4

    The y-intercept is f(0). The x-intercepts are the zeros of the reduced numerator that are still in the domain, a zero that got cancelled away in Step 2 is the hole, not a crossing.

    Example

    f(0) = \dfrac{-4}{-2} = 2, so the y-intercept is (0,2). The numerator's zeros are x=\pm2, but x=2 is the hole from Step 2, so only x=-2 survives as a genuine x-intercept.

    Why: An intercept has to be an actual point on the graph, and the hole disqualifies x=2 even though it makes the numerator zero.

  5. 5

    The vertical asymptote(s) and the zero(s) split the domain into regions. Test one point per region to find its sign, then draw each piece hugging its asymptotes, passing through the intercepts, and leaving an open circle at every hole.

    Example

    Regions here: (-\infty,-2), (-2,-1), and (-1,2)\cup(2,\infty). Testing x=-3,-1.5,0 gives signs +,-,+; testing x=3 confirms the last region stays positive on both sides of the hole at \left(2,\frac43\right).

    Why: The sign in each region, plus the two asymptotes and the hole, is everything needed to draw the graph without plotting dozens of points.

Common mistakes

  • Cancelling a factor and forgetting the cancelled value is still excluded from the domain: a hole is still a hole, not a free pass back in.
  • Listing every zero of the reduced numerator as an x-intercept without checking whether one of them is actually the hole from Step 2.
  • Comparing coefficient size instead of degree when finding the horizontal asymptote. Degree decides it, exactly like end behavior earlier in this course.
  • Forgetting the open circle at a hole in the final sketch, so the curve looks unbroken where it should have a gap.