Educerie

Educerie · IB Diploma · Mathematics: analysis and approaches

IB Mathematics AA 2.8 · SL and HL

The reciprocal function and rational functions

What does a graph look like when xx is in the denominator, and how do you find its asymptotes and intercepts without drawing it first?

What you will learn

  • Know the graph of y = 1 ÷ x, its two branches, its asymptotes, domain and range.
  • Understand why 1 ÷ x is self-inverse and why its graph is symmetric in y = x.
  • Know that ax + b ÷ cx + d has vertical asymptote x = −d ÷ c and horizontal asymptote y = a ÷ c.
  • Understand how intercepts and asymptotes fix where the two branches of a rational graph lie.

You must be able to

  1. Write down the equations of the vertical and horizontal asymptotes of a rational function.
  2. Sketch a rational function, labelling its asymptotes and intercepts with the axes.
  3. Find the inverse of a rational function and state its domain and range.
  4. Show that a function such as 1 ÷ x is self-inverse.
  5. Find the constants of a rational function from its asymptotes and a point.
  6. Interpret the horizontal asymptote of a rational model in context.

In the exam. Paper 1, often: "write down the equations of the asymptotes" (2 marks), "sketch the graph of ff, showing the asymptotes and intercepts" (3 to 5 marks), "find f−1(x)f^{-1}(x)" for a rational ff (4 marks). Paper 2 sets rational models in context, an average cost, a concentration, where the horizontal asymptote is the long-run value and a question asks you to interpret it.

1The reciprocal function 1x\dfrac{1}{x} and its stretches kx\dfrac{k}{x}

xx−4-4−2-2−1-1−12-\tfrac{1}{2}−14-\tfrac{1}{4}0014\tfrac{1}{4}12\tfrac{1}{2}112244
1x\dfrac{1}{x}−14-\tfrac{1}{4}−12-\tfrac{1}{2}−1-1−2-2−4-4undefined44221112\tfrac{1}{2}14\tfrac{1}{4}

As xx gets close to 00, 1x\dfrac{1}{x} becomes huge: 10.001=1000\dfrac{1}{0.001} = 1000, and 1−0.001=−1000\dfrac{1}{-0.001} = -1000. The graph shoots up on the right and down on the left, so the line x=0x = 0 (the yy-axis) is a vertical asymptote.

As xx gets large, positive or negative, 1x\dfrac{1}{x} gets close to 00 without reaching it: 11000=0.001\dfrac{1}{1000} = 0.001. So the line y=0y = 0 (the xx-axis) is a horizontal asymptote.

In symbols, read →\to as "tends to":

  • As x→0+x \to 0^{+} (from the right), 1x→+∞\dfrac{1}{x} \to +\infty.
  • As x→0−x \to 0^{-} (from the left), 1x→−∞\dfrac{1}{x} \to -\infty.
  • As x→+∞x \to +\infty, 1x→0\dfrac{1}{x} \to 0 from above.
  • As x→−∞x \to -\infty, 1x→0\dfrac{1}{x} \to 0 from below.

"Tends to": the graph gets as close as you like but never arrives.

Figure 1 · The reciprocal function y = 1/x x y 2 4 2 4 −4 −4 −2 −2 (1, 1) (−1, −1) (4, ¼) (¼, 4) y = x y = −x Two branches, two asymptotes (the axes), and symmetry in both y = x and y = −x. (4, ¼) and (¼, 4) are reflections of each other in y = x: swapping x and y gives the same graph.
Figure 1 · The reciprocal function y = 1 ÷ x

Figure 1 is a rectangular hyperbola. Key facts:

FeatureFor f(x)=1xf(x) = \dfrac{1}{x}
Domainx∈Rx \in \mathbb{R}, x≠0x \ne 0
Rangef(x)∈Rf(x) \in \mathbb{R}, f(x)≠0f(x) \ne 0
Vertical asymptotex=0x = 0
Horizontal asymptotey=0y = 0
Interceptsnone
Symmetryin the lines y=xy = x and y=−xy = -x, and rotational symmetry of order 2 about the origin

The branches lie in the first quadrant (xx and yy both positive) and the third (both negative). Positive numbers have positive reciprocals, negative ones negative.

The family y=kxy = \dfrac{k}{x}, k≠0k \ne 0 = a vertical stretch of 1x\dfrac{1}{x} by factor kk. It has the same asymptotes, domain and range, but lies further out.

Example: y=4xy = \dfrac{4}{x} passes through (2,2)(2, 2) instead of (1,1)(1, 1) (Figure 2(a)). If k<0k < 0, the branches move into the second and fourth quadrants.

To place y=kxy = \dfrac{k}{x} quickly, use these points:

  • It passes through (1,k)(1, k) and (k,1)(k, 1).
  • It passes through (−1,−k)(-1, -k) and (−k,−1)(-k, -1).
  • One labelled point on each branch is enough.

Finding kk. If the curve y=kxy = \dfrac{k}{x} passes through (−3,5)(-3, 5), then 5=k−35 = \dfrac{k}{-3}, so k=−15k = -15. The equation is y=−15xy = -\dfrac{15}{x}. Since k<0k < 0, the branches are in the second and fourth quadrants, which fits a point with negative xx and positive yy.

Figure 2 · Stretching and translating y = 1/x (a) y = 1/x and y = 4/x x y 2 4 2 4 −2 −4 −2 (2, 2) y = 4/x y = 1/x (b) y = 1/(x − 2) + 3 x y −2 4 6 6 x = 2 y = 3 (0, 2.5) (5/3, 0) (a) y = 4/x is further from the axes. (b) y = 1/(x − 2) + 3 moves the asymptotes to x = 2 and y = 3.
Figure 2 · Stretching and translating y = 1 ÷ x

2The reciprocal function is its own inverse

A function is self-inverse if f−1=ff^{-1} = f: doing it twice gets you back where you started. The reciprocal function is self-inverse. Three ways to see it:

By composition. f(f(x))=11/x=xf(f(x)) = \dfrac{1}{1/x} = x, for every x≠0x \ne 0. Since f∘ff \circ f is the identity, ff undoes itself.

By the swap method of 2.5. Write y=1xy = \dfrac{1}{x} and swap xx and yy: x=1yx = \dfrac{1}{y}. Rearranging gives y=1xy = \dfrac{1}{x}, the same function.

By the graph. The graph of f−1f^{-1} is the reflection of the graph of ff in y=xy = x. Figure 1 is symmetric in y=xy = x. The point (4,14)\left(4, \tfrac{1}{4}\right) reflects to (14,4)\left(\tfrac{1}{4}, 4\right), which is also on the curve. So the reflection is the same curve.

The same is true of y=kxy = \dfrac{k}{x} for any constant k≠0k \ne 0. Swap xx and yy and you get x=kyx = \dfrac{k}{y}, so y=kxy = \dfrac{k}{x} again. Section 6 shows which other rational functions are self-inverse.

1x\dfrac{1}{x} is self-inverse: f(f(x))=xf(f(x)) = x, so f−1(x)=1xf^{-1}(x) = \dfrac{1}{x}. Its graph is symmetric in the line y=xy = x.

3Moving the reciprocal: pcx+d+q\dfrac{p}{cx+d} + q

Every graph on this page is y=1xy = \dfrac{1}{x} after a stretch and a translation (2.11).

y=1x−h+ky = \dfrac{1}{x-h} + k is 1x\dfrac{1}{x} translated hh to the right and kk up. The asymptotes move with it, to x=hx = h and y=ky = k.

Example: for y=1x−2+3y = \dfrac{1}{x-2} + 3 (Figure 2(b)), the asymptotes are x=2x = 2 and y=3y = 3. The intercepts come from the usual rules:

  • At x=0x = 0, y=1−2+3=2.5y = \dfrac{1}{-2} + 3 = 2.5.
  • y=0y = 0 when 1x−2=−3\dfrac{1}{x-2} = -3, so x−2=−13x - 2 = -\tfrac{1}{3} and x=53x = \tfrac{5}{3}.

The same reading works for any y=pcx+d+qy = \dfrac{p}{cx+d} + q. The vertical asymptote is where cx+d=0cx + d = 0, that is x=−dcx = -\dfrac{d}{c}. The horizontal asymptote is y=qy = q.

Example: y=52x+1−4y = \dfrac{5}{2x+1} - 4 has asymptotes x=−12x = -\tfrac{1}{2} and y=−4y = -4. Read them straight off; do not expand first.

For p>0p > 0 the right branch is above y=qy = q. For p<0p < 0 it is below.

From split to combined. Put over one denominator: 1x−2+3=1+3(x−2)x−2=3x−5x−2\dfrac{1}{x-2} + 3 = \dfrac{1 + 3(x-2)}{x-2} = \dfrac{3x-5}{x-2}. That is the form ax+bcx+d\dfrac{ax+b}{cx+d}, where the next section starts.

The two forms are the same function written two ways. The combined form shows the intercepts quickly. The split form shows the asymptotes and the branches.

From combined to split. Write the numerator as a multiple of the denominator plus a remainder. For 3x+1x+4\dfrac{3x+1}{x+4}: 3x+1=3(x+4)−113x + 1 = 3(x+4) - 11, so 3x+1x+4=3−11x+4\dfrac{3x+1}{x+4} = 3 - \dfrac{11}{x+4}.

The asymptotes x=−4x = -4 and y=3y = 3 are now visible. The −11-11 is negative, so the branches are flipped from those of 1x+4\dfrac{1}{x+4}. The right branch is below y=3y = 3, and the left branch above it.

4Rational functions ax+bcx+d\dfrac{ax+b}{cx+d}

A rational function in this course has the form

f(x)=ax+bcx+df(x) = \dfrac{ax+b}{cx+d}, with c≠0c \ne 0, x≠−dcx \ne -\dfrac{d}{c}.

Its graph is the hyperbola of Figure 1, moved and stretched. The numbers aa, bb, cc and dd give all a sketch needs.

The vertical asymptote is x=−dcx = -\dfrac{d}{c}

  • The denominator cx+dcx + d is zero when x=−dcx = -\dfrac{d}{c}. The function is undefined there.
  • Near it the denominator is tiny, so the output is huge.

The horizontal asymptote is y=acy = \dfrac{a}{c}

  • For very large xx, the constants bb and dd hardly matter. So ax+bcx+d\dfrac{ax+b}{cx+d} behaves like axcx=ac\dfrac{ax}{cx} = \dfrac{a}{c}.
  • Precisely, divide top and bottom by xx: a+b/xc+d/x\dfrac{a + b/x}{c + d/x}. As x→±∞x \to \pm\infty, both bx\dfrac{b}{x} and dx\dfrac{d}{x} go to 00, leaving ac\dfrac{a}{c}.

The yy-intercept is (0,bd)\left(0, \dfrac{b}{d}\right), found by putting x=0x = 0 (if d≠0d \ne 0).

The xx-intercept is (−ba,0)\left(-\dfrac{b}{a}, 0\right), found by setting the numerator to zero (if a≠0a \ne 0). A fraction is zero only when its top is zero.

  • The xx-value −ba-\dfrac{b}{a} is also called the zero of ff: the solution of f(x)=0f(x) = 0. Do not confuse it with f(0)f(0), which is the yy-intercept.

For f(x)=ax+bcx+df(x) = \dfrac{ax+b}{cx+d}: vertical asymptote x=−dcx = -\dfrac{d}{c}, horizontal asymptote y=acy = \dfrac{a}{c}.

The domain is x≠−dcx \ne -\dfrac{d}{c} and the range is y≠acy \ne \dfrac{a}{c}. The function takes every value except the one it approaches forever.

Worked example. Sketch y=4x+22x−3y = \dfrac{4x+2}{2x-3}. Here a=4a = 4, b=2b = 2, c=2c = 2, d=−3d = -3.

vertical asymptote: 2x−3=0, x=32x=−dc\text{vertical asymptote: } 2x - 3 = 0,\ x = \frac{3}{2} \qquad \textcolor{#838c91}{x = -\frac{d}{c}}horizontal asymptote: y=42=2y=ac\text{horizontal asymptote: } y = \frac{4}{2} = 2 \qquad \textcolor{#838c91}{y = \frac{a}{c}}y-intercept: y=2−3, so (0,−23)put x=0y\text{-intercept: } y = \frac{2}{-3},\ \text{so } \left(0, -\frac{2}{3}\right) \qquad \textcolor{#838c91}{\text{put }x = 0}x-intercept: 4x+2=0, x=−12, so (−12,0)numerator zerox\text{-intercept: } 4x + 2 = 0,\ x = -\frac{1}{2},\ \text{so } \left(-\frac{1}{2}, 0\right) \qquad \textcolor{#838c91}{\text{numerator zero}}

Now place the branches. Draw the two asymptotes as dashed lines. They cross at (32,2)\left(\tfrac{3}{2}, 2\right) and divide the plane into four regions.

Both intercepts are in the bottom-left region, so one branch lives there. The other is in the opposite region, top right. A test point confirms it: f(3)=143f(3) = \dfrac{14}{3}, above y=2y = 2. Figure 3 shows the sketch.

Figure 3 · Sketching y = (4x + 2)/(2x − 3) x y −4 −2 2 4 6 −4 4 6 8 x = 3/2 y = 2 (0, −2/3) (−1/2, 0) (3, 14/3) Asymptotes x = −d/c = 3/2 and y = a/c = 2, intercepts (0, −2/3) and (−1/2, 0). A test point such as (3, 14/3) shows which side of each asymptote a branch is on.
Figure 3 · Sketching y = 4x + 2 ÷ 2x − 3

Why the branches go where they do

  • Dividing out gives 4x+22x−3=2+82x−3\dfrac{4x+2}{2x-3} = 2 + \dfrac{8}{2x-3}. Check: 2(2x−3)+8=4x+22(2x-3) + 8 = 4x + 2. So the graph is 22 plus a reciprocal-type term.
    • When 2x−3>02x - 3 > 0 (right of the vertical asymptote), the extra term is positive. The curve is above y=2y = 2.
    • To the left, the extra term is negative. The curve is below y=2y = 2.
  • That one line of algebra places the branches without a test point.

Behaviour near the asymptotes. From 2+82x−32 + \dfrac{8}{2x-3}:

  • As x→32+x \to \tfrac{3}{2}^{+}, y→+∞y \to +\infty.
  • As x→32−x \to \tfrac{3}{2}^{-}, y→−∞y \to -\infty.
  • As x→+∞x \to +\infty, y→2y \to 2 from above.
  • As x→−∞x \to -\infty, y→2y \to 2 from below.

That is "correct asymptotic behaviour" on a sketch: each branch bends towards both its asymptotes.

Special cases.

  • If a=0a = 0, the function is bcx+d\dfrac{b}{cx+d}. The horizontal asymptote is y=0y = 0. There is no xx-intercept, because the numerator is never zero. For example 93x−1\dfrac{9}{3x-1} has asymptotes x=13x = \tfrac{1}{3} and y=0y = 0 and yy-intercept (0,−9)(0, -9).
  • If d=0d = 0, the vertical asymptote is x=0x = 0, the yy-axis. There is no yy-intercept. For example 5x−2x\dfrac{5x-2}{x} has asymptotes x=0x = 0 and y=5y = 5, and its xx-intercept is (25,0)\left(\tfrac{2}{5}, 0\right).
  • If the top is a multiple of the bottom, as in 3x+6x+2=3\dfrac{3x+6}{x+2} = 3, the fraction cancels to a constant. There is no hyperbola, only the line y=3y = 3 with a gap at x=−2x = -2. Exams avoid this case. It is why the curve always needs ad≠bcad \ne bc.

5Signs, equations and inequalities

Sign diagrams. A rational function changes sign only in two places:

  • where the numerator is zero (it crosses the axis),
  • where the denominator is zero (it jumps across the asymptote).

Mark those two xx-values, then test one point in each gap. For g(x)=5−x2x+7g(x) = \dfrac{5-x}{2x+7}, the markers are x=−72x = -\tfrac{7}{2} (undefined) and x=5x = 5 (zero):

xxx<−72x < -\tfrac{7}{2}−72<x<5-\tfrac{7}{2} < x < 5x>5x > 5
test valueg(−4)=−9g(-4) = -9g(0)=57g(0) = \tfrac{5}{7}g(6)=−119g(6) = -\tfrac{1}{19}
sign of gg−-++−-

So g(x)>0g(x) > 0 for −72<x<5-\tfrac{7}{2} < x < 5. The pattern is −,+,−-, +, -, not the +,−,++, -, + you might expect. Test; do not guess.

The test values also show the asymptote: g→+∞g \to +\infty as x→−72+x \to -\tfrac{7}{2}^{+} and g→−∞g \to -\infty as x→−72−x \to -\tfrac{7}{2}^{-}.

Never multiply such an inequality by 2x+72x + 7 without splitting into the cases 2x+7>02x + 7 > 0 and 2x+7<02x + 7 < 0. The sign diagram avoids this.

Equations and inequalities from the graph. Go back to Figure 3, f(x)=4x+22x−3=2+82x−3f(x) = \dfrac{4x+2}{2x-3} = 2 + \dfrac{8}{2x-3}.

  • Solving f(x)=10f(x) = 10. Multiply up (allowed, since x≠32x \ne \tfrac{3}{2}). Then 4x+2=10(2x−3)4x + 2 = 10(2x - 3), so 32=16x32 = 16x and x=2x = 2. Check: f(2)=101=10f(2) = \dfrac{10}{1} = 10.
  • Horizontal lines. A line y=ky = k meets the graph once for every k≠2k \ne 2, and never for k=2k = 2. So f(x)=2f(x) = 2 has no solution. That is the range y≠2y \ne 2 again.
  • Inequalities. Read where the curve is above or below the line. Things can change only at the zero, the vertical asymptote and solutions of the matching equation.

The inequalities for this graph:

  • f(x)>2f(x) > 2 is the right-hand branch, x>32x > \tfrac{3}{2}.
  • f(x)≥10f(x) \ge 10 is the top of that branch: 32<x≤2\tfrac{3}{2} < x \le 2, open at the asymptote.
  • f(x)<0f(x) < 0 is the part below the xx-axis, between the zero and the asymptote: −12<x<32-\tfrac{1}{2} < x < \tfrac{3}{2}.

When a question says "hence", it wants this reading off the sketch, not a fresh algebraic solution.

6The inverse of a rational function

Find the inverse of f(x)=4x+22x−3f(x) = \dfrac{4x+2}{2x-3} by the method of 2.5. One extra step: yy appears twice, so collect the yy terms and factorise.

x=4y+22y−3swap x and yx = \frac{4y+2}{2y-3} \qquad \textcolor{#838c91}{\text{swap }x\text{ and }y}x(2y−3)=4y+2multiply upx(2y-3) = 4y + 2 \qquad \textcolor{#838c91}{\text{multiply up}}2xy−3x=4y+22xy - 3x = 4y + 22xy−4y=3x+2y terms to one side2xy - 4y = 3x + 2 \qquad \textcolor{#838c91}{y\text{ terms to one side}}y(2x−4)=3x+2factorise out yy(2x-4) = 3x + 2 \qquad \textcolor{#838c91}{\text{factorise out }y}f−1(x)=3x+22x−4, x≠2f^{-1}(x) = \frac{3x+2}{2x-4},\ x \ne 2

The inverse is also a rational function. Its asymptotes, x=2x = 2 and y=32y = \tfrac{3}{2}, are those of ff with xx and yy swapped.

The graph of f−1f^{-1} is the reflection of ff in y=xy = x. So a vertical asymptote of ff becomes a horizontal asymptote of f−1f^{-1}, and the other way round. Figure 4 shows both graphs.

Quick check: the range of ff, y≠2y \ne 2, is the domain of f−1f^{-1}, x≠2x \ne 2.

Figure 4 · A rational function and its inverse x y −4 −2 4 6 −4 −2 4 6 y = x y = f(x) y = f⁻¹(x) x = 3/2 x = 2 y = 2 y = 3/2 f⁻¹ is f reflected in y = x, so the asymptotes swap: x = 3/2, y = 2 become x = 2, y = 3/2.
Figure 4 · A rational function and its inverse

Which rational functions are self-inverse? A graph that is its own reflection in y=xy = x must have its asymptotes cross on the line y=xy = x. The crossing point is (−dc,ac)\left(-\dfrac{d}{c}, \dfrac{a}{c}\right). So this needs −dc=ac-\dfrac{d}{c} = \dfrac{a}{c}, that is d=−ad = -a.

The condition is enough. Swap xx and yy in y=ax+bcx−ay = \dfrac{ax+b}{cx-a}. Then x(cy−a)=ay+bx(cy - a) = ay + b, so cxy−ay=ax+bcxy - ay = ax + b and y(cx−a)=ax+by(cx - a) = ax + b. That is the same function again.

As always, ad≠bcad \ne bc, here −a2≠bc-a^{2} \ne bc, or the "function" is a constant with a hole.

Example: h(x)=4x+53x−4h(x) = \dfrac{4x+5}{3x-4} has a=4a = 4 and d=−4d = -4, and indeed:

x=4y+53y−4x = \frac{4y+5}{3y-4}3xy−4x=4y+53xy - 4x = 4y + 53xy−4y=4x+53xy - 4y = 4x + 5y=4x+53x−4the same functiony = \frac{4x+5}{3x-4} \qquad \textcolor{#838c91}{\text{the same function}}

To show a function is self-inverse in an exam, find f−1f^{-1} and show it equals ff, or show that f(f(x))f(f(x)) simplifies to xx.

7Finding the equation from its features

Given the asymptotes and a point, start from the split form, which holds the asymptotes directly.

Example: the asymptotes are x=4x = 4 and y=−1y = -1, and the curve passes through (0,3)(0, 3). Write y=−1+px−4y = -1 + \dfrac{p}{x-4}. At (0,3)(0, 3): 3=−1−p43 = -1 - \dfrac{p}{4}, so p=−16p = -16. The function is y=−1−16x−4y = -1 - \dfrac{16}{x-4}, which combines to −x−12x−4\dfrac{-x-12}{x-4}.

Check the zero: x=−12x = -12, left of the asymptote, where the curve is above y=−1y = -1 because −16x−4-\dfrac{16}{x-4} is positive there. So (−12,0)(-12, 0) is consistent.

If the form is fixed, say y=ax+bx+dy = \dfrac{ax+b}{x+d}, the vertical asymptote gives dd, the horizontal one aa, and the point bb (Q4).

8Rational functions in context

Rational functions model anything shared out: a fixed cost spread over more items, a dose spread through a growing volume. The horizontal asymptote is the long-run value, and it usually has a meaning worth stating.

Example: a small firm prints T-shirts. It pays €600 to set up a design, then €4 for each shirt. The average cost per shirt for nn shirts is

A(n)=4n+600n=4+600nA(n) = \dfrac{4n+600}{n} = 4 + \dfrac{600}{n}.

Figure 5 shows the graph for n>0n > 0. At n=100n = 100 the average cost is €10. At n=600n = 600 it is €5.

The horizontal asymptote is A=4A = 4. However many shirts are printed, the shared setup cost shrinks towards nothing. The average cost falls towards the €4 to make each shirt, never reaching it.

The vertical asymptote n=0n = 0 has no practical meaning, since you cannot print zero shirts. The domain is n∈Z+n \in \mathbb{Z}^{+}.

Figure 5 · Average cost per T-shirt, A(n) = (4n + 600)/n n (shirts) A (€) 200 400 600 800 1000 1200 4 8 12 16 20 A = 4 (100, 10) (600, 5) The average cost falls towards €4, the horizontal asymptote, but never reaches it.
Figure 5 · Average cost per T-shirt, A(n) = 4n + 600 ÷ n

An average cost of €7 needs 600n=3\dfrac{600}{n} = 3, so n=200n = 200.

A question might ask how many shirts are needed for an average cost below €4.80. Then 4+600n<4.84 + \dfrac{600}{n} < 4.8, so 600n<0.8\dfrac{600}{n} < 0.8, so n>750n > 750: at least 751 shirts.

Multiplying by nn was allowed because nn is positive. A negative multiplier flips an inequality.

Practice questions

55 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.