Math 242: Calculus I
1.3 Combining Functions
1.3.1 Transformations of Functions¶
$$ \require{color} \definecolor{brightblue}{rgb}{.267, .298, .812} \definecolor{darkblue}{rgb}{0.0, 0.0, 1.0} \definecolor{palepink}{rgb}{1, .73, .8} \definecolor{softmagenta}{rgb}{.99,.34,.86} \definecolor{blueviolet}{rgb}{.537,.192,.937} \definecolor{jonquil}{rgb}{.949,.792,.098} \definecolor{shockingpink}{rgb}{1, 0, .741} \definecolor{royalblue}{rgb}{0, .341, .914} \definecolor{alien}{rgb}{.529,.914,.067} \definecolor{crimson}{rgb}{1, .094, .271} \def\ihat{\mathbf{\hat{\unicode{x0131}}}} \def\jhat{\mathbf{\hat{\unicode{x0237}}}} \def\khat{\mathbf{\hat{\unicode{x1d458}}}} \def\tombstone{\unicode{x220E}} \def\contradiction{\unicode{x2A33}} $$
We encounter new functions by starting with a familiar function and translating it vertically or horizontally. The shape and features of the graph of the function does not change, however the relationship between the independent and dependent variables changes because the important features of the graph are shifted to new intervals of the domain or codomain.
Another way to denote a function uses the mapsto ($\mapsto$) symbol. This is more basic than using an equation. The input variable is on the left-hand side of the symbol, and the expression on the right-hand side is the output.
Example 1¶
Consider a very simple function $x\mapsto x-4$. This function has domain and codomain $\mathbb{R}$. The equation for this function is given by
$$ y = x-4 $$
We call this simple function a horizontal shift function. If we compose a familiar function like $y=x^2$ with the horizontal shift we obtain a new function,
$$ y = (x-4)^2 $$
Notice that the horizontal shift outputs values 4 units to the left of the input. When we evaluate the parabola at this shifted value $(x-4)^2$, the output obtained is the one for the left-shifted input. In other words the output of $y=(x-4)^2$ is what the output of $y=x^2$ would have been for a value 4 units to the left on the horizontal axis. The overall effect is to move the graph 4 units to the right.
To obtain the same output as $y=x^2$, the input of $y=(x-h)^2$ must be 4 units to the right of $x$. The following video shows a right shift of $y=x^2$ to $y=(x-4)^2$, and a left shift of $y=x^2$ to $y=(x-(-3))^2 = (x+3)^2$.
Definition¶
A horizontal shift of a function $f$ occurs when one composes a horizontal shift map along the horizontal axis ($x$-axis) with $f$,
$$ x \mapsto x-h \\ $$
The input of $f$ is now the output of this map so $f(x)\longrightarrow f(x-h)$.
The shift is to the right on the horizontal axis if $h>0$
If $h>0$,the input value has been shifted left before inputting the result into $f$. The overall effect is that the outputs are pulled to the right.
The shift is to the left if $h < 0$.
Example 2¶
A vertical shift
$$ y\mapsto y+4 $$
is easier to understand because we shift the output on the vertical axis after obtaining the output of our familiar function. In this case we compose the shift function with our familiar function
$$ g(x) = \frac{x^3}{21} $$
Manipulating the output in the codomain is always more intuitively obvious that manipulating the inputs in the domain. In the video below we will shift the ouput of $g$ up 4 units and down 4 units
$$ y\mapsto y-4 $$
Definiton¶
A horizontal shift of a function $f$ occurs when one composes a vertical shift map along the vertical axis ($y$-axis) with $f$,
$$ y \mapsto y+k $$
The new output is evaluated by shifting the value after obtaining the output of $f$.
- The shift is up if $k>0$
- The shift is down if $k<0$.
Exercise 1¶
How would you shift the graph of $f(x) = \cos(x)$ in order to graph the function $h(x) = \cos\left(x-\frac{\pi}{8}\right) - 2$?
Check Your Work
One would shift the graph of $f(x)=\cos(x)$ to the right $\frac{\pi}{8}$ and down $2$.
Follow Along
The horizontal shift is applied to the input of $f$, and the shift is $x\mapsto x - \frac{\pi}{8}$. This is a shift to the left on the horizontal axis, which results in shifting the graph of $f$ to the right $\frac{\pi}{8}$ units along the horizontal axis.
The vertical shift is applied to the output of $f$, and the shift is $y\mapsto y - 2$. This is a shift down the vertical axis 2 units.
1.3.2 Dilations and Contractions¶
We can also stretch and shrink the visual aspect of a graph by multiplying the input or output by a positive constant.
Consider the map
$$ x\mapsto cx $$
If $c>1$, then multiplying by the constant $c$ amplifies the value of $x$ to a value with a larger absolute value. If $0 < c < 1$, then the map contracts the value of $x$ to one with a smaller absolute value. Since $c>0$, the sign of $x$ is unchanged. As in the case of horizontal shifts, amplifying the value of the input before evaluating a function on the dilated value has the opposite effect on the graph.
Example 3¶
Let us consider the dilation
$$ x\mapsto 2x $$
and the contraction
$$ x\mapsto \frac{x}{2} $$
When you dilate the value of the input before evaluating the function $f$, the overall effect is to contract the graph along the horizontal axis. Remember that performing your manipulation before evaluating the function always has the opposite effect on the graph. Likewise if you contract the input before evaluating the function, the overall effect is to dilate the graph along the horizontal axis.
Now define $f(x)=x^2$ and consider the composition of $f$ with these amplifications,
$$ \begin{align*} y = f(2x) &= \left(2x\right)^2 = 4x^2 \\ \\ y = f\left(\frac{x}{2}\right) &= \left(\frac{x}{2}\right)^2 = \frac{x^2}{4} \end{align*} $$
Definiton¶
A dilation of the input before evaluating a function $f$ contracts the graph of $f$ horizontally.
A contraction of the input before evaluating a function $f$ dilates the graph of $f$ horizontally.
Example 4¶
Now amplify the output of a function.
Let us consider the dilation
$$ y\mapsto 4x $$
and the contraction
$$ y\mapsto \frac{y}{4} $$
Like shifting the output, amplifying the output of a function has a clearer effect on the output. Let
$$ f(x) = x^2 $$
Definiton¶
A dilation of the input after evaluating a function $f$ dilates the graph of $f$ vertically.
A contraction of the input after evaluating a function $f$ contracts the graph of $f$ vertically.
Exercise 2¶
How would you shift the graph of $f(x) = e^x$ in order to graph the function $h(x) = 5e^{3x}$?
Check Your Work
One would contract the graph of $f(x)=e^x$ horizontally by a factor of $3$, and dilate the graph vertically by a factor of $5$.
Follow Along
The factor of $3$ multiplied by the input _dilates_ the value of the input before evaluating the exponential function. The overall effect is to __contract__ the graph of $e^x$ by a factor of $3$.
The factor of $5$ multiplied by the output __dilates__ the input and the graph vertically by a factor of $5$.
1.3.3 Reflections¶
If the coefficient of an amplification is negative, then the graph is reflected across one of the axes.
Definiton¶
If the amplification of a input is negative, the graph is reflected with respect to the vertical axis because every positive input is now negative and every negative input becomes positive.
If the amplification of a output is negative, the graph is reflected with respect to the horizontal axis because every positive output is now negative and every negative output becomes positive.
Exercise 3¶
How would you shift the graph of $f(x) = \sin(x)$ in order to graph the function $h(x) = 3\sin(-x+4) + 2$?
Check Your Work
One would reflect the graph with respect to the $x$-axis, shift the graph to the
Follow Along
$$ h(x) = 3\sin(-x+4) + 2 = 3\sin\left(-(x-4)\right) + 2 $$
Therefore function $f$ is
1. reflected with respect to the $y$-axis
2. shifted to the right 4 units
3. the output is amplified by a factor of $3$
4. then the output is shifted up 2 units
1.3.4 Set Algebra¶
Since we will be using intervals and subsets of the real line for the domain and codomain of our functions, we should know how to combine sets. Combining two sets is not the same as addition, subtraction, multiplication, and division of real numbers. However, combining set has a set of rules that obeys many of the same rules of our familiar algebra. It can be visualized using a Venn Diagrams. Like Venn diagrams, the algebra of sets corresponds to Symbolic Logic.
If anyone is unfamiliar with sets and Venn Diagrams, they should read chapter one of the OpenStax textbook Contemporary Mathematics.
Definiton¶
- The union of two intervals, $A = [a,b]$ and $B=[c,d]$, of the real line is all of the elements in either set. That means every element of either $A$ or $B$. The union of two intervals is denoted by the $\cup$ symbol,
$$ A\cup B = \left\{\,x\in\mathbb{R}\,:\,x\in A \textbf{ or } x\in B\,\right\} $$
- The intersection of two intervals, $A = [a,b]$ and $B=[c,d]$, of the real line are the elements in both sets. That means only elements in both $A$ and $B$. The intersection of two intervals is denoted by the $\cap$ symbol,
$$ A\cap B = \left\{\,x\in\mathbb{R}\,:\,x\in A \textbf{ and } x\in B\,\right\} $$
Example 5¶
Suppose that $A = [-1, 3]$, $B = [1, 4]$ and $C = [3,4)$. Then
$$ \begin{align*} A\cup B &= [-1, 4] \\ A\cap B &= [1, 3] \\ A\cup C &= [-1, 4) \\ A\cap C &= \left\{ 3 \right\} \\ B\cup C &= [1, 4] \\ B\cap C &= [3, 4) \end{align*} $$
1.3.5 Algebraic Combinations of Functions¶
Since the outputs of our functions are real numbers, we can add, subtract, multiply, and divide these outputs. This can be thought of a new functions.
Definiton¶
If $f\,:\,A\rightarrow\mathbb{R}$ and $g\,:\,B\rightarrow\mathbb{R}$ are two functions, then the
sum $f+g\,:\,A\cap B\rightarrow\mathbb{R}$,
difference $f-g\,:\,A\cap B\rightarrow\mathbb{R}$,
product $f\cdot g\,:\,A\cap B\rightarrow\mathbb{R}$, and
quotient $\frac{f}{g}$ functions are defined by
$$ \begin{align*} (f+g)(x) &= f(x) + g(x) \\ \\ (f-g)(x) &= f(x) - g(x) \\ \\ (f\cdot g)(x) &= f(x)\cdot g(x) \\ \\ \left(\frac{f}{g}\right)(x) &= \frac{f(x)}{g(x)} \end{align*} $$
The expressions $f+g$, $f-g$, $f\cdot g$ are only defined for values in the domain of both functions so their domain is $A\cap B$. Since division by zero is undefined, we have the additional restriction that the output of the denominator function of $\frac{f}{g}$ must not be zero. Hence the domain of $\frac{f}{g}$ is given by
$$ \left\{\,x\in A\cap B\,:\,g(x)\neq 0\,\right\} $$
1.3.6 Composition of Functions¶
The last algebraic combination of functions is the trickiest, however it turns out to be widely used. We already used it above when composing shifts and amplifications.
Definiton¶
The composition of two function $f\,:\,A\rightarrow\mathbb{R}$ and $g\,:\,\rightarrow\mathbb{R}$ is denoted with the $\circ$ symbol. The new function $f\circ g$ has domain
$$ \left\{\,x\in B\,:\,g(x)\in A\,\right\} $$
This function is defined by
$$ (f\circ g)(x) = f\left(g(x)\right) $$
Example 6¶
Suppose that $f(x) = \sqrt{x}$ and $g(x)=x+h$, then
$$ \begin{align*} (f\circ g)(x) &= f\left(g(x)\right) = f\left(x+h\right) \\ \\ &= \sqrt{x+h} \end{align*} $$
Example 7¶
Suppose that $f(x) = \sqrt{x}$, then simplify the difference quotient
$$ \begin{align*} \frac{f(x+h)-f(x)}{h} &= \frac{\sqrt{x+h} - \sqrt{x}}{h} \\ \\ &= \frac{\sqrt{x+h} - \sqrt{x}}{h}\cdot\frac{\sqrt{x+h} + \sqrt{x}}{\sqrt{x+h} + \sqrt{x}} \\ \\ &= \frac{\left(\sqrt{x+h} - \sqrt{x}\right)\left(\sqrt{x+h} + \sqrt{x}\right)}{h\left(\sqrt{x+h} + \sqrt{x}\right)} \\ \\ &= \frac{x+h - x}{h\left(\sqrt{x+h} + \sqrt{x}\right)} \\ \\ &= \frac{h}{h\left(\sqrt{x+h} + \sqrt{x}\right)} \\ \\ &= \frac{1}{\sqrt{x+h} + \sqrt{x}} \end{align*} $$
The OBVIOUS question is, "What is simpler about the last expression???
We will see when we study derivatives.
This is what Dr. Strogatz meant by manipulating equations. We will need our best algebra and trigonometry skills to manipulate our equations into ones that give us new insights into our mathematical models.
Your use of this self-initiated mediated course material is subject to our Creative Commons License 4.0