#### Chapter 6 Elementary Functions

Section 6.6 Properties and Construction of Elementary Functions

# 6.6.3 Sums, Products, Compositions

In this section, we will now use the large collection of elementary functions that we acquired in this module to create new more complex functions out of this elementary functions. At different places throughout this module we already studied functions those mapping rules were composed of sums and products of simpler mapping rules. Of course, one can also take differences and, under certain conditions, quotients from mapping rule. The example below lists a few such combined functions.
##### Example 6.6.4
• The function

$f:\mathrm{ }\left\{\begin{array}{ccc}\hfill ℝ& \hfill \to \hfill & ℝ\hfill \\ \hfill x& \hfill ⟼\hfill & x+\mathrm{sin}\left(x\right)\hfill \end{array}$

is the sum of the identity function (see Section 6.2.3) and the sine function (see Section 6.5). The graph of this function is shown in the figure below. • The function

$g:\mathrm{ }\left\{\begin{array}{ccc}\hfill \left[1;2\right]& \hfill \to \hfill & ℝ\hfill \\ \hfill y& \hfill ⟼\hfill & {y}^{2}-\mathrm{ln}\left(y\right)\hfill \end{array}$

is the difference of the standard parabola (see Section 6.2.6) and the natural logarithmic function (see Section 6.4.4). The graph of this function is shown in the figure below. • The function

$h:\mathrm{ }\left\{\begin{array}{ccc}\hfill \left(0;\infty \right)& \hfill \to \hfill & ℝ\hfill \\ \hfill x& \hfill ⟼\hfill & e{}^{x}\frac{1}{x}\hfill \end{array}$

is the product of the natural exponential function with the mapping rule $e{}^{x}$ (see Section 6.4.3) and the hyperbola with the mapping rule $\frac{1}{x}$ (see Section 6.2.8). The graph of this function is shown in the figure below. • The function

$\phi :\mathrm{ }\left\{\begin{array}{ccc}\hfill ℝ& \hfill \to \hfill & ℝ\hfill \\ \hfill z& \hfill ⟼\hfill & \frac{\mathrm{cos}\left(z\right)}{{z}^{2}+1}\hfill \end{array}$

is the quotient of the cosine function (see Section 6.5.3) and the polynomial of degree $2$ (see Section 6.2.7) with the mapping rule ${z}^{2}+1$. The graph of this function is shown in the figure below. ##### Exercise 6.6.5
Find further examples for elementary functions we studied in this module that were constructed from simpler elementary functions by combining sums, differences, product, or quotients.

Finally, there is another way to combine elementary functions to obtain new functions. This is the so-called composition of functions.
Let us consider a few examples.
##### Example 6.6.6
• The functions

$f:\mathrm{ }\left\{\begin{array}{ccc}\hfill ℝ& \hfill \to \hfill & ℝ\hfill \\ \hfill x& \hfill ⟼\hfill & f\left(x\right)={x}^{2}+1\hfill \end{array}$

and

$g:\mathrm{ }\left\{\begin{array}{ccc}\hfill ℝ& \hfill \to \hfill & ℝ\hfill \\ \hfill x& \hfill ⟼\hfill & g\left(x\right)=e{}^{x}\hfill \end{array}$

can be composed in two ways. We can compose the function $f\circ g:ℝ\to ℝ$ or the function $g\circ f:ℝ\to ℝ$. We obtain

$\left(f\circ g\right)\left(x\right)=f\left(g\left(x\right)\right)=f\left(e{}^{x}\right)=\left(e{}^{x}{\right)}^{2}+1=e{}^{2x}+1 ,$

i.e.

$f\circ g:\mathrm{ }\left\{\begin{array}{ccc}\hfill ℝ& \hfill \to \hfill & ℝ\hfill \\ \hfill x& \hfill ⟼\hfill & e{}^{2x}+1 ,\hfill \end{array}$

and

$\left(g\circ f\right)\left(x\right)=g\left(f\left(x\right)\right)=g\left({x}^{2}+1\right)=e{}^{{x}^{2}+1} ,$

i.e.

$g\circ f:\mathrm{ }\left\{\begin{array}{ccc}\hfill ℝ& \hfill \to \hfill & ℝ\hfill \\ \hfill x& \hfill ⟼\hfill & e{}^{{x}^{2}+1} .\hfill \end{array}$

If we look at the graphs, we see that these are two completely different functions, i.e. the order of the composition is relevant. • If two functions such as

$h:\mathrm{ }\left\{\begin{array}{ccc}\hfill ℝ& \hfill \to \hfill & ℝ\hfill \\ \hfill x& \hfill ⟼\hfill & \mathrm{sin}\left(x\right)\hfill \end{array}$

and

$w:\mathrm{ }\left\{\begin{array}{ccc}\hfill \left[0;\infty \right)& \hfill \to \hfill & ℝ\hfill \\ \hfill x& \hfill ⟼\hfill & \sqrt{x}\hfill \end{array}$

are composed, however, the domains of the functions have to be observed. For example, if we want to consider the composed function $w\circ h$, then we have

$\left(w\circ h\right)\left(x\right)=w\left(h\left(x\right)\right)=w\left(\mathrm{sin}\left(x\right)\right)=\sqrt{\mathrm{sin}\left(x\right)} .$

Since the values of the sine function can also be negative but the square root only accepts non-negative values, the domain of the sine function has to be restricted accordingly such that the corresponding function values of the sine function are always non-negative, for example, by the restriction $x\in \left[0;\pi \right]={D}_{w\circ h}$. Thus, we have

$w\circ h:\mathrm{ }\left\{\begin{array}{ccc}\hfill \left[0;\pi \right]& \hfill \to \hfill & ℝ\hfill \\ \hfill x& \hfill ⟼\hfill & \sqrt{\mathrm{sin}\left(x\right)} .\hfill \end{array}$

##### Exercise 6.6.7
Let the functions

$f:\mathrm{ }\left\{\begin{array}{ccc}\hfill ℝ& \hfill \to \hfill & ℝ\hfill \\ \hfill x& \hfill ⟼\hfill & 2x-3 \hfill \end{array}$

$g:\mathrm{ }\left\{\begin{array}{ccc}\hfill ℝ\setminus \left\{0\right\}& \hfill \to \hfill & ℝ\hfill \\ \hfill x& \hfill ⟼\hfill & \frac{1}{x}\hfill \end{array}$

and

$h:\mathrm{ }\left\{\begin{array}{ccc}\hfill ℝ& \hfill \to \hfill & ℝ\hfill \\ \hfill x& \hfill ⟼\hfill & \mathrm{sin}\left(x\right)\hfill \end{array}$

be given. Specify the compositions $f\circ g$, $g\circ f$, $h\circ f$, $h\circ g$, $f\circ f$, and $g\circ g$. Restrict the domains, if necessary, such that the composition is allowed. However, for the composed function always use the maximum domain.