📘 CodingMarble Learn

Rational Functions: Graphs, Asymptotes and Sketching

A rational function is one polynomial divided by another, like y = (2x + 1)/(x − 1). It is not defined where the bottom is zero. Near those x-values the graph shoots up or down along a vertical asymptote. Far out, it settles near a horizontal (or slant) asymptote. Find domain, asymptotes, intercepts and holes, then sketch.

🎬 Step-by-step story

  1. Start with y = 1/x. When x grows, y shrinks. The graph has two separate branches. x = 0 is not allowed.
  2. Watch the dot move toward x = 0. y gets huge. The red line x = 0 is a vertical asymptote.
  3. Now the dot runs far right. y gets close to 0 but never reaches it. The blue line y = 0 is a horizontal asymptote.
  4. y = 1/(x − 2) + 1 is the same curve moved 2 right and 1 up. The asymptotes move too.
  5. Worked example: y = (2x + 1)/(x − 1). Bottom = 0 gives x = 1. Top and bottom x-numbers give y = 2. Intercepts at x = −½ and y = −1.
  6. Try it: change a, b, c and d. Guess the asymptotes first, then check the lines.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Why can the graph never touch the vertical asymptote?

At that x the bottom is 0, and dividing by 0 has no answer. The dot in step 1 gets closer but y just grows.

Can the graph cross the horizontal asymptote?

Yes, in the middle part it can. The HA only describes far-away behaviour, as the running dot in step 2 shows.

How do I find the HA quickly?

If top and bottom have the same degree, divide their leading numbers. Step 4: 2x over x gives y = 2.

What do h and k do in a/(x − h) + k?

h moves the graph and its VA right; k moves it and its HA up. See step 3.

Why are there two separate branches?

The VA cuts the domain into two parts, so the graph comes in two pieces. Step 0.

What happens if top and bottom cancel completely?

Try a = 2, b = 2, c = 1, d = 1 in step 5: you get a flat line with a hole, not a hyperbola.

What is a rational function?

A rational function is f(x) = P(x)/Q(x), where P and Q are polynomials and Q is not the zero polynomial. "Rational" comes from "ratio".

Simple examples: y = 1/x, y = 3/(x + 2), y = (x² − 1)/(x − 3).

Domain: all real numbers except where Q(x) = 0. You can never divide by zero.

y = k/x is called inverse proportion: when x doubles, y halves. Its graph is a hyperbola with two branches.

Asymptotes: vertical, horizontal and slant

An asymptote is a line the graph gets closer and closer to.

Vertical asymptote (VA)

At x = c where the bottom is 0 but the top is not. Near it, y goes to +∞ or −∞.

Horizontal asymptote (HA)

Compare degrees of top (n) and bottom (m):

A graph may cross a horizontal asymptote in the middle; it can never cross a vertical one.

Holes, intercepts and sketching step by step

If a factor cancels from top and bottom, the graph has a hole (a missing point), not an asymptote. Example: (x² − 4)/(x − 2) = x + 2 with a hole at (2, 4).

  1. Factor top and bottom. Cancel common factors → holes.
  2. Domain: bottom ≠ 0.
  3. VA from the remaining bottom zeros.
  4. HA or slant asymptote from degrees.
  5. x-intercepts: top = 0. y-intercept: put x = 0.
  6. Test a point on each side of every VA to see if the graph goes up or down. Then sketch.

Rate of change: the graph gets steeper near a VA and flatter near the HA.

Reciprocal and modulus graphs, transformations and inverses

Reciprocal graph y = 1/f(x): where f(x) = 0 you get a VA; where f is large, 1/f is small; f and 1/f have the same sign; they meet where f = ±1.

Modulus: y = |f(x)| reflects the negative part up; for y = 1/|x| both branches sit above the x-axis.

Transformations: y = a/(x − h) + k moves 1/x right by h, up by k, and stretches by a. VA x = h, HA y = k.

Inverse: for y = (ax + b)/(cx + d), swap x and y and solve: f⁻¹(x) = (b − dx)/(cx − a). The VA and HA swap.

Derivative (quotient rule): (P/Q)′ = (P′Q − PQ′)/Q². For y = 1/x, y′ = −1/x², always negative, so each branch falls.

Key formulas and definitions

Worked examples

1. Find the domain of f(x) = 5/(x + 4).

Bottom = 0 when x = −4. Domain: all real x except −4.

2. Find the asymptotes of y = 3/(x − 2) + 1.

It is 3/x moved 2 right and 1 up. VA x = 2, HA y = 1.

3. For y = (2x + 1)/(x − 1), find VA, HA and intercepts.

VA: x − 1 = 0 → x = 1. HA: degrees equal, 2/1 → y = 2. x-intercept: 2x + 1 = 0 → x = −½. y-intercept: (0 + 1)/(0 − 1) = −1.

4. Find the hole of y = (x² − 9)/(x − 3).

x² − 9 = (x − 3)(x + 3). Cancel (x − 3): y = x + 3, x ≠ 3. Hole at (3, 6). No VA.

5. Find the slant asymptote of y = (x² + 1)/x.

Divide: (x² + 1)/x = x + 1/x. As x grows, 1/x → 0, so the slant asymptote is y = x. VA x = 0.

6. Find the inverse of f(x) = (x + 2)/(x − 3) and its asymptotes.

y = (x + 2)/(x − 3). Swap: x = (y + 2)/(y − 3) → xy − 3x = y + 2 → y(x − 1) = 3x + 2 → f⁻¹(x) = (3x + 2)/(x − 1). f has VA x = 3, HA y = 1; f⁻¹ has VA x = 1, HA y = 3 (swapped).

7. Sketch y = 1/(x² − 4).

Bottom = (x − 2)(x + 2), so VA x = −2 and x = 2. Degree top 0 < 2, HA y = 0. y-intercept −¼, no x-intercept. Test x = 3: +1/5 (above). x = 0: −¼ (below). x = −3: +1/5. So the middle piece is an upside-down cup below the axis, and the outer pieces sit above, falling toward y = 0.

Common mistakes

Practice quiz

1. The domain of y = 1/(x − 5) is:
2. The HA of y = (4x − 1)/(2x + 3) is:
3. y = (x² − 1)/(x − 1) has at x = 1:
4. The HA of y = 7/(x² + 1) is:
5. y = 2/(x + 1) − 3 has VA and HA:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is a rational function in simple words?

A function made by dividing one polynomial by another, like (x + 1)/(x − 2).

How do you find vertical asymptotes?

Cancel common factors, then set the bottom equal to zero and solve.

What is the difference between a hole and an asymptote?

A hole comes from a cancelled factor and is a single missing point. An asymptote comes from a bottom zero that does not cancel, and the graph shoots off to infinity there.

Where this is taught

Canada (Ontario)Grade 12C. Polynomial and Rational Functions
England (GCSE, A level)Year 13D Further algebra and functions (part 2)
USA (Common Core, NGSS, AP)Grade 11Polynomial, rational and radical relationships
USA (Common Core, NGSS, AP)Grade 11Polynomial, rational and radical relationships
USA (Common Core, NGSS, AP)Grade 12Polynomial and Rational Functions
USA (Common Core, NGSS, AP)Grade 12Polynomial and rational functions
South Korea고등학교 1학년Functions and graphs
South Korea고등학교 1학년Functions and graphs
Germany (Bavaria)Jahrgangsstufe 8Basic rational functions
Germany (Bavaria)Jahrgangsstufe 12Functions: quotient rule and inverse functions

Learn first

Learn next

Related lessons

All Maths lessons