Educerie

Educerie · IB Diploma · Mathematics: analysis and approaches

IB Mathematics AA 2.3 · SL and HL

Graphs of functions

How do you turn a function, a screen or a description into a graph on paper that an examiner can read and mark?

What you will learn

  • Know that the graph of f is every point (x, y) with y = f(x), so a point is on it exactly when it fits the equation.
  • Understand that draw asks for an accurate, scaled graph and sketch asks for the right shape with labelled features.
  • Know how to turn a GDC screen, a list of facts or a described situation into a labelled sketch.
  • Understand that the graph of f + g or f − g adds or subtracts heights at each x, and how technology draws it.

You must be able to

  1. Sketch a graph from your GDC, labelling intercepts, turning points, end points and asymptotes.
  2. Draw a graph accurately from a table of values on a given scale.
  3. Sketch a possible graph from a description or a list of properties.
  4. Show that a point lies on a graph, or find a missing coordinate.
  5. Graph a sum or difference of functions with technology and interpret it, such as profit from revenue and cost.
  6. Write down zeros, maximum values and intersection points read from a GDC graph.

In the exam. in almost every paper, usually as one part of a longer question. "Sketch the graph of ff" is worth 1 to 5 marks on Paper 1 and Paper 2, most often 3; Paper 2 expects you to use your GDC to see the graph first, then put it on paper with its key features labelled. "Draw" appears less often and asks for more: a scale and accurately plotted points. The same skills carry into 2.4, where you find the key features, and into calculus, where the sketch is how you check your answers.

1The graph of a function, and the equation y=f(x)y = f(x)

  • For each input xx in the domain, ff gives one output f(x)f(x). Plot the point (x,f(x))(x, f(x)) for every input and the points join into a curve. That curve is the graph.
    • Its equation is y=f(x)y = f(x): the yy-coordinate of every point on it is ff of its xx-coordinate.

This gives a precise test.

A point (a,b)(a, b) lies on the graph of y=f(x)y = f(x) exactly when f(a)=bf(a) = b.

Take y=x2+x−6y = x^{2} + x - 6.

Is (2,0) on the graph?f(2)=4+2−6=0equals the y-coordinate: yes\text{Is }(2, 0)\text{ on the graph?} \qquad f(2) = 4 + 2 - 6 = 0 \qquad \textcolor{#838c91}{\text{equals the }y\text{-coordinate: yes}}Is (−1,−5) on the graph?f(−1)=1−1−6=−6−6≠−5: no\text{Is }(-1, -5)\text{ on the graph?} \qquad f(-1) = 1 - 1 - 6 = -6 \qquad \textcolor{#838c91}{-6 \neq -5\text{: no}}(k,6) is on the graph: k2+k−6=6(k, 6)\text{ is on the graph: } k^{2} + k - 6 = 6k2+k−12=0, so (k+4)(k−3)=0two points, both on the graphk^{2} + k - 12 = 0\text{, so } (k + 4)(k - 3) = 0 \qquad \textcolor{#838c91}{\text{two points, both on the graph}}k=−4 or k=3k = -4 \text{ or } k = 3

The test also works backwards, in many Paper 1 unknown-constant questions. If a point lies on a graph, substitute it and you have an equation.

2Shapes to know before you sketch

The guide allows functions that topic 2 never names. So a sketch starts from the family the equation belongs to. The family gives the general shape, and the GDC supplies the positions.

These are the families you meet in this course. The last column is the feature that decides the picture.

Equation looks likeGeneral shapeWhat to check
y=mx+cy = mx + cStraight lineGradient sign (up or down), yy-intercept cc
y=ax2+bx+cy = ax^{2} + bx + cParabola, one turning pointa>0a > 0 opens upwards, a<0a < 0 downwards
y=ax3+…y = ax^{3} + \dotsCubic: up-down-up or down-up-down, or no turnsSign of aa gives the right-hand end
y=ax−h+ky = \dfrac{a}{x - h} + kTwo separate branchesVertical asymptote x=hx = h, horizontal y=ky = k
y=axy = a^{x} or y=kax+cy = ka^{x} + cOne curve, always rising or always fallingHorizontal asymptote y=cy = c; no xx-intercept when kk and cc have the same sign
y=ln⁡xy = \ln xRises slowly, defined for x>0x > 0 onlyVertical asymptote x=0x = 0, xx-intercept (1,0)(1, 0)
y=asin⁡(bx)+dy = a\sin(bx) + dRepeating wave between \(d -a\) and \(d +a\)Period \(\dfrac{2\pi}{b}\); GDC in radians
\(y =x\)V with a sharp cornerCorner at the origin; the only graph here with a pointed turn

The family is also a check on odd GDC pictures. A cubic cannot have four turning points. An exponential cannot cross its own asymptote.

3"Draw" and "sketch" are different instructions

The guide expects you to know the difference between these two command terms.

Draw asks for accuracy.

  • Work in pencil and to scale.
  • Plot each point where it belongs.
  • Rule any straight line.
  • Join curved graphs with one smooth curve, and label it.

Sketch asks for the idea. The shape and the relationship must be right. Show and label the relevant features. Nothing has to be to scale.

Figure 1 puts the two side by side for y=x2−4x+1y = x^{2} - 4x + 1.

Figure 1 · Draw and sketch are different instructions (a) Draw y = x² − 4x + 1, −1 ≤ x ≤ 5 x y −1 1 2 3 4 5 −4 −2 2 4 6 (b) Sketch y = x² − 4x + 1 x y (0, 1) (0.268, 0) (3.73, 0) (2, −3) no scale needed, features labelled Left: drawn, to scale, from plotted points. Right: sketched, shape and labelled features only.
Figure 1 · Draw and sketch are different instructions

In panel (a) the graph is drawn.

  • Both axes have a scale.
  • The domain −1≤x≤5-1 \le x \le 5 is respected.
  • The seven points from a table of values are plotted.
  • One smooth curve joins them, not straight segments.

In panel (b) the graph is sketched. There is no scale, but the shape is right (a U-shaped parabola) and in the right place.

Every feature is labelled with its coordinates: the yy-intercept (0,1)(0, 1), the two xx-intercepts (0.268,0)(0.268, 0) and (3.73,0)(3.73, 0), and the vertex (2,−3)(2, -3).

The marker looks for different things.

  • A drawn graph earns marks for accuracy: points in the right squares, a smooth curve, the correct domain.
  • A sketch earns marks for shape and features: correct general shape, correct position, and labelled intercepts, turning points, end points and asymptotes.

A beautiful curve with no labels scores badly on a sketch.

Drawing from a table of values

  • When a curve has to be drawn, make the table first. Choose the xx-values across the domain you were given.
    • For y=12x2−x−2y = \tfrac{1}{2}x^{2} - x - 2 on −2≤x≤4-2 \le x \le 4, the values are
xx−2-2−1-10011223344
yy22−0.5-0.5−2-2−2.5-2.5−2-2−0.5-0.522
  • The scale must fit yy from −2.5-2.5 to 22 and xx from −2-2 to 44. The table mirrors about x=1x = 1, which locates the lowest point and checks your arithmetic.

Drawing a straight line from information

  • A line needs two points and a ruler.
    • Given the intercepts (−4,0)(-4, 0) and (0,3)(0, 3), plot both and join them. Extend the line a little beyond each.
    • Given a gradient and a yy-intercept, such as −23-\tfrac{2}{3} and (0,5)(0, 5), plot the intercept. Then move 3 right and 2 down to find a second point.
    • Given an equation, substitute two convenient xx-values and plot the points.

Two related words:

  • Plot = mark the positions of points on a diagram. You plot before you draw.
  • Label = name the features, usually with coordinates or an equation.

4From screen to paper

  • On Paper 2 you usually see the graph on your GDC first. The screen is a window onto the graph = a rectangle from some xx-minimum to some xx-maximum and some yy-minimum to some yy-maximum.
    • Changing the window shows more or less of the function. A bad window can hide exactly what the question is about.
  • Figure 2 shows the danger with y=x3−12x+30y = x^{3} - 12x + 30. In the standard window (−10-10 to 1010 on both axes) you see a steep line crossing the xx-axis near −4-4. The turning points, at y=46y = 46 and y=14y = 14, are off the top.
    • Change the window to −6≤x≤6-6 \le x \le 6 and −20≤y≤60-20 \le y \le 60 and the whole shape appears.
Figure 2 · The same function in two windows (a) −10 ≤ x ≤ 10, −10 ≤ y ≤ 10 x y −10 10 −10 −5 5 10 where are the turning points? (b) −6 ≤ x ≤ 6, −20 ≤ y ≤ 60 x y −6 −2 2 4 6 −20 20 60 y = x³ − 12x + 30. The standard window shows almost nothing; the second shows every feature.
Figure 2 · The same function in two windows

Choosing a window.

  • If the question gives a domain, such as −2≤x≤3-2 \le x \le 3, use it for xx.
  • Then choose yy so that everything shows. Many GDCs have a zoom-fit or auto option that sets yy for your xx-range. A table of values tells you how high and low the function goes.
  • If there is no domain, zoom out until you are confident nothing is happening off screen. Then zoom back in to a window that shows every feature.

Transferring the graph. With a good window, work through the same list every time.

  1. Draw and label both axes, xx and yy (or tt and hh, or whatever the variables are).
  2. Mark the scale lightly with the window limits, so the sketch has the right proportions. If the question gives the window, such as −3≤x≤3-3 \le x \le 3 and −4≤y≤12-4 \le y \le 12, write those limits on the axes. Some markschemes give a mark for them.
  3. Find each key feature with the GDC: yy-intercept, xx-intercepts, maximum and minimum points, end points of the domain, and any asymptotes. How to find them is 2.4.
  4. Mark each feature as a point, with coordinates beside it (3 significant figures unless exact values are obvious). Keep positions about right: a minimum below the yy-intercept, or an end point at height about 7, must look so. Markschemes give a mark for "approximately correct positions", with little tolerance.
  5. Join the points with the shape you saw on the screen. Keep it smooth, with turning points rounded, not pointed.
  6. Stop at the end points of the domain. Make an asymptote look like one: the curve gets closer and closer to the line without crossing it (unless the screen shows that it does).

Figure 3 is the result for y=x3−12x+30y = x^{3} - 12x + 30. The GDC gave the local maximum (−2,46)(-2, 46), the local minimum (2,14)(2, 14), the yy-intercept (0,30)(0, 30) and the one xx-intercept (−4.35,0)(-4.35, 0).

Figure 3 · From screen to paper: y = x³ − 12x + 30 x y local maximum (−2, 46) local minimum (2, 14) (0, 30) (−4.35, 0) y = x³ − 12x + 30 Every feature the GDC gave is marked with its coordinates, and the shape between them is smooth.
Figure 3 · From screen to paper: y = x³ − 12x + 30

Reading values from the screen

  • Many Paper 2 parts say only "find" or "write down". They expect a number from the GDC graph, with no sketch: a zero, the maximum value, or a point where two graphs meet.
  • The zeros of ff, the roots of f(x)=0f(x) = 0 and the xx-intercepts of y=f(x)y = f(x) are the same numbers. Where two graphs meet, the GDC's intersection tool gives the point directly.
    • Use the GDC's own tools for each of these. Never trace the cursor along the curve, because trace only visits the pixels and gives an approximate value.
    • Give the answer to 3 significant figures.
    • Say which coordinate was asked for. A question that asks for the maximum value wants the yy-coordinate.
    • State the units in a context.

A sketch is marked on shape and on labelled features. Every intercept, turning point, end point and asymptote on the screen should be on the paper, with coordinates or an equation beside it.

5A sketch from information or a context

Sometimes there is no formula. The question gives facts or describes a situation. The method is the same: turn each fact into a feature, place the features, and join them with a sensible shape.

From a description

  • A pan of soup comes off the stove at 85 ∘C85\ ^{\circ}\mathrm{C} into a kitchen at 22 ∘C22\ ^{\circ}\mathrm{C}. It cools quickly at first, then more and more slowly, getting ever closer to the kitchen's temperature.
  • Sketch its temperature TT against time tt.

Read the features out of the words:

  • At t=0t = 0, T=85T = 85, so the graph starts at (0,85)(0, 85) on the vertical axis.
  • It decreases for all tt, since the soup only ever cools.
  • It falls quickly at first, so it starts steep, then flattens.
  • It approaches 2222 without reaching it, so the line T=22T = 22 is a horizontal asymptote, drawn dashed and labelled with its equation.
  • Time cannot be negative, so the graph starts at t=0t = 0 and there is nothing to its left.

Figure 4 is that sketch. The formula behind it would be something like T=22+63e−0.05tT = 22 + 63e^{-0.05t}, an exponential model you meet in 2.9. The question did not need it: every mark is for a feature the words described.

Figure 4 · Sketching from a description: a pan of soup cooling t (min) T (°C) 22 85 T = 22 (kitchen temperature) (0, 85) falls fastest at the start Starts at 85 °C, falls fast then slowly, and approaches kitchen temperature without reaching it.
Figure 4 · Sketching from a description: a pan of soup cooling

Two habits help with every description.

  • Ask whether a limit exists. Can the quantity ever pass a limit? A population that cannot exceed what its space allows has a horizontal asymptote above the graph. A falling temperature has one below it.
  • Read speed as slope. "Faster" and "slower" mean steeper and flatter. A graph that rises ever more slowly bends over. One that rises ever faster bends upwards.

From a list of facts. A question might say:

  • gg has domain 0≤x≤60 \le x \le 6, with g(0)=−2g(0) = -2 and g(6)=−1g(6) = -1.
  • gg has a maximum at (2,3)(2, 3) and a minimum at (5,−3)(5, -3).
  • gg has a zero at x=4x = 4.

Plot those five points first. The curve starts at (0,−2)(0, -2) and must rise to the maximum. So it also crosses the xx-axis once between x=0x = 0 and x=2x = 2, and the question did not say where.

Draw that crossing in a believable spot but do not label it. Only stated features get labels.

Then fall through the zero at x=4x = 4 to the minimum and rise to the end point. Mark the end points as solid dots, because the domain includes them. Q2 below asks for the same with different information.

From properties that include asymptotes. Sketch a graph with:

  • a vertical asymptote x=−3x = -3 and a horizontal asymptote y=2y = 2
  • yy-intercept (0,−1)(0, -1) and xx-intercept (1.5,0)(1.5, 0)
  • no other intercepts.

Draw the two dashed asymptotes and plot the two intercepts. Both intercepts lie to the right of x=−3x = -3, so the right branch passes through them. It crosses the xx-axis only once.

  • Left of the intercepts. Heading left from (0,−1)(0, -1), the branch is below the axis. It must drop towards −∞-\infty beside x=−3x = -3.
  • Right of the intercepts. Heading right, the branch climbs through (1.5,0)(1.5, 0) and flattens towards y=2y = 2 from below. Nothing given stops it crossing y=2y = 2 on the way, but nothing says it does. Staying below is the simplest curve that fits.
  • The branch left of x=−3x = -3. It never meets the xx-axis. Far to the left it flattens towards y=2y = 2, above the axis. So it stays above the axis and climbs to +∞+\infty beside the asymptote. The simplest such branch lies above y=2y = 2.

The function f(x)=2−9x+3f(x) = 2 - \dfrac{9}{x + 3} fits every property, but you do not need it.

Contexts with straight pieces

  • Not every real graph is curved. Something that changes at a constant rate, stops, then changes at another constant rate is made of straight segments with corners. Think of a bath filling, standing, and draining.
  • Draw each piece with a ruler. Match each gradient to its speed: filling slowly is a gentle slope, draining fast is a steep one.

6Sums and differences of functions

Two functions can be added or subtracted: (f+g)(x)=f(x)+g(x)(f + g)(x) = f(x) + g(x) and (f−g)(x)=f(x)−g(x)(f - g)(x) = f(x) - g(x). On a graph that means one thing.

At every xx, the height of f+gf + g is the height of ff plus the height of gg.

  • Figure 5 shows it for f(x)=x2f(x) = x^{2} and g(x)=−2x+3g(x) = -2x + 3. At x=2x = 2, f(2)=4f(2) = 4 and g(2)=−1g(2) = -1, so (f+g)(2)=4+(−1)=3(f + g)(2) = 4 + (-1) = 3.
    • Do that at every xx and you get the amber curve, y=x2−2x+3y = x^{2} - 2x + 3. Where gg is negative, the sum sits below ff. Where gg is positive, it sits above.
Figure 5 · Adding two functions adds their heights x y −1 1 2 3 −2 2 4 6 8 f(2) = 4 g(2) = −1 (f + g)(2) = 3 f g f(x) = x² (solid) g(x) = −2x + 3 (dashed) f + g At every x, the height of f + g is the height of f plus the height of g. At x = 2: 4 + (−1) = 3.
Figure 5 · Adding two functions adds their heights

The guide asks you to graph sums and differences using technology, and every GDC does it the same way.

  1. Enter ff as the first function and gg as the second.
  2. Define the third as the first plus (or minus) the second. Use the calculator's own function names rather than retyping both formulas.

That keeps the three graphs linked. Change ff and the sum updates.

  • The most useful difference in practice is profit=revenue−cost\text{profit} = \text{revenue} - \text{cost}.
  • Example: a small workshop makes and sells xx items a day. Its daily revenue is R(x)=40x−0.5x2R(x) = 40x - 0.5x^{2} dollars and its daily cost is C(x)=200+10xC(x) = 200 + 10x dollars. Then its profit is
P(x)=R(x)−C(x)=40x−0.5x2−(200+10x)brackets: the whole of C is subtracted=−0.5x2+30x−200\begin{aligned}P(x) &= R(x) - C(x) \\[6pt] &= 40x - 0.5x^{2} - (200 + 10x) && \textcolor{#838c91}{\text{brackets: the whole of }C\text{ is subtracted}} \\[6pt] &= -0.5x^{2} + 30x - 200\end{aligned}
  • Figure 6 graphs all three. The profit curve is the vertical gap between RR and CC. It is positive only where the revenue curve is above the cost line, between the two crossing points. Those are the break-even points, where P(x)=0P(x) = 0.
  • The GDC's zero tool on PP gives x=7.64x = 7.64 and x=52.4x = 52.4. Its maximum tool gives the highest point of PP at (30,250)(30, 250).
    • So the workshop makes a profit when it sells between 8 and 52 items a day, since xx is a whole number. The most it can make is $250 a day, by selling 30.
Figure 6 · Profit is revenue minus cost x (items) $ 20 30 40 60 −200 200 400 600 800 max profit (30, 250) R(x) = 40x − 0.5x² C(x) = 200 + 10x P = R − C 7.64 52.4 P = R − C is positive only between the two points where R and C cross.
Figure 6 · Profit is revenue minus cost

Solving R(x)=C(x)R(x) = C(x) is the same as solving R(x)−C(x)=0R(x) - C(x) = 0. So the points where two graphs cross are exactly the zeros of their difference. That is one of the two ways 2.4 finds intersections with technology.

7Labels and axes: what every graph needs

The guide says all axes and key features should be labelled. On a sketch that list is short and fixed.

FeatureHow to show it
AxesBoth drawn and named: xx and yy, or the variables of the context with units, such as tt (min) and TT (∘C^{\circ}\mathrm{C})
InterceptsA point on the axis with its coordinates: (0,30)(0, 30), (−4.35,0)(-4.35, 0)
Turning pointsA point with coordinates, and a rounded (not pointed) turn. A parabola's turning point is its vertex, and the curve is symmetric about the vertical line through it
End pointsSolid dot if included in the domain, open circle if not; coordinates beside it. If the graph carries on beyond the window, show it with an arrowhead instead
AsymptotesA dashed line with its equation, written as an equation of a line (x=3x = 3, y=20y = 20), never as a restriction such as x≠3x \neq 3. The curve approaches it and does not touch it at the ends. Show every branch: a graph with a vertical asymptote usually has two
More than one graphOn the same axes when the question says so, never on separate ones. Each curve named: y=f(x)y = f(x), P=R−CP = R - C, and their positions relative to each other correct

Coordinates from a GDC go to 3 significant figures unless a question says otherwise. If a value is exact and obvious, such as (0,30)(0, 30), write it exactly.

Practice questions

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