12.3 Graphs of y = f(ax + b)
AHL 2.16
- how to sketch \(y = f(ax + b)\) from the graph of \(y = f(x)\): stretch parallel to the \(x\)-axis, then translate
- how to find the image of a point, an asymptote or a turning point under \(y = f(ax + b)\)
- how to combine these changes with vertical changes, as in \(y = c\,f(ax + b) + d\)
Two changes inside \(f\)
Let \(a \neq 0\). In \(y = f(ax + b)\) both changes are inside \(f\), so both act on \(x\). First factorise \(a\) out of the bracket:
\[ f(ax + b) = f\left(a\left(x + \frac{b}{a}\right)\right). \]
Then do two steps, in this order:
- Stretch parallel to the \(x\)-axis with scale factor \(\dfrac{1}{|a|}\). If \(a < 0\), also reflect in the \(y\)-axis.
- Translate \(-\dfrac{b}{a}\) units in the \(x\)-direction: to the left if \(-\dfrac{b}{a} < 0\), to the right if \(-\dfrac{b}{a} > 0\).
Example. \(y = \sqrt{2x + 4}\). Write
\[ \sqrt{2x + 4} = \sqrt{2(x + 2)}. \]
- Stretch \(y = \sqrt{x}\) parallel to the \(x\)-axis with scale factor \(\dfrac{1}{2}\): this gives \(y = \sqrt{2x}\).
- Translate \(2\) units to the left: this gives \(y = \sqrt{2(x + 2)} = \sqrt{2x + 4}\).
The end point \((0, 0)\) moves to \((-2, 0)\) (Figure 1).
First translate \(-b\) units in the \(x\)-direction. Then stretch parallel to the \(x\)-axis with scale factor \(\dfrac{1}{|a|}\) (and reflect in the \(y\)-axis if \(a < 0\)). This gives the same graph.
If \(a < 0\), for example \(f(4 - 2x) = f\big(-2(x - 2)\big)\):
- Stretch parallel to the \(x\)-axis with scale factor \(\dfrac{1}{2}\), and reflect in the \(y\)-axis.
- Translate \(2\) units to the right.
A point \((u, v)\) on \(y = f(x)\) moves to
\[ (u, v) \longrightarrow \left(\frac{u - b}{a},\, v\right). \]
The image of a point
On \(y = f(ax + b)\) we get the old value \(f(X)\) when \(ax + b = X\). So each point moves to the \(x\)-value that solves this equation.
The image of a point under \(y = f(ax + b)\) Not in the formula booklet
\[ (x,\, y) \;\longmapsto\; \left(\frac{x - b}{a},\; y\right) \]
To find the new \(x\), solve \(ax + b = (\text{old } x)\). Vertical asymptotes move in the same way; horizontal asymptotes do not move.
- \(a\): the coefficient of \(x\) inside \(f\) (\(a \neq 0\))
- \(b\): the constant added to \(ax\) inside \(f\)
The \(y\)-coordinates do not change. So a maximum point stays a maximum point and a minimum point stays a minimum point (even when \(a < 0\)), and the range of the function does not change.
Example 1 Describe how to obtain the graph of \(y = \ln(2x - 4)\) from the graph of \(y = \ln x\). Sketch both graphs, showing the asymptote and the \(x\)-intercept.
Write \(\ln(2x - 4) = \ln\big(2(x - 2)\big)\).
- \(y = \ln x \to y = \ln 2x\): stretch parallel to the \(x\)-axis, scale factor \(\frac{1}{2}\).
- \(y = \ln 2x \to y = \ln\big(2(x - 2)\big)\): translate \(2\) units in the positive \(x\)-direction.
The asymptote \(x = 0\) becomes \(x = \frac{0 + 4}{2} = 2\). The \(x\)-intercept \((1, 0)\) becomes \(\left(\frac{1 + 4}{2}, 0\right) = \left(\frac{5}{2}, 0\right)\).
Check: \(\ln(2x - 4) = 0 \Rightarrow 2x - 4 = 1 \Rightarrow x = \frac{5}{2}\) ✓.
Example 2 The graph of \(y = f(x)\), for \(x > -1\), has asymptotes \(x = -1\) and \(y = 3\). It crosses the \(x\)-axis at \((1, 0)\) and \((5, 0)\) and has a minimum point \(A(2, -1)\).
Sketch the graph of \(y = f(2x - 1)\). Show the asymptotes, the axis intercepts and the point corresponding to \(A\).
\((x, y) \longmapsto \left(\frac{x + 1}{2}, y\right)\): stretch parallel to the \(x\)-axis with scale factor \(\frac{1}{2}\), then translate \(\frac{1}{2}\) unit right.
- Asymptote \(x = -1 \to x = \frac{-1 + 1}{2} = 0\). So the \(y\)-axis is now an asymptote. The asymptote \(y = 3\) does not change.
- \((1, 0) \to (1, 0)\) (this point happens to be invariant) and \((5, 0) \to (3, 0)\).
- \(A(2, -1) \to \left(\frac{3}{2}, -1\right)\), still a minimum point.
- The new graph is only defined for \(2x - 1 > -1\), that is \(x > 0\). So it has no \(y\)-intercept.
Graphs of \(y = c\,f(ax + b) + d\)
Now add the vertical changes from 12.2. Changes inside \(f\) act on \(x\) (and do the opposite); changes outside \(f\) act on \(y\) (and do what they say). The horizontal and vertical parts do not affect each other.
The image of a point under \(y = c\,f(ax + b) + d\) Not in the formula booklet
\[ (x,\, y) \;\longmapsto\; \left(\frac{x - b}{a},\; cy + d\right) \]
- \(c\): the vertical scale factor (multiplies \(f\))
- \(a\): the coefficient of \(x\) inside \(f\) (\(a \neq 0\))
- \(b\): the constant added to \(ax\) inside \(f\)
- \(d\): the constant added outside \(f\) (vertical translation)
Example 3 The graph of \(y = f(x)\) has a maximum point \(P(4, 3)\), an \(x\)-intercept \(Q(-2, 0)\), and asymptotes \(x = 1\) and \(y = -1\).
(a) Describe a sequence of transformations that maps the graph of \(y = f(x)\) onto the graph of \(y = 2f(2x + 6) - 1\).
(b) Find the images of \(P\) and \(Q\), and the asymptotes of the new graph.
(a) \(2f(2x + 6) - 1 = 2f\big(2(x + 3)\big) - 1\).
- Stretch parallel to the \(x\)-axis with scale factor \(\frac{1}{2}\).
- Translate \(3\) units in the negative \(x\)-direction.
- Stretch parallel to the \(y\)-axis with scale factor \(2\).
- Translate \(1\) unit in the negative \(y\)-direction.
Steps 3 and 4 must stay in this order (multiply, then subtract). Steps 1 and 2 must also stay in this order: if you translate first, the translation must be \(6\) units instead (see the note “Another order” above).
(b) \((x, y) \longmapsto \left(\frac{x - 6}{2},\; 2y - 1\right)\).
- \(P(4, 3) \to \left(\frac{4 - 6}{2},\; 2 \times 3 - 1\right) = (-1, 5)\), still a maximum point.
- \(Q(-2, 0) \to \left(\frac{-2 - 6}{2},\; 2 \times 0 - 1\right) = (-4, -1)\). It is no longer on the \(x\)-axis.
- Asymptotes: \(x = 1 \to x = \frac{1 - 6}{2} = -\frac{5}{2}\), and \(y = -1 \to y = 2 \times (-1) - 1 = -3\).
Common errors
| ✗ Wrong | ✓ Right | Why |
|---|---|---|
| \(y = f(2x - 4)\): stretch by \(\frac{1}{2}\), then translate 4 right | Translate 2 right | \(f(2x - 4) = f\big(2(x - 2)\big)\): factor out \(a\) first. |
| \(y = f(3x + 6)\): stretch by \(\frac{1}{3}\), then translate \(6\) left | Stretch by \(\frac{1}{3}\), then translate \(2\) left (or translate \(6\) left first, then stretch) | After the stretch the shift is \(\frac{b}{a} = \frac{6}{3} = 2\). Stretching then translating \(6\) left gives \(f(3x + 18)\). |
| Under \(y = f(2x - 1)\), \((5, 0) \to (9, 0)\) | \((5, 0) \to (3, 0)\) | Solve \(2x - 1 = 5\). Inside changes do the opposite. |
| \(y = f(2x + 1)\) is a stretch with scale factor \(2\) | Scale factor \(\frac{1}{2}\), parallel to the \(x\)-axis | The \(x\)-values are divided by \(2\), so the graph is squashed. |
| Under \(y = f(2x + 1)\) the asymptote \(y = 1\) becomes \(y = \frac{1}{2}\) | It stays \(y = 1\) | Changes inside \(f\) only move \(x\)-coordinates. |
| \(f(4 - 2x)\): translate \(4\) left, then reflect | \(f\big(-2(x - 2)\big)\): stretch and reflect, then translate \(2\) right | Factor out \(a = -2\), including its sign. |
Exercises
1 The point \((6, -2)\) lies on the graph of \(y = f(x)\). Find its image on the graph of
(a) \(y = f(2x + 4)\)
(b) \(y = f\left(\frac{1}{2}x - 3\right)\)
(c) \(y = f(3x - 3)\)
(d) \(y = f(2 - x)\)
(a) Solve \(2x + 4 = 6\): \(x = 1\). Image \((1, -2)\).
(b) Solve \(\frac{1}{2}x - 3 = 6\): \(x = 18\). Image \((18, -2)\).
(c) Solve \(3x - 3 = 6\): \(x = 3\). Image \((3, -2)\).
(d) Solve \(2 - x = 6\): \(x = -4\). Image \((-4, -2)\).
2 Describe how to obtain the graph of \(y = \sqrt{3x - 6}\) from the graph of \(y = \sqrt{x}\). Write down the domain and the end point of the new graph.
\(\sqrt{3x - 6} = \sqrt{3(x - 2)}\): a stretch parallel to the \(x\)-axis with scale factor \(\frac{1}{3}\), then a translation of \(2\) units in the positive \(x\)-direction.
Domain: \(3x - 6 \ge 0\), so \(x \ge 2\). The end point \((0, 0)\) moves to \(\left(\frac{0 + 6}{3}, 0\right) = (2, 0)\).
3 The graph of \(y = x^2\) is transformed in two ways:
(i) translate by \(\begin{pmatrix} 2 \\ 0 \end{pmatrix}\), then stretch parallel to the \(x\)-axis with scale factor \(\frac{1}{2}\);
(ii) stretch parallel to the \(x\)-axis with scale factor \(\frac{1}{2}\), then translate by \(\begin{pmatrix} 2 \\ 0 \end{pmatrix}\).
Find the equation and the vertex of each final graph.
(i) \(y = (x - 2)^2 \to y = (2x - 2)^2\). Vertex: \(2x - 2 = 0\), so \((1, 0)\).
(ii) \(y = (2x)^2 \to y = \big(2(x - 2)\big)^2 = (2x - 4)^2\). Vertex \((2, 0)\).
The two graphs are different: the order matters.
4 The graph of \(y = f(x)\) has a maximum point \((3, 4)\) and asymptotes \(x = -1\) and \(y = 1\). For each graph, state the maximum point and the asymptotes.
(a) \(y = f(2x + 1)\)
(b) \(y = f\left(\frac{1}{2}x - 1\right)\)
(a) \((x, y) \mapsto \left(\frac{x - 1}{2}, y\right)\): maximum \((1, 4)\); asymptotes \(x = \frac{-1 - 1}{2} = -1\) and \(y = 1\).
(b) Solve \(\frac{1}{2}x - 1 = (\text{old } x)\), so \(x = 2(\text{old } x) + 2\). Maximum \((2 \times 3 + 2, 4) = (8, 4)\); asymptotes \(x = 2 \times (-1) + 2 = 0\) and \(y = 1\).
5 Describe how to obtain the graph of \(y = \ln(2x + 4)\) from the graph of \(y = \ln x\). State the vertical asymptote and the axis intercepts of \(y = \ln(2x + 4)\).
\(\ln(2x + 4) = \ln\big(2(x + 2)\big)\): a stretch parallel to the \(x\)-axis with scale factor \(\frac{1}{2}\), then a translation of \(2\) units in the negative \(x\)-direction.
Asymptote: \(x = \frac{0 - 4}{2} = -2\).
\(x\)-intercept: \(2x + 4 = 1 \Rightarrow x = -\frac{3}{2}\), so \(\left(-\frac{3}{2}, 0\right)\). \(\;y\)-intercept: \((0, \ln 4)\).
6 The graph of \(y = f(x)\) is stretched parallel to the \(x\)-axis with scale factor \(\frac{1}{3}\) and then translated by \(\begin{pmatrix} -2 \\ 0 \end{pmatrix}\).
(a) Write the equation of the new graph in the form \(y = f(ax + b)\).
(b) Do the same when the two transformations are done in the opposite order.
(a) \(y = f(3x) \to y = f\big(3(x + 2)\big) = f(3x + 6)\).
(b) \(y = f(x + 2) \to y = f(3x + 2)\). (Every \(x\) is replaced by \(3x\).)
7 Describe a sequence of two transformations that maps the graph of \(y = f(x)\) onto the graph of \(y = f(4x - 2)\). The point \((-6, 5)\) lies on \(y = f(x)\). Find its image.
\(f(4x - 2) = f\left(4\left(x - \frac{1}{2}\right)\right)\): a stretch parallel to the \(x\)-axis with scale factor \(\frac{1}{4}\), then a translation of \(\frac{1}{2}\) unit in the positive \(x\)-direction.
Solve \(4x - 2 = -6\): \(x = -1\). Image \((-1, 5)\).
8 Let \(f(x) = x^2 - 4x\) and \(g(x) = 3f(2x - 1) + 5\).
(a) Describe a sequence of transformations that maps the graph of \(f\) onto the graph of \(g\).
(b) Use the vertex of \(f\) to find the vertex of \(g\).
(c) Write \(g(x)\) in the form \(px^2 + qx + r\) and check your answer to (b).
(a) \(g(x) = 3f\left(2\left(x - \frac{1}{2}\right)\right) + 5\): a stretch parallel to the \(x\)-axis with scale factor \(\frac{1}{2}\), a translation of \(\frac{1}{2}\) unit in the positive \(x\)-direction, a stretch parallel to the \(y\)-axis with scale factor \(3\), and a translation of \(5\) units in the positive \(y\)-direction.
(b) \(f(x) = (x - 2)^2 - 4\) has vertex \((2, -4)\). \(\;(x, y) \mapsto \left(\frac{x + 1}{2}, 3y + 5\right)\), so the vertex of \(g\) is \(\left(\frac{3}{2}, -7\right)\).
(c) \(g(x) = 3\big((2x - 1)^2 - 4(2x - 1)\big) + 5 = 3(4x^2 - 12x + 5) + 5 = 12x^2 - 36x + 20\).
Check: \(x = \frac{36}{2 \times 12} = \frac{3}{2}\) and \(g\left(\frac{3}{2}\right) = 27 - 54 + 20 = -7\) ✓.
9 The graph of \(y = f(2x - 6)\) has a minimum point \((5, -3)\) and a vertical asymptote \(x = 1\). Find the minimum point and the vertical asymptote of the graph of \(y = f(x)\).
The point with \(x\)-coordinate \(x\) on \(y = f(2x - 6)\) comes from the point with \(x\)-coordinate \(2x - 6\) on \(y = f(x)\).
Minimum: \(2 \times 5 - 6 = 4\), so \((4, -3)\). Asymptote: \(2 \times 1 - 6 = -4\), so \(x = -4\).
10 Describe how to obtain the graph of \(y = \sqrt{4 - 2x}\) from the graph of \(y = \sqrt{x}\). Write down the domain, the end point and the \(y\)-intercept of the new graph.
\(\sqrt{4 - 2x} = \sqrt{-2(x - 2)}\): a stretch parallel to the \(x\)-axis with scale factor \(\frac{1}{2}\) together with a reflection in the \(y\)-axis (giving \(y = \sqrt{-2x}\)), then a translation of \(2\) units in the positive \(x\)-direction.
Domain: \(4 - 2x \ge 0\), so \(x \le 2\). The end point \((0, 0)\) moves to \(\left(\frac{0 - 4}{-2}, 0\right) = (2, 0)\).
\(y\)-intercept: \(\sqrt{4} = 2\), so \((0, 2)\).