Section 2.2 Symmetry, Transformations and Compositions
¶Subsection 2.2.1 Symmetry
When graphing functions, we can sometimes make use of their inherit symmetry with respect to the coordinate axes to ease geometric interpretation. Not all functions exhibit symmetry, but for those that do, we differentiate between even and odd symmetry as defined below.
Definition 2.9. Function Symmetry.
A function \(y=f(x)\) is called: | even if \(f(x)=f(-x)\text{,}\) and |
odd if \(f(x)=-f(-x)\text{,}\) and | |
neither otherwise. |
Note:
The graph of an even function stays the same when reflected in the \(y\)-axis. Examples of such functions are \(f(x) = |x|\text{,}\) \(g(x)=\cos(x)\) and \(h(x)=x^2\) as shown in ¹ó¾±²µ³Ü°ù±ðÌý2.2.
The graph of an odd function stays the same when reflected in the \(x\)-axis and the \(y\)-axis, or alternatively, rotated by 180\(^{\circ}\) around the origin. Examples of such functions are \(f(x)=1/x\text{,}\) \(g(x)=\sin(x)\text{,}\) and \(h(x)=x^3\) as shown in ¹ó¾±²µ³Ü°ù±ðÌý2.3.
Subsection 2.2.2 Transformations
Transformations are operations we can apply to a function in order to obtain a new function. The most common transformations include translations (shifts), stretches and reflections. We summarize these below.
For horizontal and vertical stretches, different resources use different terminology and notation. Use the one you are most comfortable with! Below, both \(a,b\) are positive numbers. Note that we only use the term stretch in this case:
In the next case, we use both the terms stretch and shrink. We also split up vertical stretches into two cases (\(0\lt a\lt 1\) and \(a>1\)), and split up horizontal stretches into two cases (\(0\lt b\lt 1\) and \(b>1\)). Note that having \(0\lt a\lt 1\) is the same as having \(1/c\) with \(c>1\text{.}\) Also note that stretching by a factor of \(1/c\) is the same as shrinking by a factor \(c\).
Some resources keep the condition \(0\lt c\lt 1\) rather than using \(1/c\text{.}\) This is illustrated in the next table.
Interactive Demonstration. Investigate the transformations \(y = Af(B(x-C))+D \) with the graph of \(f(x) = x^2 \) below:
Example 2.10. Transformations and Graph Sketching.
In this example we will use appropriate transformations to sketch the graph of the function
We start with the graph of a function we know how to sketch, in particular, \(y=\sqrt{x}\text{:}\) To obtain the graph of the function \(y=\sqrt{x+2}\) from the graph \(y=\sqrt{x}\text{,}\) we must shift \(y=\sqrt{x}\) to the left by \(2\) units. To obtain the graph of the function \(y=\sqrt{x+2}-1\) from the graph \(y=\sqrt{x+2}\text{,}\) we must shift \(y=\sqrt{x+2}\) downwards by \(1\) unit.
To obtain the graph of the function \(y=|\sqrt{x+2}-1|\) from the graph \(y=\sqrt{x+2}-1\text{,}\) we must take the part of the graph of \(y=\sqrt{x+2}-1\) that lies below the \(x\)-axis and reflect it (upwards) about the \(x\)-axis. Finally, to obtain the graph of the function \(y=|\sqrt{x+2}-1|-1\) from the graph \(y=|\sqrt{x+2}-1|\text{,}\) we must shift \(y=|\sqrt{x+2}-1|\) downwards by \(1\) unit:Subsection 2.2.3 Combining Two Functions
Let \(f\) and \(g\) be two functions. Then we can form new functions by adding, subtracting, multiplying, or dividing. These new functions, \(f+g\text{,}\) \(f-g\text{,}\) \(fg\) and \(f/g\text{,}\) are defined in the usual way.
Operations on Functions.
Suppose \(D_f\) is the domain of \(f\) and \(D_g\) is the domain of \(g\text{.}\) Then the domains of \(f+g\text{,}\) \(f-g\) and \(fg\) are the same and are equal to the intersection \(D_f\cap D_g\) (that is, everything that is in common to both the domain of \(f\) and the domain of \(g\)). Since division by zero is not allowed, the domain of \(f/g\) is \(\{x\in D_f\cap D_g:g(x)\neq 0\}\text{.}\)
Another way to combine two functions \(f\) and \(g\) together is a procedure called composition.
Function Composition.
Given two functions \(f\) and \(g\text{,}\) the composition of \(f\) and \(g\text{,}\) denoted by \(f\circ g\text{,}\) is defined as:
The domain of \(f\circ g\) is \(\{x\in D_g:g(x)\in D_f\}\text{,}\) that is, it contains all values \(x\) in the domain of \(g\) such that \(g(x)\) is in the domain of \(f\text{.}\)
Example 2.11. Domain of a Composition.
Let \(f(x)=x^2\) and \(g(x)=\sqrt x\text{.}\) Find the domain of \(f\circ g\text{.}\)
The domain of \(f\) is \(D_f=\{x\in\R\}\text{.}\) The domain of \(g\) is \(D_g=\{x\in\R:x\geq 0\}\text{.}\) The function \((f\circ g)(x)=f(g(x))\) is:
Typically, \(h(x)=x\) would have a domain of \(\{x\in\R\}\text{,}\) but since it came from a composed function, we must consider \(g(x)\) when looking at the domain of \(f(g(x))\text{.}\) Thus, the domain of \(f\circ g\) is \(\{x\in\R:x\geq 0\}\text{.}\)
Example 2.12. Combining Two Functions.
Let \(f(x)=x^2+3\) and \(g(x)=x-2\text{.}\) Find \(f+g\text{,}\) \(f-g\text{,}\) \(fg\text{,}\) \(f/g\text{,}\) \(f\circ g\) and \(g\circ f\text{.}\) Also, determine the domains of these new functions.
For \(f+g\) we have:
For \(f-g\) we have:
For \(fg\) we have:
For \(f/g\) we have:
For \(f\circ g\) we have:
For \(g\circ f\) we have:
The domains of \(f+g\text{,}\) \(f-g\text{,}\) \(fg\text{,}\) \(f\circ g\) and \(g\circ f\) is \(\{x\in\mathbb{R}\}\text{,}\) while the domain of \(f/g\) is \(\{x\in\mathbb{R}\,:\,x\neq 2\}\text{.}\)
As in the above problem, \(f\circ g\) and \(g\circ f\) are generally different functions.
Exercises for Section 2.2.
Exercise 2.2.1.
Starting with the graph of \(\ds y=\sqrt{x}\text{,}\) the graph of \(\ds y=1/x\text{,}\) and the graph of \(\ds y=\sqrt{1-x^2}\) (the upper unit semicircle), sketch the graph of each of the following functions:
\(\ds f(x)=\sqrt{x-2}\)
\(\ds f(x)=-1-1/(x+2)\)
-
\(\ds f(x)=4+\sqrt{x+2}\)
SolutionStarting with the graph of \(\sqrt{x}\text{,}\) we obtain the graph of \(\sqrt{x+2}\) by translating horizontally 2 units to the left:
\end{adjustbox} Finally, we translate the graph of \(\sqrt{x+2}\) vertically up by 4 units to obtain the graph of \(f(x)=4+\sqrt{x+2}\text{:}\) \(\ds y=f(x)=x/(1-x)\)
\(\ds y=f(x)=-\sqrt{-x}\)
-
\(\ds f(x)=2+\sqrt{1-(x-1)^2}\)
SolutionWe start with the graph of \(\sqrt{1-x^2}\) (note that the domain is \([-1,1]\)):
Now translate the graph horizontally by one unit to the right to obtain the graph of \(\sqrt{1-(x-1)^2}\text{:}\) Finally, we translate vertically up by 2 units to obtain the graph of \(f(x)=2+\sqrt{1-(x-1)^2}\text{:}\) \(\ds f(x)=-4+\sqrt{-(x-2)}\)
\(\ds f(x)=2\sqrt{1-(x/3)^2}\)
\(\ds f(x)=1/(x+1)\)
\(\ds f(x)=4+2\sqrt{1-(x-5)^2/9}\)
-
\(\ds f(x)=1+1/(x-1)\)
SolutionThe graph of \(\frac{1}{x}\) is shown below:
From here, we translate horizontally by 1 unit to the right, thereby obtaining the graph of \(\frac{1}{x-1}\text{:}\) Lastly, to obtain the graph of \(f(x)=1+\frac{1}{x-1}\text{,}\) we need to translate the graph of \(\frac{1}{x-1}\) vertically up by 1 unit: \(\ds f(x)=\sqrt{100-25(x-1)^2}+2\)
Exercise 2.2.2.
The graph of \(f(x)\) is shown below. Sketch the graphs of the following functions.
\(\ds y=f(x-1)\)
\(\ds y=1+f(x+2)\)
\(\ds y=1+2f(x)\)
-
\(\ds y=2f(3x)\)
SolutionTo obtain the graph of \(f(3x)\text{,}\) we must compress the graph of \(f(x)\) horizontally by a factor of \(\frac{1}{3}\text{.}\)
Finally, to obtain the graph of \(2f(3x)\text{,}\) we take the graph of \(f(3x)\) and stretch vertically by a factor of 2: \(\ds y=2f(3(x-2))+1\)
\(\ds y=(1/2)f(3x-3)\)
\(\ds y=f(1+x/3)+2\)
\(\ds y=|f(x)-2|\)
Exercise 2.2.3.
Suppose \(f(x) = 3x-9\) and \(\ds g(x) = \sqrt{x}\text{.}\) What is the domain of the composition \((g\circ f)(x)\text{?}\)
AnswerExercise 2.2.4.
Let \(f(x) = 2x^{2} - x + 4\text{.}\) Find and simplify
We have \(f(x) = 2x^{2} - x + 4\text{.}\) So,
Exercise 2.2.5.
Let \(h(x) = \dfrac{2+x}{\sqrt{x^{2}+4x}}\text{.}\) Find two functions \(f\) and \(g\) (not necessarily unique) such that,
-
\(h(x) = (f + g)(x)\)
Answer\(f(x) = \dfrac{2}{\sqrt{x^{2}+4x}}\text{,}\) \(g = \dfrac{x}{\sqrt{x^{2}+4x}}\) -
\(h(x) = (fg)(x)\)
AnswerSolution\(f(x) = 2+x\text{,}\) \(g = \dfrac{1}{\sqrt{x^{2}+4x}}\)We wish to find two functions, \(f\) and \(g\text{,}\) which satisfy \((fg)(x) = h(x)\text{.}\) Try taking
\begin{equation*} f(x) = 2 + x \ \ \text{ and } \ \ g(x) = \dfrac{1}{\sqrt{x^{2} + 4x}}\text{.} \end{equation*}Then,
\begin{equation*} fg = (2+x)\left(\dfrac{1}{\sqrt{x^{2} + 4x}}\right) = \dfrac{2+x}{\sqrt{x^{2}+4x}} = h\text{.} \end{equation*} -
\(h(x) = (f \circ g)(x)\)
AnswerSolution\(f(x) = \dfrac{x}{\sqrt{x^{2}-4}}\text{,}\) \(g = 2+x\)We wish to find two functions, \(f(x)\) and \(g(x)\text{,}\) such that \(f(g(x)) = h(x) = \dfrac{2+x}{\sqrt{x^2+4x}}\text{.}\) We first notice that we can write
\begin{equation*} h(x) = \frac{2+x}{\sqrt{x^2+4x}} = \frac{2+x}{\sqrt{(x+2)^2-4}}\text{.} \end{equation*}Let \(g(x) = 2+x\text{.}\) Then we need to take \(f(x) = \dfrac{x}{x^2-4}\text{.}\) Thus,
\begin{equation*} f(g(x)) = f(2+x) = \frac{2+x}{\sqrt{(2+x)^2-4}} = \frac{2+x}{\sqrt{x^2+4x}} = h(x)\text{.} \end{equation*}