Read and plot the graph y = f(x), sketch graphs from given information or a context, transfer a graph from a GDC to paper, choose a viewing window, and graph sums and differences of functions.
IB Mathematics: Analysis and Approaches
Part of 2 Functions
SL and HL
Key terms introduced here
Each is in the Maths AA glossary, with every other term in the subject.
To draw a graph by hand that shows its general shape and key features (intercepts, maximum and minimum points, asymptotes, endpoints) labelled with their values, without plotting it to scale.
A graph turns a function into a picture. It shows at a glance where a function is positive or negative, where it rises and falls, how large it becomes and where it changes behaviour. Much of the course relies on moving between a formula and its graph, and on producing clear, labelled graphs by hand.
Technology draws accurate graphs quickly, but a screen shows only one window at a time and gives no labels. The skill is to decide what to look at, to find the important features, and to communicate them on paper.
The graph of a function
The graph of a function f is the set of all points (x,y) with y=f(x), where x runs through the domain. Its equation is y=f(x). A point lies on the graph exactly when its coordinates satisfy this equation, so checking whether a point is on a graph is a matter of substitution.
At x=a, the graph is at height f(a), measured from the x-axis (a negative value means the graph is under the axis). Reading a graph therefore works in two directions. To find f(a), go up or down from x=a to the graph and across to the y-axis. To solve f(x)=k, go across from y=k to the graph, possibly meeting it several times, and down to the x-axis.
y = f(x)
The line y = 3 meets the graph three times, so the equation f(x) = 3 has three solutions.
Plotting a graph from a table of values
To plot a graph, calculate the value of f at evenly spaced values of x, mark each point accurately on a grid, and join the points with a smooth curve (or with straight segments only when the function is known to be linear). The more curved the graph, the more points are needed to show its shape.
Sketch, draw and plot
The command term in a question decides how accurate and how detailed a graph must be.
Command term
What it asks for
Sketch
The correct general shape, with the relevant features labelled. Approximate positions, no grid needed.
Draw
An accurate, labelled graph, drawn to scale on the given axes, with a ruler for straight lines.
Plot
Mark points accurately at given coordinates (often from a table of values).
Label
Add names or values to points, lines or axes.
A good sketch is not a rough drawing. It is a clear summary in which every feature that matters is shown and labelled, and nothing contradicts the function: a curve that should approach an asymptote does not cross it, a graph defined only for x≥0 does not continue to the left, and the curve passes through the stated intercepts.
What a sketch should show
Axes: both axes drawn and labelled (x and y, or the variable names from the context, with units).
Intercepts: the points where the graph meets the axes, with coordinates.
Turning points: any local maximum or minimum, with coordinates.
Asymptotes: drawn as dashed lines and labelled with their equations, with the curve approaching but not reaching them.
Endpoints: when the domain is restricted, the endpoints with their coordinates, a filled dot if included and an open dot if not.
Shape: the correct behaviour at the edges of the domain and the correct relative positions of the features.
Sketching from given information
A graph can be sketched without a formula, from a description of its features. Mark each given feature, then join them with the simplest smooth curve that agrees with everything stated.
Sketching from a context
When a graph describes a real situation, the shape comes from how the quantity changes. A constant rate of change gives a straight segment; a rate that increases gives a curve that becomes steeper; a rate that decreases gives a curve that flattens. The axes carry the names and units of the quantities, and the graph stays within the values that make sense.
The shape of a container changes how its depth rises when it is filled at a constant rate. In a cylinder, equal volumes always raise the depth by equal amounts, so depth against time is a straight line. In a cone standing on its point, the water surface gets wider as it rises, so each extra litre raises the depth by less and the graph flattens.
Graphing with technology
A graphic display calculator (GDC) or graphing software draws an accurate graph in seconds and can find key features to many decimal places. The tools commonly used are a table of values, a trace, and the functions that find a zero, a maximum, a minimum and an intersection. Technology makes accurate graphs easy, but only if the right part of the graph is on the screen.
Choosing a viewing window
The viewing window is the part of the plane shown on the screen. The default window, often −10≤x≤10 and −10≤y≤10, may hide important features or squash them so that they cannot be seen.
y = 0.1x(x − 6)(x − 14)
In the standard window the graph seems to have one peak and to fall away to the right. A turning point and an x-intercept are off the screen.
The graph of y=0.1x(x−6)(x−14) in the standard window seems to cross the x-axis twice and fall away for ever on the right. The factorised formula shows a third zero at x=14, outside the window, and the maximum point is cut off at the top. A better window follows from the formula: the zeros are 0, 6 and 14, so x should run a little beyond them, and a table of values shows that y stays between about −17 and 11 between the zeros.
y = 0.1x(x − 6)(x − 14)
With −4 ≤ x ≤ 16 and −20 ≤ y ≤ 15, all three zeros and both turning points are visible.
Ways to choose a good window:
Start from what the formula shows: zeros from a factorised form, the y-intercept, any value where the function is undefined.
Use the domain if one is given, and set the x-range to match it exactly.
Look at a table of values to see how large and small y becomes over the chosen x-range.
Zoom out to check for features beyond the edges, then zoom in on anything that looks unclear.
Transferring a graph from the screen to paper
A sketch or drawing copied from a GDC should carry the information the screen does not show. The steps are the same every time.
Draw axes and mark the scale or the window's limits, so that the reader can see the region shown.
Use the GDC to find the key features: intercepts, maximum and minimum points, and the values at the endpoints of the domain. Record them exactly or to 3 significant figures.
Mark these points first, then draw the curve through them with the same shape as on the screen.
Draw any asymptote as a dashed line labelled with its equation, and keep the curve on the correct side of it.
Show the endpoints of a restricted domain with filled or open dots, and do not extend the curve beyond them.
Asymptotes need extra care. A screen draws a curve with pixels, so near an asymptote the curve and the line can look as if they meet, and a vertical asymptote sometimes appears as a near-vertical line joining two branches. Neither should be copied onto paper.
Graphs of sums and differences of functions
Two functions can be combined by adding or subtracting their outputs. The sum and difference are defined for every x in both domains.
(f+g)(x)=f(x)+g(x)(f−g)(x)=f(x)−g(x)
On a graph, the height of y=f(x)+g(x) at each x is the height of f plus the height of g. Where g(x)=0, the graph of f+g meets the graph of f; where g(x) is negative, f+g lies below f.
y = f(x) = x
y = g(x) = x² − 4
y = f(x) + g(x)
At x = ±2, g(x) = 0, so the graph of f + g meets the graph of f. Elsewhere the heights of f and g add.
A GDC can graph f+g and f−g directly: enter f and g, then enter a third function as their sum or difference. This avoids errors in simplifying and makes it easy to see how each part contributes.
The difference of two functions
The graph of y=f(x)−g(x) measures the vertical gap between the two graphs: it is positive where f is above g, negative where f is below g, and zero where they meet. So the zeros of f−g are the x-coordinates of the points of intersection of y=f(x) and y=g(x). This turns the problem of solving f(x)=g(x) into the problem of finding the zeros of one function, a method used throughout 2.4 and 2.10.
The difference of functions has a natural meaning in many contexts. If R(x) is the revenue and C(x) the cost of making x items, then the profit is P(x)=R(x)−C(x), and the profit is positive exactly where the revenue graph lies above the cost graph.
Exam-style questions on graphs
Calculator-allowed questions often combine two functions and ask for a sketch made with technology, followed by a "hence" part that uses it.
Self-check
To do:
I can check whether a point lies on a graph by substituting its coordinates.
To do:
I can read f(a) from a graph and solve f(x)=k graphically.
To do:
I can plot a graph accurately from a table of values with a smooth curve.
To do:
I can explain the difference between "sketch", "draw" and "plot".
To do:
I can sketch a graph from a list of features or from a real situation, labelling every key feature.
To do:
I can choose a viewing window that shows all the important features of a graph.
To do:
I can transfer a graph from a GDC to paper with intercepts, turning points, asymptotes and endpoints labelled.
To do:
I can graph f+g and f−g with technology and use the zeros of f−g to solve f(x)=g(x)
, for
0°≤x≤720°
.
(a)
Write down the period of h.
[1]1 mark
Markscheme (a)
720°A1
(b)
Write down the coordinates of the maximum point on the graph of h.
[1]1 mark
Markscheme (b)
(180°,3)A1
(c)
Sketch the graph of h, showing the coordinates of any points where the graph meets the x-axis and the coordinates of the minimum point.
[3]3 marks
Markscheme (c)
correct sinusoidal shape over one full period, starting at the origin and increasing first A1
x-intercepts at 0°, 360° and 720°
Question 2 · AA-008535 marks
The function f has domain −1≤x≤8, and its graph is shown in the following diagram. The graph passes through the points (−1,−1), (0,1), (3,3) and (8,5).
(c) The horizontal line y=3 meets the graph at three points, so f(x)=3 has three solutions (one of them is x=0).
.
x
−2
−1
0
1
2
3
4
f(x)
5
0
−3
−4
−3
Plot the seven points and join them with a smooth curve, not with straight segments. The table shows a symmetry: values equally far either side of x=1 are equal, so the lowest point is at (1,−4).
y = x² − 2x − 3
A smooth curve through the plotted points. The graph is drawn only for −2 ≤ x ≤ 4, the values in the table.
, approaching the asymptote. Since
f
is decreasing, the graph falls from there, passes through the origin, becomes negative for
0<x<2
, and falls without bound as
x
approaches
2
from the left.
For x>2: the graph is positive. It comes down from very large values just to the right of x=2 and decreases towards y=1 as x increases.
One function with all these properties is f(x)=x−2x, drawn here.
y = f(x)
Each branch approaches both asymptotes without crossing them, and the graph passes through the origin.
filling
constant depth
emptying
The emptying segment is steeper than the filling segment because the bath empties faster than it fills.
, so choose
−16≤y≤16
.
The GDC gives these features (turning points to 3 significant figures):
y-intercept (0,3), from f(0)=3.
x-intercepts (−1,0), (1,0) and (3,0).
Local maximum (−0.155,3.08) and local minimum (2.15,−3.08).
Endpoints (−2,−15) and (4,15), both included.
y = f(x), −2 ≤ x ≤ 4
Every feature found on the GDC is marked and labelled, and the curve stops at the endpoints of the domain.
On paper, the turning points can be placed approximately, as long as their coordinates are written next to them and the curve has the right shape.
-intercept:
2x=4
gives
x=2
, so
(2,0)
.
Endpoints: g(−4)=161−4=−3.9375 and g(3)=8−4=4.
y = 2ˣ − 4, −4 ≤ x ≤ 3
The curve stays just above the dashed asymptote y = −4 on the left and never meets it.
(b) The graphs meet where (f−g)(x)=0:
−x2+2x+3=0⇒x2−2x−3=0⇒(x−3)(x+1)=0
so x=−1 or x=3. Check: f(3)=7=g(3) and f(−1)=−1=g(−1). ✓
(c) Between x=−1 and x=3, f−g is positive. Its graph is symmetric about x=1, halfway between the zeros, so its greatest value is
(f−g)(1)=−1+2+3=4
The greatest vertical distance is 4 units, at x=1, where f(1)=3 and g(1)=−1.
y = f(x)
y = g(x)
y = (f − g)(x)
The zeros of f − g line up with the intersections of f and g, and its maximum is the largest gap between them.
,
x=1
and
x=1+23
.
and
(1,0)
to the minimum
(3,−2)
, then rising to
(5,2)
. Since
23≈3.46
, the outer
x
-intercepts are near
−2.46
and
4.46
.
y = f(x), −3 ≤ x ≤ 5
All given features are marked and the curve stops at the endpoints. The line y = 1 meets the graph three times.
(b) The lowest value is −2 (at x=−3 and at x=3) and the highest is 2 (at x=−1 and at x=5). The range is −2≤f(x)≤2.
(c) The line y=1 crosses the rising part on the left, the falling middle part and the rising part on the right: 3 solutions.
(d) The line y=2 touches the graph at the maximum (−1,2) and meets it at the endpoint (5,2): 2 solutions.
on the GDC with the window
−4≤x≤4
,
−5≤y≤7
.
Endpoints: h(−4)=8−2−0=6 and h(4)=8−2−8=3.17 (3 s.f.).
y-intercept: h(0)=−2−2=−4.
x-intercepts: x=−2.53 and x=3.05 (3 s.f.).
Minimum point: (0.243,−4.03) (3 s.f.).
y = h(x), −4 ≤ x ≤ 4
The zeros of h = f − g are the x-coordinates where the graphs of f and g meet.
(b) f(x)=g(x) exactly when h(x)=0, so the solutions are the x-intercepts of h: x=−2.53 and x=3.05.
.
A1
minimum point at (540°,−3)A1
Note: Award the first A1 only if the graph is drawn for 0°≤x≤720° only.
y = f(x)
on the same axes, showing the coordinates of its endpoints.