Transformations of graphs and rational functions
IB Math AA · Functions
Transformations of graphs
Starting from $y=f(x)$:
- $y=f(x-a)$ — translation $a$ units in the positive $x$ direction;
- $y=f(x)+b$ — translation $b$ units in the positive $y$ direction;
- $y=pf(x)$ — vertical stretch, scale factor $p$;
- $y=f(qx)$ — horizontal stretch, scale factor $\dfrac{1}{q}$;
- $y=-f(x)$ — reflection in the $x$-axis; $y=f(-x)$ — reflection in the $y$-axis.
Changes outside $f$ act on $y$ and behave as you expect. Changes inside $f$ act on $x$ and behave in the opposite way: $f(x-3)$ moves the graph to the right, and $f(2x)$ makes it narrower.
Order matters
To read $y=f(qx+r)$, factorise first: $f\left(q\left(x+\dfrac{r}{q}\right)\right)$. The horizontal stretch of factor $\dfrac{1}{q}$ and the translation of $-\dfrac{r}{q}$ are then unambiguous.
The rational function
$$f(x)=\frac{ax+b}{cx+d},\qquad c\neq 0$$has a vertical asymptote where the denominator vanishes, $x=-\dfrac{d}{c}$, and a horizontal asymptote $y=\dfrac{a}{c}$. Its range is $y\neq\dfrac{a}{c}$. Writing it as $f(x)=\dfrac{a}{c}+\dfrac{k}{cx+d}$ shows it as a transformation of $y=\dfrac{1}{x}$.
Worked example: double transformation, inside and outside
The graph of $y=f(x)$ has a maximum point at $(1,4)$. Find the coordinates of the corresponding maximum point on the graph of $y=2f(2x+6)-1$.
Solution
Separate two parts: inside and outside.
Inside. The maximum point occurs when the expression in the bracket equals $1$, because that is where $f$ reaches its maximum:
$$2x+6=1\;\Longrightarrow\;x=-\frac{5}{2}=-2.5$$Outside. The value $f=4$ is multiplied by $2$ and then has $1$ subtracted:
$$y=2(4)-1=7$$So the new maximum point is $(-2.5,\,7)$.
Why you should not describe in words and then compute. If you interpret $f(2x+6)$ as "shift left by $6$ and then compress horizontally by half", then $x=1$ becomes $\dfrac{1-6}{1}$ and then $\div 2$… and everyone will end up with a different number. Only by factoring to $f\left(2(x+3)\right)$ can it be read correctly: compress horizontally by factor $\dfrac12$ first, then shift left by $3$ — giving $\dfrac12-3=-2.5$, matching the direct calculation above.
Worked example: splitting off the whole-number part of a rational function
Given $f(x)=\dfrac{2x+1}{x-3}$. State the two asymptotes and the two intercepts with the axes, describe $f$ as a sequence of transformations of $y=\dfrac{1}{x}$, then state the range of $f$.
Solution
Split off the whole-number part. Divide the numerator by the denominator:
$$\frac{2x+1}{x-3}=\frac{2(x-3)+7}{x-3}=2+\frac{7}{x-3}$$Read directly from the split form. Vertical asymptote $x=3$; horizontal asymptote $y=2$ (the value $\dfrac{7}{x-3}$ tends to $0$ from). The x-intercept is when $2x+1=0$, i.e. $\left(-\dfrac12,0\right)$; the y-intercept is at $f(0)=\dfrac{1}{-3}$, i.e. $\left(0,-\dfrac13\right)$.
Sequence of transformations from $y=\dfrac1x$: shift right $3$ units, stretch vertically by factor $7$, then shift up $2$ units.
Range. Since $\dfrac{7}{x-3}$ takes every value other than $0$, $f$ takes every value other than $2$: the range is $y\neq 2$.
Note that $-\dfrac13$ is the y-intercept, not the horizontal asymptote. These two numbers get mixed up very often because both can be obtained by "substituting $x=0$" in the head of a rushed student.