Sketch rational functions with a quadratic numerator or denominator, finding vertical, horizontal and oblique asymptotes, intercepts, turning points and range.
IB Mathematics: Analysis and Approaches
Part of 2 Functions
HL only
Key terms introduced here
Each is in the Maths AA glossary, with every other term in the subject.
. A rational function whose numerator has degree exactly one more than its denominator has one, found by polynomial division.
Notes on 2.13 Rational functions
22 min readLast reviewed
A rational function is one polynomial divided by another. The simplest examples, y=x1 and y=cx+dax+b
Rational functions model quantities that are ratios, such as the average cost of making an item, the concentration of a substance in a mixture, or the efficiency of a process. Their asymptotes describe the long-run behaviour of these models.
Rational functions and their domains
The two families studied here are
f(x)=cx2+dx+eax+bandf(x)=dx+eax2+bx+c.
In the first the denominator has the higher degree; in the second the numerator does. This difference decides the long-run behaviour of the graph.
To sketch any rational function, find these features in turn:
The domain and the vertical asymptotes, from the zeros of the denominator.
The behaviour on each side of each vertical asymptote.
The horizontal or oblique asymptote, from the degrees of the numerator and the denominator.
The intercepts with the axes.
Any turning points, from a GDC or by differentiation.
Vertical asymptotes
A vertical asymptote occurs where the denominator is zero and the numerator is not. Near such a value the denominator is very small, so the fraction is very large in size: f(x)→∞ or f(x)→−∞.
For f(x)=cx2+dx+eax+b the number of vertical asymptotes depends on the discriminant of the denominator, Δ=d2−4ce
Discriminant of cx2+dx+e
Zeros of the denominator
Vertical asymptotes
Δ>0
Two distinct real zeros
Two (unless one zero is also a zero of the numerator)
Δ=0
A common factor gives a gap, not an asymptote
If the numerator and the denominator are both zero at x=k, they share the factor (x−k). After cancelling it, the graph is that of the simplified function with the single point at x=k missing. For example,
f(x)=x2−4x−2=(x−2)(x+2)x−2=x+21,x=2.
The graph has a vertical asymptote at x=−2 only. At x=2 there is a gap in the curve at the point (2,41)
Behaviour on each side of a vertical asymptote
On each side of a vertical asymptote the graph goes either up to +∞ or down to −∞. The direction comes from the sign of f(x) just to the left and just to the right of the asymptote, which in turn comes from the signs of the factors.
At a simple zero of the denominator, such as (x−3), the denominator changes sign, so the graph goes to +∞ on one side and −∞ on the other.
At a repeated zero, such as (x−1)2
To decide which way, substitute a value just beyond the asymptote, or reason with signs. The notation x→3+ means "x approaches 3 from values greater than 3", and x→3−
Horizontal asymptotes
The long-run behaviour of a rational function, as x→±∞, depends on the degrees of the numerator and the denominator. For large ∣x∣ only the leading terms matter, just as for polynomials.
Degrees
Behaviour as x→±∞
Asymptote
Numerator degree < denominator degree
f(x)→0
Horizontal, y=0
Numerator degree = denominator degree
For f(x)=cx2+dx+eax+b, divide the numerator and the denominator by x2
f(x)=c+xd+x2exa+x2b→c+0+00+0=0as x→±∞.
So every function of this form has the horizontal asymptote y=0.
Crossing a horizontal asymptote
An asymptote describes what happens as x→±∞, not what happens in the middle of the graph. A graph can cross its horizontal asymptote for moderate values of x, and for f(x)=cx2+dx+eax+b
To find which side of y=0 the graph approaches from, look at the sign of f(x) for large positive and large negative x. For f(x)=x2−x−62x−1
The sign of the function between key values
The zeros of the numerator and of the denominator split the x-axis into intervals. On each interval no factor changes sign, so f(x) keeps one sign throughout, and a table of signs shows at once whether the graph is above or below the x-axis there. For f(x)=(x−3)(x+2)2x−1
Interval
2x−1
x+2
x−3
f(x)
The same table is the basis of the sign diagrams used to solve rational inequalities in 2.15.
Functions with no vertical asymptote
When the denominator has no real zeros, the graph is a single unbroken curve. It still has the horizontal asymptote y=0, so it rises from the asymptote and returns to it: such graphs always have a maximum and a minimum, or a single turning point.
Finding the range without calculus
For a rational function with a quadratic part, the range can also be found algebraically. A value k is in the range exactly when the equation f(x)=k has a real solution. Clearing the fraction turns this into a quadratic in x, which has real solutions when its discriminant is at least zero.
For f(x)=x2+14x, the equation x2+14x=k
kx2−4x+k=0.
When k=0 this quadratic has real roots if and only if 16−4k2≥0, that is −2≤k≤2
A repeated factor in the denominator
Oblique asymptotes
When the numerator has degree exactly one more than the denominator, as in f(x)=dx+eax2+bx+c, the function grows without limit as x→±∞
Finding an oblique asymptote by division
Divide the numerator by the denominator (polynomial division, 2.12). Since the divisor is linear, the remainder r is a constant, and
f(x)=dx+eax2+bx+c=mx+k+dx+er,
where mx+k is the quotient. As x→±∞, the term dx+er→0
The same form shows on which side of the asymptote the graph lies. The vertical distance from the line to the curve is dx+er: where this is positive the curve is above the asymptote, and where it is negative the curve is below it.
Because x+14>0 for x>−1 and <0
Turning points and range
Graphs with an oblique asymptote and one vertical asymptote have two branches. Each branch either has one turning point or none. The turning points can be found with a GDC, or by differentiating the divided form, which is much easier than using the quotient rule on the original fraction.
The discriminant method gives the same range without calculus. Setting x+1x2+3x+6=k and clearing the fraction gives x2+(3−k)x+(6−k)=0
(3−k)2−4(6−k)≥0⇔k2−2k−15≥0⇔(k−5)(k+3)≥0,
that is, when k≤−3 or k≥5. Solving a quadratic inequality like this one is covered in 2.7 and 2.15.
When the turning points are not simple numbers
Many rational functions have turning points with surd coordinates. Calculus gives exact values; a GDC gives decimal approximations, which are acceptable when a calculator is allowed and exact values are not asked for.
Finding a rational function from its features
The divided form f(x)=mx+k+x−hr makes it easy to build a function with given asymptotes: the vertical asymptote is x=h
A parameter in the denominator can change the number of vertical asymptotes. For f(x)=x2+kx+4x+1, the denominator has discriminant k2−16
If −4<k<4, the discriminant is negative: no vertical asymptotes.
If k=±4, the denominator is (x±2)2
Rational functions as models
In a model, only the part of the graph with a sensible domain is used, and the asymptotes describe long-run behaviour in the context.
Average cost models give oblique asymptotes. If making x items costs 0.02x2+5x+2000 dollars (a fixed cost of 2000 dollars plus costs that rise faster than the number of items), the average cost per item is
A(x)=x0.02x2+5x+2000=0.02x+5+x2000.
For small production runs the term x2000 dominates: the fixed cost is shared between few items. For large runs A(x) approaches the oblique asymptote A=0.02x+5
Exam-style questions on rational functions
The following question is typical of Paper 1 (no GDC), where every feature must be found algebraically.
Self-check
To do:
I can find the vertical asymptotes of a rational function, after checking for common factors.
To do:
I can decide whether the graph goes to +∞ or −∞ on each side of a vertical asymptote.
To do:
I can find the horizontal asymptote by comparing degrees, and explain why the graph can cross it.
To do:
I can find an oblique asymptote by division and say on which side of it each branch lies.
To do:
I can find turning points with a GDC or by differentiating the divided form.
To do:
I can find the range of a rational function, including by the discriminant method.
To do:
I can sketch rational functions with all asymptotes, intercepts and turning points labelled.
To do:
I can find unknown coefficients from given asymptotes and points.
Questions on 2.13
25 exam-style questions on this subtopic, written in the style of the IB papers. The first has its markscheme open. Counted on
Question 1 · AA-010107 marks
Consider the inequality x−23>x, where x∈R, x=2.
(a)
Solve the inequality.
[5]5 marks
Markscheme (a)
x−23−x>0M1
Note: Award M0 for multiplying both sides by (x−2)
Question 2 · AA-0101717 marks
Let f(x)=x−1x+3, for x∈R
Question 3 · AA-0137418 marks
Let f(x)=(x−2)(x+4)3x+6, where x∈R
Try a quick-fire question
One of 34 short multiple-choice questions on 2.13. Pick an answer to see why it's right or wrong.
Where does the graph of y=x2+2x−4 cross the y-axis?
, have a single vertical and a single horizontal asymptote. When the numerator or the denominator is quadratic, new features appear: a graph with two vertical asymptotes or none, a graph that crosses its horizontal asymptote, and graphs that approach a sloping straight line rather than a horizontal one.
, their asymptotes, intercepts, turning points and graphs. The reciprocal function and
cx+dax+b
are introduced in 2.8, polynomial division in 2.12, and partial fractions in 1.11.
and
Q
are polynomials and
Q
is not the zero polynomial. Its largest possible domain is all real
x
except the zeros of
Q(x)
.
.
One repeated zero
One
Δ<0
No real zeros
None: the domain is R
, shown on a sketch by an open circle.
, the denominator does not change sign, so the graph goes in the same direction on both sides, like
y=x21
.
means from values less than
3
.
(b) Describe the behaviour of the graph on each side of each vertical asymptote.
Show the solution
(a) Factorise the denominator: x2−x−6=(x−3)(x+2). The numerator 2x−1 is not zero at x=3 or x=−2, so there is no common factor. The vertical asymptotes are x=3 and x=−2.
(b) Write f(x)=(x−3)(x+2)2x−1 and look at the sign of each factor.
Near x=3. The numerator is close to 5 and (x+2) is close to 5, both positive. As x→3+
Near x=−2. The numerator is close to −5 and (x−3) is close to −5, so their quotient is positive. As x→−2+
You can check a direction with one substitution: f(3.01)=(0.01)(5.01)5.02≈100, which is large and positive.
f(x)→ ratio of leading coefficients
Horizontal, y=leading coefficient of Qleading coefficient of P
Numerator degree = denominator degree + 1
f(x) behaves like a linear function
Oblique, y=mx+c
:
with
a=0
it always does: it meets
y=0
at the
x
-intercept
x=−ab
. A graph can never cross a vertical asymptote, because the function is not defined there.
, the fraction behaves like
x22x=x2
, which is positive for large positive
x
and negative for large negative
x
. So the graph approaches
y=0
from above on the right and from below on the left.
the key values are
−2
,
21
and
3
.
x<−2
−
−
−
− (below the axis)
−2<x<21
−
+
−
+ (above)
21<x<3
+
+
−
− (below)
x>3
+
+
+
+ (above)
and
x=3
, with the behaviour found there.
Horizontal asymptote. The numerator has lower degree, so y=0. The graph approaches it from below as x→−∞ and from above as x→∞.
Intercepts.f(x)=0 when 2x−1=0, so the x-intercept is (21,0). The y-intercept is f(0)=−6−1=61, so (0,61).
Putting it together.
For x<−2: the curve comes in just below y=0 from the left and falls to −∞ as x→−2−.
For −2<x<3: it comes down from +∞, crosses the horizontal asymptote at (21,0)
For x>3: it comes down from +∞ and approaches y=0 from above.
y = (2x − 1)/(x² − x − 6)
The middle branch runs from +∞ down to −∞ and crosses the horizontal asymptote y = 0 at x = 1/2. The outer branches approach y = 0 from opposite sides.
This function has no turning points: its derivative is −(x2−x−6)22x2−2x+13, which is negative wherever it is defined.
has no vertical asymptotes.
(b) Use a graphic display calculator (GDC) to find the coordinates of the turning points.
(c) Sketch the graph of f and state its range.
Show the solution
(a) The denominator x2+1≥1 for all real x, so it is never zero. The function is defined for every real x and has no vertical asymptote.
(b) Graphing y=x2+14x and using the maximum and minimum functions gives a maximum at (1,2) and a minimum at (−1,−2).
(c) The horizontal asymptote is y=0, approached from above as x→∞ (the function is positive for x>0) and from below as x→−∞
The range is −2≤f(x)≤2.
becomes
. The value
k=0
gives
x=0
, which is also allowed. So the range is
−2≤f(x)≤2
, and the largest and smallest values,
±2
, are the
y
-coordinates of the turning points. This agrees with the GDC.
, find the coordinates of the turning point, and sketch the graph.
Show the solution
(a) The denominator is (x−1)2, which is zero only at x=1; the numerator is 4 there, so x=1 is a vertical asymptote. The numerator has lower degree, so y=0 is the horizontal asymptote. The x-intercept is (−3,0) and the y-intercept is f(0)=13=3, so (0,3).
(b) Near x=1 the numerator is close to 4, which is positive, and (x−1)2 is positive and small on both sides. So f(x)→+∞
(c) f′(x)=0 when x+7=0, so x=−7
f(−7)=(−8)2−4=−644=−161.
The turning point is (−7,−161), a minimum: for x<−3 the function is negative but tends to 0
, but in a very regular way: its graph approaches a sloping straight line.
such that
f(x)−(mx+c)→0
as
x→∞
or as
x→−∞
.
, so the graph approaches the line
y=mx+k
. This line is the
oblique asymptote
.
in the form
x+p+x+1q
.
(b) Write down the equations of the asymptotes of the graph.
(c) Find the coordinates of any intercepts with the axes.
Show the solution
(a) Divide x2+3x+6 by x+1, using synthetic division with a=−1 on the coefficients 1,3,6: bring down 1; 1×(−1)=−1, 3−1=2; 2×(−1)=−2, 6−2=4. The quotient is x+2 and the remainder is 4:
f(x)=x+2+x+14.
So p=2 and q=4.
(b) The vertical asymptote is x=−1. As x→±∞, x+14→0
(c) The y-intercept is f(0)=16=6, so (0,6)
for
x<−1
, the right branch lies above the asymptote and the left branch below it.
, not
y=x
. The constant term of the quotient matters, so always divide fully.
:
(a) Find f′(x) and hence find the coordinates of the turning points.
(b) Sketch the graph of f.
(c) State the range of f.
Show the solution
(a) Write x+14=4(x+1)−1. Differentiating,
f′(x)=1−(x+1)24.
Setting f′(x)=0 gives (x+1)2=4, so x+1=±2
f(1)=1+2+24=5,f(−3)=−3+2+−24=−3.
The turning points are (1,5), a minimum on the right branch, and (−3,−3), a maximum on the left branch.
(b) The graph has asymptotes x=−1 and y=x+2, y-intercept (0,6)
(c) The right branch takes every value from 5 upwards and the left branch every value from −3 downwards, so the range is f(x)≤−3 or f(x)≥5.
. This has real roots when
(a) Synthetic division of 2x2−x−3 by x−2 (with a=2 on 2,−1,−3) gives the bottom row 2,3,3, so
f(x)=2x+3+x−23.
The asymptotes are x=2 and y=2x+3.
(b) The numerator factorises as (2x−3)(x+1), so the x-intercepts are (23,0)
(c) f′(x)=2−(x−2)23=0
f(x)=2(x−2)+7+x−23.
With x−2=26
The turning points are (2+26,7+26)≈(3.22,11.9)
and the oblique asymptote is
y=mx+k
. One more point on the graph fixes
r
.
and
y=2x+1
, and passes through
(0,−2)
. Find the values of
a
,
b
,
c
and
d
.
Show the solution
The vertical asymptote gives d=2. The oblique asymptote means
y=2x+1+x−2r
for some constant r. The point (0,−2) gives
−2=0+1+−2r⇒2r=3⇒r=6.
Combine into a single fraction:
y=x−2(2x+1)(x−2)+6=x−22x2−3x+4.
So a=2, b=−3, c=4 and d=2.
.
: one vertical asymptote,
x=∓2
.
If ∣k∣>4, there are two zeros of the denominator. But when k=5, the denominator is (x+1)(x+4), which shares the factor (x+1) with the numerator; the graph then has one vertical asymptote, x=−4, and a gap at x=−1.
(a) Find the maximum concentration and the time at which it occurs.
(b) Find the times at which the concentration is 4 mg per litre.
(c) Describe what happens to the concentration in the long run.
Show the solution
(a) Using a GDC, or C′(t)=(t2+4)220(t2+4)−20t(2t)=(t2+4)220(4−t2), which is zero when t=2 (as t≥0). The maximum concentration is C(2)=840=5 mg per litre, 2 hours after the dose.
(b) Solve t2+420t=4:
20t=4t2+16⇒t2−5t+4=0⇒(t−1)(t−4)=0.
The concentration is 4 mg per litre after 1 hour (while rising) and after 4 hours (while falling).
(c) The denominator has the higher degree, so C(t)→0 as t→∞: the horizontal asymptote C=0 shows that the medicine is gradually cleared from the blood.
, so the average cost eventually rises again. A GDC gives the minimum average cost as about
17.6
dollars per item, when about
316
items are made (exactly
5+410
at
x=10010
).
.
(a) Express f(x) in the form x+p+x−2q, where p,q∈Z. [3 marks]
(b) Write down the equations of the asymptotes of the graph of f. [2 marks]
(c) Find the coordinates of the points where the graph meets the axes. [3 marks]
(d) Show that f′(x)=(x−2)2x2−4x−1. [3 marks]
(e) Hence find the exact coordinates of the turning points of the graph. [4 marks]
(f) Sketch the graph of f. [3 marks]
(g) Find the set of values of k for which the equation f(x)=k has no real solutions. [2 marks]
Show the solution
(a) Long division (or synthetic division with a=2 on 1,2,−3 giving 1,4,5):
With no vertical asymptote the graph is one smooth curve. It leaves y = 0, reaches a maximum and a minimum, and returns to y = 0 at both ends.
as
x→1−
and as
x→1+
.
, and
at the far left and is
0
at
x=−3
, so it must dip down and come back up.
y = (x + 3)/(x − 1)²
A repeated factor in the denominator sends both sides of the asymptote x = 1 in the same direction. The shallow minimum at (−7, −1/16) sits just below the horizontal asymptote.
, so the oblique asymptote is
y=x+2
.
. For
x
-intercepts,
x2+3x+6=0
; its discriminant is
9−24=−15<0
, so there are none.
, giving
x=1
or
x=−3
.
and no
x
-intercepts.
y = (x² + 3x + 6)/(x + 1)
y = x + 2 (oblique asymptote)
The right branch lies above the oblique asymptote and has a minimum at (1, 5); the left branch lies below it and has a maximum at (−3, −3).
and
(−1,0)
. The
y
-intercept is
f(0)=−2−3=23
, so
(0,23)
.
gives
(x−2)2=23
, so
x−2=±23=±26
. Then
:
2(x−2)=6
and
x−23=66=6
, so
f(x)=7+26
. With
x−2=−26
both terms change sign, so
f(x)=7−26
.
, a minimum, and
(2−26,7−26)≈(0.775,2.10)
, a maximum.
y = (2x² − x − 3)/(x − 2)
y = 2x + 3
The left branch crosses the x-axis twice and has its maximum between the two intercepts; the right branch has a minimum above the oblique asymptote.
C = 20t/(t² + 4)
The concentration peaks at 5 mg per litre after 2 hours and then decays towards the horizontal asymptote C = 0.
and
(1,0)
.
f(0)=−2−3=23
gives
(0,23)
.
, so
x=24±20=2±5
. Using
f(x)=(x−2)+6+x−25
:
.
x=2−5: f=−5+6−5=6−25.
, a minimum, and
(2−5,6−25)
, a maximum.
y = f(x)
y = x + 4
Sketch for part (f): both asymptotes dashed and labelled, both intercepts and turning points marked.