<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" />
You are viewing an older version of this Concept. Go to the latest version.

# Operations on Functions

## Addition, subtraction, multiplication, and division of two or more functions.

0%
Progress
Practice Operations on Functions
Progress
0%
Function Operations

The area of a rectangle is $2x^2$ . The length of the rectangle is $\sqrt{x + 3}$ . What is the width of the rectangle? What restrictions, if any, are on this value?

### Guidance

As you saw in the Review Queue, we have already dealt with adding, subtracting, and multiplying functions. To add and subtract, you combine like terms (see the Adding and Subtracting Polynomials concept). When multiplying, you either FOIL or use the “box” method (see the Multiplying Polynomials concept). When you add, subtract, or multiply functions, it is exactly the same as what you would do with polynomials, except for the notation. Notice, in the Review Queue, we didn’t write out the entire function, just $f(x)-g(x)$ , for example. Let’s continue:

$f(x)-g(x)&=(x+5)-(x^2-4x+8)\\&=x+5-x^2+4x-8 \\&=-x^2+5x-3$

Distribute the negative sign to the second function and combine like terms. Be careful! $f(x)-g(x) \ne g(x)-f(x)$ . Also, this new function, $f(x)-g(x)$ has a different domain and range that either $f(x)$ or $g(x)$ .

#### Example A

If $f(x)= \sqrt{x-8}$ and $g(x)= \frac{1}{2} x^2$ , find $fg$ and $\frac{f}{g}$ . Determine any restrictions for $\frac{f}{g}$ .

Solution: First, even though the $x$ is not written along with the $f(x)$ and $g(x)$ , it can be implied that $f$ and $g$ represent $f(x)$ and $g(x)$ .

$fg= \sqrt{x-8} \cdot \frac{1}{2} x^2= \frac{1}{2} x^2 \sqrt{x-8}$

To divide the two functions, we will place $f$ over $g$ in a fraction.

$\frac{f}{g}= \frac{\sqrt{x-8}}{\frac{1}{2} x^2}= \frac{2 \sqrt{x-8}}{x^2}$

To find the restriction(s) on this function, we need to determine what value(s) of $x$ make the denominator zero because we cannot divide by zero. In this case $x \ne 0$ . Also, the domain of $f(x)$ is only $x \ge 8$ , because we cannot take the square root of a negative number. The portion of the domain where $f(x)$ is not defined is also considered part of the restriction. Whenever there is a restriction on a function, list it next to the function, separated by a semi-colon. We will not write $x \ne 0$ separately because it is included in $x \cancel{<} 8$ .

$\frac{f}{g}=\frac{2 \sqrt{x-8}}{x^2}; x \cancel{<} 8$

Now we will introduce a new way to manipulate functions; composing them. When you compose two functions, we put one function into the other, where ever there is an $x$ . The notation can look like $f(g(x))$ or $f \circ g$ , and is read “ $f$ of $g$ of $x$ ”. Let’s do an example.

#### Example B

Using $f(x)$ and $g(x)$ from Example A find $f(g(x))$ and $g(f(x))$ and any restrictions on the domains.

Solution: For $f(g(x))$ , we are going to put $g(x)$ into $f(x)$ everywhere there is an $x$ -value.

$f(g(x))= \sqrt{g \left(x \right)-8}$

Now, substitute in the actual function for $g(x)$ .

$f(g(x))&= \sqrt{g \left(x \right)-8} \\&= \sqrt{\frac{1}{2}x^2-8}$

To find the domain of $f(g(x))$ , let’s determine where $x$ is defined. The radicand is equal to zero when $x=4$ or $x=-4$ . Between 4 and -4, the function is not defined because the square root would be negative. Therefore, the domain is all real numbers; $-4 \cancel{<} \ x \cancel{<} 4$ .

Now, to find $g(f(x))$ , we would put $f(x)$ into $g(x)$ everywhere there is an $x$ -value.

$g(f(x))&= \frac{1}{2} \left[f(x) \right]^2 \\&= \frac{1}{2} \Big [ \sqrt{x-8} \Big ]^2 \\&= \frac{1}{2}(x-8) \\&= \frac{1}{2}x-4$

Notice that $f(g(x)) \ne g(f(x))$ . It is possible that $f \circ g=g \circ f$ and is a special case, addressed in the next concept. To find the domain of $g(f(x))$ , we will determine where $x$ is defined. $g(f(x))$ is a line, so we would think that the domain is all real numbers. However, while simplifying the composition, the square and square root canceled out. Therefore, any restriction on $f(x)$ or $g(x)$ would still exist. The domain would be all real numbers such that $x \ge 8$ from the domain of $f(x)$ . Whenever operations cancel, the original restrictions from the inner function still exist . As with the case of $f(g(x))$ , no simplifying occurred, so the domain was unique to that function.

#### Example C

If $f(x)=x^4-1$ and $g(x)=2 \sqrt[4]{x+1}$ , find $g \circ f$ and the restrictions on the domain.

Solution: Recall that $g \circ f$ is another way of writing $g(f(x))$ . Let’s plug $f$ into $g$ .

$g \circ f&=2 \sqrt[4]{f \left(x \right)+1} \\&=2 \sqrt[4]{\left(x^4-1 \right)+1} \\&=2 \sqrt[4]{x^4} \\&=2 \left | x \right |$

The final function, $g \circ f \ne 2x$ because $x$ is being raised to the $4^{th}$ power, which will always yield a positive answer. Therefore, even when $x$ is negative, the answer will be positive. For example, if $x=-2$ , then $g \circ f=2 \sqrt[4]{\left(-2 \right)^4}=2 \cdot 2=4.$ . An absolute value function has no restrictions on the domain. This will always happen when even roots and powers cancel. The range of this function is going to be all positive real numbers because the absolute value is never negative.

Recall, the previous example, however. The restrictions, if there are any, from the inner function, $f(x)$ , still exist. Because there are no restrictions on $f(x)$ , the domain of $g \circ f$ remains all real numbers.

Intro Problem Revisit If we set g equal to $2x^2$ and f equal to $\sqrt{x + 3}$ , to find the width, we need to find $\frac{g}{f}$ .

$\frac{2x^2}{\sqrt{x + 3}}\\\frac{2x^2}{\sqrt{x + 3}}\cdot \frac{\sqrt{x + 3}}{\sqrt{x + 3}}\\\frac{2x^2\sqrt{x + 3}}{x + 3}$

Therefore the width of the rectangle is $\frac{2x^2\sqrt{x + 3}}{x + 3}$ , and $x = -3$ is a restriction on the answer.

### Guided Practice

$f(x)=5x^{-1}$ and $g(x)=4x+7$ . Find:

1. $fg$

2. $g-f$

3. $\frac{f}{g}$

4. $g(f(x))$ and the domain

5. $f \circ f$

1. $fg$ is the product of $f(x)$ and $g(x)$ .

$fg&=5x^{-1}(4x+7) \\&=20x^0+35x^{-1} \\&=20+35x^{-1} \ or \ \frac{20x+35}{x}$

Both representations are correct. Discuss with your teacher how s/he would like you to leave your answer.

2. Subtract $f(x)$ from $g(x)$ and simplify, if possible.

$g-f&=(4x+7)-5x^{-1} \\&=4x+7-5x^{-1} \ or \ \frac{4x^2+7x-5}{x}$

3. Divide $f(x)$ by $g(x)$ . Don’t forget to include the restriction(s).

$\frac{f}{g}&= \frac{5x^{-1}}{4x+7} \\&= \frac{5}{x(4x+7)}; \ x \ne 0, - \frac{7}{4}$

Recall the properties of exponents. Anytime there is a negative exponent, it should be moved into the denominator. We set each factor in the denominator equal to zero to find the restrictions.

4. $g(f(x))$ is a composition function. Let’s plug $f(x)$ into $g(x)$ everywhere there is an $x$ .

$g(f(x))&=4f(x)+7 \\&=4(5x^{-1})+7 \\&=20x^{-1}+7 \ or \ \frac{20+7x}{x}$

The domain of $f(x)$ is all real numbers except $x \ne 0$ , because we cannot divide by zero. Therefore, the domain of $g(f(x))$ is all real numbers except $x \ne 0$ .

5. $f \circ f$ is a composite function on itself. We will plug $f(x)$ into $f(x)$ everywhere there is an $x$ .

$f(f(x))&=5(f(x))^{-1} \\&=5(5x^{-1})^{-1} \\&=5 \cdot 5^{-1}x^1 \\&=x$

### Vocabulary

Restriction
A value of the domain where $x$ cannot be defined.
Composite Function
A function, $h(x)$ , such that $h(x)=f(g(x))$ , also written $h=f \circ g$ . When $f(x)$ and $g(x)$ are composed, we plug $g(x)$ into $f(x)$ everywhere there is an $x$ -value, resulting in a new function, $h(x)$ . The domain of $h(x)$ is the set of all $x$ -values that are in the domain of $f(x)$ and $g(x)$ .

### Practice

For problems 1-8, use the following functions to form the indicated compositions and clearly indicate any restrictions to the domain of the composite function.

$f(x)=x^2+5 \qquad g(x)=3 \sqrt{x-5} \qquad h(x)=5x+1$

1. $f+h$
2. $h-g$
3. $\frac{f}{g}$
4. $fh$
5. $f \circ g$
6. $h(f(x))$
7. $g \circ f$
8. $f \circ g \circ h$

For problems 9-16, use the following functions to form the indicated compositions and clearly indicate any restrictions to the domain of the composite function.

$p(x)= \frac{5}{x} \qquad q(x)=5 \sqrt{x} \qquad r(x)= \frac{\sqrt{x}}{5} \qquad s(x)= \frac{1}{5}x^2$

1. $ps$
2. $\frac{q}{r}$
3. $q+r$
4. $p(q(x))$
5. $s(q(x))$
6. $q \circ s$
7. $q \circ p \circ s$
8. $p \circ r$

### Vocabulary Language: English

composite function

composite function

A composite function is a function $h(x)$ formed by using the output of one function $g(x)$ as the input of another function $f(x)$. Composite functions are written in the form $h(x)=f(g(x))$ or $h=f \circ g$.
Difference

Difference

The result of a subtraction operation is called a difference.
Function

Function

A function is a relation where there is only one output for every input. In other words, for every value of $x$, there is only one value for $y$.
Horizontal Asymptote

Horizontal Asymptote

A horizontal asymptote is a horizontal line that indicates where a function flattens out as the independent variable gets very large or very small. A function may touch or pass through a horizontal asymptote.
Restriction

Restriction

A restriction is a value of the domain where $x$ cannot be defined.
Sum

Sum

The sum is the result after two or more amounts have been added together.
Vertical Asymptote

Vertical Asymptote

A vertical asymptote is a vertical line marking a specific value toward which the graph of a function may approach, but will never reach.