Section 1.4 Function Transformations and Graphs
After climbing a great hill, one only finds that there are many more hills to climb. — Nelson Mandela, South African anti-apartheid revolutionary, politician, and philanthropist, 1918–2013
Problem: If we know the graph of the function \(y=f(x)\text{,}\) how can we get the graph of the function \(y=-2f(x+2)+1\text{?}\)
For example: My friend Pam lives in Calgary, AB. Her older son Brandon studies mathematics at Simon Fraser University, Burnaby, BC, and her younger son Chris studies physics at the University of Waterloo, Waterloo, ON. Pam is very concerned if her sons eat their meals regularly.To be able to follow their schedules, she has made a chart. See Figure 1.33.
What do you notice? How are the three graphs related?
Example Continues: Let the variable \(t\) represent the Mountain Time in hours. Then:
For example, if time in Calgary is \(t=5\) what is time in Waterloo? In Burnaby?
Chris:
Pam:
Brandon:
Recall: The variable \(t\) represents the Mountain Time in hours.
Question: What can we say about functions \(C(t)\text{,}\) \(P(t)\text{,}\) and \(B(t)\text{?}\)
Answer: We observe that \(C(t)=P(t+2)\) and \(B(t)=P(t-1)\text{.}\)
Another look: See Figure 1.34.
Horizontal shift: Let \(f:[a,b]\to \mathbb{R}\) and let \(m\gt 0\text{.}\) Let the function \(g\) be defined by \(g(x)=f(x-m)\) and let the function \(h\) be defined by \(h(x)=f(x+m)\text{.}\)
The domain of the function \(g\) is the interval \([a+m,b+m]\) and the graph of \(g(x)\) is obtained by shifting the graph of \(f(x)\) horizontally to the right by \(m\) units.
The domain of the function \(h\) is the interval \([a-m,b-m]\) and the graph of \(h(x)\) is obtained by shifting the graph of \(f(x)\) horizontally to the left by \(m\) units.
Example 1.4.1. Horizontal shift.
The function \(f\) is given by its graph. See Figure 1.35. Draw the graph of the function \(g\) that is defined by \(g(x)=f(x-1)\text{.}\)
What is the domain of the function \(f\text{?}\) What is the domain of the function \(g\text{?}\)
Observe that the function \(f\) is defined on the interval \([-2,1)\text{.}\)
From \(g(x)=f(x-1)\) it follows that the graph of the function \(g\) is obtained by shifting the graph of \(f\) horizontally to the right by \(1\) unit. See Figure 1.36.
Observe that the function \(g\) is defined on the interval \([-1,2)\text{.}\)
Pam's story continues: Pam is very proud of her two sons. Pam thought that she knew her sons' strengths and weaknesses, but she was a bit surprised to find out the following two patterns in their academic records:
Do you see two patterns?
-
If \(x\) is a mathematics course, let \(b(x)\) be Brandon's course grade and let \(c(x)\) be Chris' course grade. Then:
\begin{equation*} b(x)=c(x)+5 \end{equation*} -
If \(x\) is one of other subjects, let \({\cal B}(x)\) be Brandon's course grade and let \({\cal C}(x)\) be Chris' course grade. Then:
\begin{equation*} {\cal B}(x)=0.8\cdot {\cal C}(x) \end{equation*}
Same just a little bit different: Let \(x\) be one of mathematics courses, let \(b(x)\) be Brandon's course grade and let \(c(x)\) be Chris' course grade. For the graphs of the functions \(b\) and \(c\) see See Figure 1.37.
Let \(x\) be one of mathematics courses, let \({\cal B}(x)\) be Brandon's course grade and let \({\cal C}(x)\) be Chris' course grade. For the graphs of the functions \({\cal B}\) and \({\cal C}\) see See Figure 1.38.
Vertical shift: Let \(f:[a,b]\to \mathbb{R}\) and let \(n\gt 0\text{.}\) Let the function \(g\) be defined by \(g(x)=f(x)+n\) and let the function \(h\) be defined by \(h(x)=f(x)-n\text{.}\)
The domain of the function \(g\) is the interval \([a,b]\) and the graph of \(g(x)\) is obtained by shifting the graph of \(f(x)\) vertically upwards by \(n\) units.
The domain of the function \(h\) is the interval \([a,b]\) and the graph of \(h(x)\) is obtained by shifting the graph of \(f(x)\) vertically downwards by \(n\) units.
Vertical stretch: Let \(f:[a,b]\to \mathbb{R}\) and let \(p\gt 0\text{.}\) Let the function \(g\) be defined by \(g(x)=p\cdot f(x)\text{.}\)
The domain of the function \(g\) is the interval \([a,b]\) and the graph of \(g(x)\) is obtained by vertically stretching the graph of \(f(x)\) by a factor of \(p\text{.}\)
Example 1.4.2. Vertical shift and vertical stretch.
The function \(f\) is given by its graph. See Figure 1.39.
Draw a graph of the function
\(\displaystyle g(x)=f(x)-1\)
\(h(x)=2\cdot f(x)\text{.}\)
What is the domain of the function \(f\text{?}\) What is the domain of the function \(g\text{?}\) What is the domain of the function \(h\text{?}\)
How would one obtain the graph of the function \(i(x)=2\cdot f(x)-1\text{?}\)
Observe that the function \(f\) is defined on the interval \([-2,1)\text{.}\)
-
From \(g(x)=f(x)-1\) it follows that the graph of \(g(x)\) is obtained by shifting the graph of the function \(f(x)\) downwards by \(1\) unit. See Figure 1.40.
Observe that the function \(g\) is defined on the interval \([-2,1)\text{.}\)
-
From \(h(x)=2f(x)\) it follows that the graph of \(h(x)\) is obtained by vertically stretching the graph of the function \(f(x)\) by a factor of \(2\text{.}\) See Figure 1.41.
Observe that the function \(h\) is defined on the interval \([-2,1)\text{.}\)
From \(i(x)=2f(x)-1=h(x)-1\) it follows that the graph of \(i(x)\) is obtained by shifting the graph of \(h\) downwards by \(1\) unit. See Figure 1.42.
Another sequel in Pam's strory: Last October, Pam's extended family got together for Thanksgiving at her sister Adriana's house in Victoria, BC. Chris and Brandon decided to use this opportunity to run the Victoria Marathon, their first marathon races ever. Brandon took his training much more seriously than Chris, so his passing times during the race and his overall time were better than his brother's:
Brandon:
Chris:
Mathematize this! Note that Brandon had ran the whole race at the constant rate of 10 km/h and that Chris' rate was 8 km/h.
Let \(t\) represent the “running time” in hours, i.e., the time that has elapsed since the start of the race. Then the distances covered during the race, up to the time \(t\) (in hours), for the two runners are given by:
Brandon: \(\mathscr{B}(t)=10t\text{,}\) \(t\in [0,4.22]\)
Chris: \(\mathscr{C}(t)=8t\text{,}\) \(t\in [0,5.28]\)
See Figure 1.43.
Observation: Note that
It follows that, for \(t\in [0,4.22]\text{,}\)
Closer look:
See Figure 1.44.
Horizontal stretch: Let \(f:[a,b]\to \mathbb{R}\) and let \(q\gt 0\text{.}\) Let the function \(g\) be defined by \(g(x)=f(q\cdot x)\text{.}\)
The domain of the function \(g\) is the interval \(\displaystyle \left[\frac{1}{q}\cdot a,\frac{1}{q}\cdot b\right]\) and the graph of \(g(x)\) is obtained by horizontally stretching the graph of \(f(x)\) by a factor of \(\displaystyle \frac{1}{q}\text{.}\)
Example 1.4.3. Horizontal stretch.
The function \(f\) is given by its graph. See Figure 1.45.
Draw a graph of the function
\(\displaystyle g(x)=f(2x)\)
\(h(x)=f\left( \frac{1}{2}\cdot x\right)\text{.}\)
What is the domain of the function \(f\text{?}\) What is the domain of the function \(g\text{?}\) What is the domain of the function \(h\text{?}\)
Observe that the function \(f\) is defined on the interval \([-2,1)\text{.}\)
-
From \(g(x)=f(2x)\) it follows that the graph of \(g(x)\) is obtained by horizontally stretching the graph of the function \(f(x)\) by a factor of \(\frac{1}{2}\) unit. See Figure 1.46.
Observe that the function \(g\) is defined on the interval \(\left[-1,\frac{1}{2}\right)\text{.}\)
-
From \(h(x)=2f(x)\) it follows that the graph of \(h(x)\) is obtained by horizontally stretching the graph of the function \(f(x)\) by a factor of \(2\text{.}\) See Figure 1.47.
Observe that the function \(h\) is defined on the interval \([-4,2)\text{.}\)
Example 1.4.4. Reflections.
The function \(f\) is given by its graph. See Figure 1.48.
Draw a graph of the function
\(\displaystyle g(x)=-f(x)\)
\(h(x)=f(-x)\text{.}\)
What is the domain of the function \(f\text{?}\) What is the domain of the function \(g\text{?}\) What is the domain of the function \(h\text{?}\)
Observe that the function \(f\) is defined on the interval \([-2,1)\text{.}\)
-
From \(g(x)=-f(x)\) it follows that, for all \(x\in[-2,1)\) the points \((x,f(x))\) and \((x,g(x))\) are symmetric with respect to the \(x\)–axis. Therefore the graph of \(g(x)\) is obtained by reflecting the graph of the function \(f(x)\) across the \(x\)–axis. See Figure 1.49.
Observe that the function \(g\) is defined on the interval \([-2,1)\text{.}\)
-
From \(h(x)=f(-x)\) it follows that, for all \(x\in[-2,1)\) the points \((x,f(x))\) and \((-x,g(x))\) are symmetric with respect to the \(y\)–axis. Therefore the graph of \(h(x)\) is obtained by reflecting the graph of the function \(f(x)\) across the \(y\)–axis. See Figure 1.50.
Observe that the function \(h\) is defined on the interval \((-1,2]\text{.}\)
Summary: Assume that a graph of the function \(f:[a,b]\to \mathbb{R}\) is given and assume that \(m\text{,}\) \(n\text{,}\) \(p\text{,}\) and \(q\) are positive real numbers.
Then:
* \({\small (x,y)}\) is a point on the graph of the function \(f\text{.}\)
Example 1.4.5. Putting everything together.
The function \(f\) is given by its graph. See Figure 1.51.
Draw a graph of the function \(g(x)=-2f(x+2)+1\text{.}\)
What is the domain of the function \(f\text{?}\) What is the domain of the function \(g\text{?}\)
Observe that the function \(f\) is defined on the interval \([-2,1)\text{.}\)
Our strategy is to obtain a graph of the \(g(x)=-2f(x+2)+1\) in the following four steps.
Step 1: Obtain a graph of the function \(g_1(x)=f(x+2)\) by shifting the graph of the function \(f(x)\) horizontally to the left by 2 units. See Figure 1.52.
Step 2: Obtain a graph of the function \(g_2(x)=2g_1(x)=2f(x+2)\) by vertically stretching the graph of the function \(g_1(x)\) by a factor of 2. See Figure 1.53.
Step 3: Obtain a graph of the function \(g_3(x)=-g_2(x)=-2f(x+2)\) by reflecting the graph of the function \(g_2(x)\) across the \(x\)–axis. See Figure 1.54.
Step 4: Obtain a graph of the function \(g_4(x)=g_3(x)+1=-2f(x+2)+1=g(x)\) by shifting upwards the graph of the function \(g_3(x)\) by one unit. See Figure 1.55.
Observe that the function \(g\) is defined on the interval \([-4,-1)\text{.}\)
Even and odd functions:
-
Even: We say that \(f:[-a,a]\to \mathbb{R}\) is an even function if
\begin{equation*} (-x)=f(x) \text{ for all } x\in [-a,a]\text{.} \end{equation*} -
Odd: We say that \(f:[-a,a]\to \mathbb{R}\) is an odd function if
\begin{equation*} f(-x)=-f(x) \text{ for all } x\in [-a,a]\text{.} \end{equation*}
Example 1.4.6. Even or odd?
Check if the given function is even, odd or, neither.
\(\displaystyle f(x)=x^2\)
\(\displaystyle g(x)=x^3\)
\(\displaystyle h(x)=x^3-x^2\)
-
From, for all \(x\in \mathbb{R}\text{,}\)
\begin{equation*} f(-x)=(-x)^2=x^2=f(x) \end{equation*}it follows that the function \(f\) is even.
-
From, for all \(x\in \mathbb{R}\text{,}\)
\begin{equation*} g(-x)=(-x)^3=-x^3=-g(x) \end{equation*}it follows that the function \(f\) is odd.
-
From, for all \(x\in \mathbb{R}\text{,}\)
\begin{equation*} h(-x)=(-x)^3-(-x)^2=-x^3-x^2 \end{equation*}it follows that the function \(h\) is neither even nor odd.
Example 1.4.7. Even or odd? - Again.
Check if the given function is even, odd or, neither.
Observe that this graph is symmetric with respect to the \(y\)–axis. This means that the function is even. (This is actually a graph of the function \(x\mapsto x^2\text{.}\))
Observe that this graph is symmetric with respect to the origin. This means that the function is odd. (This is actually a graph of the function \(x\mapsto x^3\text{.}\))
Observe that this graph is symmetric neither with respect to the origin nor to the \(y\)–axis. This means that the function is neither odd nor even. (This is actually a graph of the function \(x\mapsto x^3-x^2\text{.}\))