Topic · Precalculus

Polynomial and Rational Functions

Polynomials and ratios of polynomials, seen as functions rather than expressions to manipulate. Read end behavior off the leading term; locate zeros and decide whether the graph crosses or touches at each; spot vertical asymptotes, holes, and the long-run height a rational curve drifts toward. The whole sketch falls out of the factored form.

What you'll leave with

  • How degree and leading coefficient fix a polynomial's end behavior at a glance.
  • The crossing-vs-touching rule at zeros, governed entirely by multiplicity.
  • A reliable recipe for sketching any polynomial from its factored form.
  • How to find a rational function's domain, vertical asymptotes, holes, and the horizontal or slant asymptote — by comparing degrees of numerator and denominator.
  • A full worked sketch of one polynomial and one rational function, end to end.

1. Polynomials as functions

You already know how to add, multiply, and factor polynomials. Promoting one to a function means asking a different question: what does its graph look like?

Polynomial function

A function $P \colon \mathbb{R} \to \mathbb{R}$ of the form $$ P(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_1 x + a_0, $$ where $a_n \neq 0$. The integer $n$ is the degree; $a_n$ is the leading coefficient; $a_0$ is the constant term.

Polynomial graphs are smooth, unbroken curves — no jumps, no asymptotes, no corners. The whole shape is controlled by two coarse features (degree and leading coefficient, which fix what happens far from the origin) and one fine feature (the zeros and their multiplicities, which fix what happens near the $x$-axis). Everything in between is a smooth interpolation.

A polynomial of degree $n$ has at most $n - 1$ turning points — places where the graph changes from rising to falling or vice versa. A cubic has at most 2; a quartic, 3. That cap is a hard upper bound; the actual count can be less.

2. End behavior from the leading term

Far from the origin, the leading term $a_n x^n$ swamps every other term. Once $|x|$ is large enough, $a_n x^n$ is dominant by orders of magnitude — so the polynomial's behavior as $x \to \pm\infty$ is dictated entirely by the leading term's sign and the parity of $n$.

Leading coefficientDegreeAs $x \to -\infty$As $x \to +\infty$Looks like
$a_n > 0$even$+\infty$$+\infty$U (both up)
$a_n > 0$odd$-\infty$$+\infty$bottom-left to top-right
$a_n < 0$even$-\infty$$-\infty$∩ (both down)
$a_n < 0$odd$+\infty$$-\infty$top-left to bottom-right
Memory aid

Imagine the simplest polynomial of that shape: $x^2$, $x^3$, $-x^2$, $-x^3$. They show the four end-behavior patterns directly. Every higher-degree polynomial with the same parity and leading sign matches one of these at the edges.

3. Zeros and multiplicity

A zero (or root) of $P$ is a value $c$ with $P(c) = 0$ — geometrically, an $x$-intercept of the graph. When you've factored $P$ completely, the zeros are read off directly:

$$ P(x) = a_n (x - r_1)^{m_1} (x - r_2)^{m_2} \cdots (x - r_k)^{m_k}. $$

The integer $m_i$ is the multiplicity of the zero $r_i$ — how many times that factor appears. The multiplicities sum to $n$, the degree (counting non-real conjugate pairs over $\mathbb{C}$).

Multiplicity controls exactly one thing about the graph at that zero: whether the curve crosses the $x$-axis or merely touches it.

Crossing-vs-touching rule

At a zero $r$ of multiplicity $m$:

  • $m$ odd — graph crosses the $x$-axis at $r$. Sign of $P$ changes.
  • $m$ even — graph touches and bounces back. Sign of $P$ is the same on both sides.
  • Larger $m$ — the graph is flatter near $r$. A double zero looks like a parabola's vertex; a triple zero looks like $x^3$'s inflection.

That single rule, combined with end behavior, is enough to sketch most polynomials by hand. You walk along the $x$-axis from left to right, and at each zero you decide: cross, or bounce?

Why it works

Near a zero $r$ of multiplicity $m$, the polynomial behaves like $C(x - r)^m$ for some constant $C$ — every other factor is approximately constant there. The local picture is a vertical scaling of $x^m$. Odd powers change sign through $0$; even powers don't. The graph inherits that behavior exactly.

4. Sketching a polynomial — worked example

Consider

$$ P(x) = (x + 2)(x - 1)^2 (x - 3). $$

That's already in factored form, so the analysis is direct:

  • Degree: $1 + 2 + 1 = 4$ (quartic). At most $3$ turning points.
  • Leading coefficient: Multiplying out, the leading term is $x \cdot x^2 \cdot x = x^4$ — positive coefficient, even degree. Both ends rise to $+\infty$.
  • Zeros: $x = -2$ (multiplicity 1, crosses), $x = 1$ (multiplicity 2, touches), $x = 3$ (multiplicity 1, crosses).
  • $y$-intercept: $P(0) = (2)(-1)^2(-3) = -6$.

Now walk left-to-right. Coming in from $x = -\infty$, the graph is high up. It descends and crosses the $x$-axis at $x = -2$. It must reach a local minimum somewhere in $(-2, 1)$ — the $y$-intercept gives us one anchor: $(0, -6)$. The graph rises back up but only as far as the $x$-axis at $x = 1$, where it touches and turns back down (multiplicity 2). It heads to another local minimum in $(1, 3)$, then rises and crosses at $x = 3$, climbing to $+\infty$.

x = −2 (crosses, m=1) x = 1 (touches, m=2) x = 3 (crosses, m=1) y-int (0, −6) −3.5 −2.5 −1.5 −0.5 0.5 1.5 2.5 3.5 4.5 15 10 5 −5 −10 −15 P(x) = (x+2)(x−1)²(x−3) degree 4, positive leading — both ends rise

The quartic crosses the axis at $-2$ and $3$, but only touches at $1$ because the factor $(x-1)$ has multiplicity 2.

Notice how the touching zero at $x = 1$ acts like a local maximum that just kisses the axis. If the multiplicity had been $1$ instead of $2$, the curve would have crossed there and looked completely different — a third sign change, with a deeper bowl somewhere between $1$ and $3$ and no extra turning point.

5. Rational functions and their domain

Rational function

A function of the form $f(x) = \dfrac{p(x)}{q(x)}$ where $p$ and $q$ are polynomials and $q$ is not the zero polynomial. Its domain is every real $x$ except the zeros of $q$.

Rational graphs look qualitatively different from polynomials. A polynomial is continuous and smooth everywhere; a rational function can break. Wherever $q(x) = 0$, the function is undefined — and depending on whether $p$ also vanishes there, the break is either a vertical asymptote (the graph shoots to $\pm\infty$) or a hole (a single missing point).

And rationals can flatten out at the edges. For polynomials, the graph always escapes to $\pm\infty$ as $x \to \pm\infty$. For rationals it might instead approach a horizontal asymptote, hugging a fixed height in the long run.

Three structural features, then, determine the shape: where the function blows up (vertical asymptotes), where it has a missing point (holes), and what it approaches far away (horizontal or slant asymptote).

6. Vertical, horizontal, and slant asymptotes

Vertical asymptotes

Factor $p$ and $q$, and cancel any common factors. After cancellation, a vertical asymptote at $x = c$ is a zero of $q$ that is not cancelled by a corresponding zero of $p$. Near a vertical asymptote, $|f(x)| \to \infty$.

Whether the function goes to $+\infty$ or $-\infty$ on each side of the asymptote depends on the sign of $f$ in the surrounding intervals. A sign check immediately to the left and right of $c$ settles it.

Horizontal and slant asymptotes

Far from the origin, the leading terms of $p$ and $q$ dominate — every lower-order term becomes negligible. So $f(x) \sim (a_m / b_n) \, x^{m - n}$ for large $|x|$, where $m = \deg p$, $n = \deg q$, and $a_m, b_n$ are the leading coefficients. Three cases:

Compare degreesLong-run behaviorAsymptote
$\deg p < \deg q$ $f(x) \to 0$ Horizontal: $y = 0$
$\deg p = \deg q$ $f(x) \to a_m / b_n$ Horizontal: $y = a_m / b_n$
$\deg p = \deg q + 1$ $f(x) \sim (\text{linear})$ Slant (oblique): line, found by polynomial division
$\deg p \geq \deg q + 2$ $f(x) \sim (\text{higher polynomial})$ No straight asymptote; a curvilinear one (parabola, etc.)

To find a slant asymptote when $\deg p = \deg q + 1$, polynomial-divide $p$ by $q$:

$$ f(x) = \frac{p(x)}{q(x)} = (\text{linear quotient}) + \frac{\text{remainder}}{q(x)}. $$

The remainder term shrinks to zero as $|x| \to \infty$, so $f$ approaches the linear quotient. That line is the slant asymptote.

A horizontal and a slant don't coexist

If a rational has a slant asymptote, it has no horizontal asymptote (and vice versa). They're mutually exclusive long-run behaviors — the function either flattens out or grows linearly.

7. Holes: when a factor cancels

If $p$ and $q$ share a factor $(x - c)$, then $c$ is in the zero set of both. The function is undefined at $c$ — division by zero is still illegal — but the limit as $x \to c$ exists and is finite. The graph has a single missing point: a hole at $(c, \, L)$ where $L$ is the value of the cancelled expression at $c$.

Concretely: $\dfrac{(x - 2)(x + 3)}{(x - 2)(x + 5)}$. Cancel the $(x - 2)$ factor and you get $\dfrac{x + 3}{x + 5}$. The original function is undefined at $x = 2$, but the simplified one isn't — at $x = 2$ it would give $5/7$. So the graph looks exactly like that of $\dfrac{x + 3}{x + 5}$, but with a single hole punched at $(2, \, 5/7)$.

Vertical asymptote vs hole

Both occur at zeros of $q$. The difference: a hole's zero also appears in $p$ (the factor cancels); a vertical asymptote's doesn't. Always factor and cancel before classifying. The graph cares about the simplified form everywhere except the cancelled point itself.

If a factor cancels with different multiplicities — say $(x - c)$ appears once in $p$ and twice in $q$ — then one $(x - c)$ cancels and one remains in the denominator. The result: a vertical asymptote at $c$, not a hole. The factor must cancel at least as many times in $p$ as in $q$ for the break to be removable.

8. Sketching a rational function — worked example

Consider

$$ f(x) = \frac{(x + 1)(x - 2)}{(x + 2)(x - 3)}. $$

Factor check: no common factors between numerator and denominator. So no holes — every denominator zero is a true vertical asymptote.

  • Domain: all $x$ except $x = -2$ and $x = 3$.
  • Vertical asymptotes: $x = -2$ and $x = 3$.
  • $x$-intercepts: numerator zeros at $x = -1$ and $x = 2$, both surviving (denominator nonzero there). So $(-1, 0)$ and $(2, 0)$.
  • $y$-intercept: $f(0) = \dfrac{(1)(-2)}{(2)(-3)} = \dfrac{-2}{-6} = \dfrac{1}{3}$.
  • Degrees: $\deg p = \deg q = 2$, leading coefficients both $1$. Horizontal asymptote $y = 1$.

Now sign analysis. Critical points (where numerator or denominator vanishes) split the line into five intervals: $(-\infty, -2)$, $(-2, -1)$, $(-1, 2)$, $(2, 3)$, $(3, \infty)$. Pick a test point in each:

IntervalTestSign of $f$
$(-\infty, -2)$$x = -3$: $\dfrac{(-2)(-5)}{(-1)(-6)} = \dfrac{10}{6}$positive
$(-2, -1)$$x = -1.5$: $\dfrac{(-0.5)(-3.5)}{(0.5)(-4.5)} = \dfrac{1.75}{-2.25}$negative
$(-1, 2)$$x = 0$: $\dfrac{1}{3}$positive
$(2, 3)$$x = 2.5$: $\dfrac{(3.5)(0.5)}{(4.5)(-0.5)} = \dfrac{1.75}{-2.25}$negative
$(3, \infty)$$x = 4$: $\dfrac{(5)(2)}{(6)(1)} = \dfrac{10}{6}$positive

That's everything we need. From the left, the curve comes in along $y = 1$ from above (positive, just over $1$ for large $|x|$), descends, and rockets to $+\infty$ as $x \to -2^{-}$. On the other side of that asymptote it returns from $-\infty$, crosses the $x$-axis at $-1$, rises through the $y$-intercept at $1/3$, crosses again at $x = 2$, then dives to $-\infty$ as $x \to 3^{-}$. On the far side, it returns from $+\infty$ and settles back down to the horizontal asymptote $y = 1$ from above.

x = −2 x = 3 y = 1 (HA) (−1, 0) (2, 0) (0, ⅓) −6 −4 −2 2 4 6 6 3 1 −3 −6 f(x) = (x+1)(x−2) / [(x+2)(x−3)] VAs at x = −2, 3 · HA at y = 1 · no holes

Three branches separated by the two vertical asymptotes. All three settle onto the horizontal asymptote $y = 1$ as $|x|$ grows.

Sanity check

The horizontal asymptote tells you the long-run height, but the function can cross it in the middle of the graph — it's only a long-run constraint. (Vertical asymptotes, by contrast, are walls: the graph never crosses them.) In the middle branch above, the curve stays well below $y = 1$; in the outer branches it sits just above.

9. Common pitfalls

Reading end behavior off the wrong term

End behavior is set by the leading term only. Once $|x|$ is large, lower-degree terms are negligible. Don't let a big constant or a flashy middle coefficient distract you — only $a_n x^n$ matters at the edges.

Confusing crossing and touching

A zero with even multiplicity does not cross the $x$-axis. It's the most common sketching mistake: drawing a polynomial that changes sign at every zero, ignoring multiplicities. Always check multiplicity before deciding which side of the axis the curve is on after the zero.

Misclassifying a hole as a vertical asymptote

Always factor numerator and denominator first and cancel common factors. Only then are the remaining denominator zeros vertical asymptotes; the cancelled ones are holes. Forgetting to cancel produces an asymptote that isn't there.

"Equal degrees, so no horizontal asymptote"

Not true. Equal degrees mean the horizontal asymptote is the ratio of leading coefficients, not zero and not "none." Lower numerator degree gives $y = 0$; equal gives a nonzero horizontal; higher by one gives a slant; higher by two or more gives a curvilinear asymptote.

Treating a horizontal asymptote as a wall

Vertical asymptotes are walls — the function never crosses them, because the function isn't defined there. Horizontal asymptotes are not walls. They describe the long-run trend, and a rational function is free to cross its horizontal asymptote in the middle of the graph. The asymptote only constrains $\lim_{x \to \pm\infty} f(x)$.

10. Worked examples

Try each one yourself before opening the solution.

Example 1 · End behavior of $-3x^5 + 7x^3 - x + 4$

Leading term $-3x^5$. Coefficient negative, degree odd. As $x \to -\infty$, $-3x^5 \to +\infty$; as $x \to +\infty$, $-3x^5 \to -\infty$. The graph comes in from the top-left and exits to the bottom-right — the "top-left to bottom-right" pattern.

Example 2 · Sketch $P(x) = -(x + 1)(x - 2)^2$

Degree: $3$. Leading coefficient: $-1$. Odd degree, negative leading: comes from top-left, exits bottom-right.

Zeros: $x = -1$ (simple, crosses), $x = 2$ (double, touches).

$y$-intercept: $P(0) = -(1)(4) = -4$.

Sketch: graph descends from $+\infty$ on the left, crosses down through $(-1, 0)$, continues down through $(0, -4)$, reaches a local minimum, rises to touch the $x$-axis at $(2, 0)$ without crossing (multiplicity 2), then descends to $-\infty$.

Example 3 · Asymptotes of $\dfrac{2x^2 + 3}{x^2 - 4}$

Factor the denominator: $x^2 - 4 = (x-2)(x+2)$. Numerator $2x^2 + 3$ has no real zeros (discriminant negative). No common factors, so no holes.

Vertical asymptotes: $x = 2$ and $x = -2$.

Horizontal asymptote: degrees equal (both $2$), leading coefficients $2$ and $1$. So $y = 2$.

$x$-intercepts: none — numerator never zero. $y$-intercept: $f(0) = 3 / (-4) = -3/4$.

Example 4 · Hole or asymptote? $g(x) = \dfrac{x^2 - 4}{x - 2}$

Factor the numerator: $x^2 - 4 = (x - 2)(x + 2)$. Cancel $(x - 2)$ to get $g(x) = x + 2$ for $x \neq 2$.

The graph is the line $y = x + 2$ with a single hole at $(2, 4)$ — undefined at $x = 2$ but the limit exists and equals $4$. No vertical asymptote.

Example 5 · Slant asymptote of $h(x) = \dfrac{x^2 - 3x + 5}{x - 1}$

Numerator degree $2$, denominator degree $1$ — differ by one. Polynomial-divide:

$$ \frac{x^2 - 3x + 5}{x - 1} = (x - 2) + \frac{3}{x - 1}. $$

The remainder term $3/(x - 1)$ vanishes as $|x| \to \infty$, so $h$ approaches the line $y = x - 2$. That's the slant asymptote.

There's also a vertical asymptote at $x = 1$ (denominator zero, not cancelled by the numerator since $1^2 - 3(1) + 5 = 3 \neq 0$).

Example 6 · Build a polynomial from zeros

Find a polynomial of minimum degree with zeros $x = 0$ (multiplicity 1), $x = 2$ (multiplicity 2), $x = -3$ (multiplicity 1), and positive leading coefficient.

Multiply the factors:

$$ P(x) = x \, (x - 2)^2 \, (x + 3). $$

Minimum degree is $1 + 2 + 1 = 4$. Expanding is optional — the factored form is usually more useful for sketching. End behavior: degree $4$, positive leading, both ends rise to $+\infty$.

Sources & further reading

The treatment above is synthesized from established precalculus references. When something here reads ambiguously, the primary sources are the ground truth.

Test your understanding

A quiz that builds from easy to hard. Pick an answer to get instant feedback and a worked explanation. Your progress is saved in this browser — come back anytime to continue.

Question 1 of 24
0 correct