Functions can be added and multiplied; we can find the difference between two functions and we can define their quotient. In this chapter, we explain what these operations mean and what rules or restrictions apply.
Two functions $f$f and $g$g may be combined as a sum $f+g$f+g meaning that for each $x$x in the common domain we add the function values $f(x)$f(x) and $g(x)$g(x) to get $(f+g)(x)$(f+g)(x).
Note that this operation makes no sense unless $x$x belongs to the domains of both $f$f and $g$g. It may be necessary to restrict the domain of one or both functions to meet this requirement.
Let $f(x)=x^2$f(x)=x2 and $g(x)=2x+1$g(x)=2x+1. The domains of both functions are the real numbers. So, the sum function $(f+g)(x)$(f+g)(x) will also have the real numbers for its domain.
We have, $(f+g)(x)=f(x)+g(x)$(f+g)(x)=f(x)+g(x) for each $x$x in the domain. Therefore, $(f+g)(x)=x^2+2x+1$(f+g)(x)=x2+2x+1. The three graphs are shown below.
We combine functions $f$f and $g$g as a product $fg$fg by defining $(fg)(x)=f(x)\cdot g(x)$(fg)(x)=f(x)·g(x) for each $x$x in the common domain of $f$f and $g$g.
Let $f(x)=\frac{3}{x}$f(x)=3x and $g(x)=2x-\frac{1}{3}$g(x)=2x−13.
The product function $(fg)(x)$(fg)(x) is given by $f(x)\cdot g(x)$f(x)·g(x) over the domain $R\text{\}\left\{0\right\}$R\{0}. The domain has to be restricted to the real numbers without zero because this is the domain of $f$f.
Hence, $(fg)(x)=\frac{3}{x}\cdot\left(2x-\frac{1}{3}\right)$(fg)(x)=3x·(2x−13) and so,
$(fg)(x)=6-\frac{1}{x}$(fg)(x)=6−1x
The graphs are shown below.
The function $(fg)(x)=6-\frac{1}{x}$(fg)(x)=6−1x in Example $2$2 can be seen in another way. We have the constant function $h(x)=6$h(x)=6 added to the constant function $r(x)=(-1)$r(x)=(−1) times the function $k(x)=\frac{1}{x}$k(x)=1x.
Multiplying by the constant $(-1)$(−1) is really just an example of function multiplication.
So, we have the combined sum and product $(fg)(x)=h(x)+r(x)k(x)$(fg)(x)=h(x)+r(x)k(x). A difference can always be thought of as a sum where one of the summands has been multiplied by $(-1)$(−1).
Compare the graph below with that in Example $2$2.
We can define a quotient function $h(x)=\frac{f(x)}{g(x)}$h(x)=f(x)g(x) in a similar way to the way we defined the other operations, provided the domains of $f$f and $g$g are the same and we do not include in the domain values of $x$x that make $g(x)=0$g(x)=0.
Such functions are called rational functions when $f$f and $g$g are both polynomials.