topic badge

5.05 Function operations

Lesson

Concept summary

Just as we can perform operations on polynomials, we can also perform operations on different functions - adding, subtracting, multiplying or dividing them - provided we follow specific rules.

Operations with functions are defined using special notation:

  • Sum: \left(f+g\right)\left(x\right)=f\left(x\right)+g\left(x\right)
  • Difference: \left(f-g\right)\left(x\right)=f\left(x\right)-g\left(x\right)
  • Product: \left(f\cdot g\right)\left(x\right)=f\left(x\right)\cdot g\left(x\right)
  • Quotient: \left(\dfrac{f}{g}\right)\left(x\right)=\dfrac{f\left(x\right)}{g\left(x\right)} \text{, where } g\left(x\right)\neq 0

With each operation, the domain of the new function becomes the intersection or overlap of the domains of the original functions. The exception is that in the case of a quotient function, the new function's domain is further restricted to exclude values that make the denominator function zero.

In addition to the four ways we can combine two functions, as above, we can also create a composite function using an operation that combines two functions f and g and produces a function h such that h\left(x\right)=g\left(f\left(x\right)\right), where the function g is applied to the result of applying the function f to x

The output, or function values, of the function f\left(x\right) have become the input, or x-values, of the function g\left(x\right). We introduce a new symbol \circ to represent this new function.

Composite function

g\left(f\left(x\right)\right)=\left(g\circ f\right)\left(x\right)

In a composition of functions, the inner function is evaluated first, followed by the outer function. For example in the composition g\left(f\left(x\right)\right), the function f is applied first, followed by the function g. This means that \left(g \circ f\right)\left(x\right) is not necessarily equal to \left(f \circ g\right)\left(x\right).

The domain of \left(g \circ f\right)\left(x\right) is restricted to all x-values in the domain of f whose range values, f\left(x\right), are in the domain of g.

Worked examples

Example 1

Consider the following pair of functions:

\begin{aligned} f\left(x\right) & = -5x+5\\\ g\left(x\right) & = 2x^2+3x-10 \end{aligned}

a

Find \left(f+g\right)\left(x\right)

Approach

To find \left(f+g\right)\left(x\right) we want to add the two functions together.

Solution

\displaystyle \left(f+g \right)\left(x\right)\displaystyle =\displaystyle f\left(x\right)+g\left(x\right)
\displaystyle =\displaystyle \left(-5x+5\right)+\left(2x^2+3x-10\right)Substitute f\left(x\right), g\left(x\right)
\displaystyle =\displaystyle 2x^2-2x-5Combine like terms
b

Find \left(f-g\right)\left(x\right)

Approach

To find \left(f-g\right)\left(x\right) we want to subtract g\left(x\right) from f\left(x\right).

Solution

\displaystyle \left(f-g \right)\left(x\right)\displaystyle =\displaystyle f\left(x\right)-g\left(x\right)
\displaystyle =\displaystyle \left(-5x+5\right)-\left(2x^2+3x-10\right)Substitute f\left(x\right), g\left(x\right)
\displaystyle =\displaystyle -2x^2-8x+15Combine like terms
c

Find \left(f \cdot g\right)\left(x\right)

Approach

To find \left(f \cdot g\right)\left(x\right) we want to find the product of the two functions.

Solution

\displaystyle \left(f \cdot g \right)\left(x\right)\displaystyle =\displaystyle f\left(x\right) \cdot g\left(x\right)
\displaystyle =\displaystyle \left(-5x+5\right)\left(2x^2+3x-10\right)Substitute f\left(x\right), g\left(x\right)
\displaystyle =\displaystyle -5x\left(2x^2\right) -5x\left(3x\right) -5x\left(-10\right)+5\left(2x^2\right)+5\left(3x\right)+5\left(-10\right)Distribute the parentheses
\displaystyle =\displaystyle -10x^3 -15x^2 + 50x + 10x^2 + 15x - 50Simplify the products
\displaystyle =\displaystyle -10x^3-5x^2+65x-50Combine like terms

Example 2

The table shows some of the outputs of the functions f\left(x\right) and g\left(x\right).

Use the table to evaluate the following:

xf\left(x\right)g\left(x\right)
0-28
157
2124
319-1
426-8
533-17
a

\left(f + g\right)\left(4\right)

Approach

We can read the values of f\left(4\right) and g\left(4\right), and then add them together.

Solution

\displaystyle \left(f + g\right)\left(4\right)\displaystyle =\displaystyle f\left(4\right)+g\left(4\right)
\displaystyle =\displaystyle 26+\left(-8\right)
\displaystyle =\displaystyle 18
b

\left(f\cdot g\right)\left(3\right)

Approach

We can read the values of f\left(3\right) and g\left(3\right), and then multiply them together.

Solution

\displaystyle \left(f \cdot g\right)\left(3\right)\displaystyle =\displaystyle f\left(3\right)\cdot g\left(3\right)
\displaystyle =\displaystyle 19\left(-1\right)
\displaystyle =\displaystyle -19
c

\left(\dfrac{ f}{g}\right)\left(2\right)

Approach

We can read the values of f\left(2\right) and g\left(2\right), and then find their quotient.

Solution

\displaystyle \left(\dfrac{f}{g}\right)\left(2\right)\displaystyle =\displaystyle \dfrac{f\left(2\right)}{g\left(2\right)}
\displaystyle =\displaystyle \dfrac {12}{4}
\displaystyle =\displaystyle 3
d

\left(f \circ g\right)\left(2\right)

Approach

To evaluate \left(f \circ g\right)\left(2\right) we want to find f\left(g\left(x\right)\right).

We can see, from the table, that g\left(2\right)=4. We now want to find f\left(g\left(2\right)\right)=f\left(4\right).

Solution

From the table we can see that f\left(4\right)=26.

Therefore \left(f \circ g\right)\left(2\right)=26.

Example 3

For the following pair of functions, find an expression for \dfrac{f}{g} and state its domain:\begin{aligned} f\left(x\right) & = 64x^3-27 \\ g\left(x\right) & = 4x-3 \end{aligned}

Approach

The function \dfrac{f}{g} is equivalent to the quotient \dfrac{f\left(x\right)}{g\left(x\right)}. We can substitute in the given expressions for each function and evaluate. We can then determine the domain by considering values of x that will make the denominator equal to zero, as these values will need to be excluded from the domain.

We can see that f\left(x\right)=64x^3-27 is a difference of two cubes. It can be factored using: A^3-B^3=\left(A-B\right)\left(A^2+AB+B^2\right)

Giving us 64x^3-27=\left(4x-3\right)\left(16x^2+12x+9\right)

Solution

\displaystyle \dfrac{f}{g}\displaystyle =\displaystyle \dfrac{64x^3-27}{4x-3}Substitute f\left(x\right), g\left(x\right)
\displaystyle =\displaystyle \dfrac{\left(4x-3\right)\left(16x^2+12x+9\right)}{4x-3}Difference of two cubes
\displaystyle =\displaystyle 16x^2+12x+9Cancel the common factor

This gives us a result of: \dfrac{f}{g}=16x^2+12x+9

As the original function, before simplification, was \dfrac{f}{g}=\dfrac{64x^3-27}{4x-3} we need to consider that 4x-3 cannot equal zero. We can solve 4x-3=0 for x and get the result x=\dfrac{3}{4}. This value must be excluded from the domain.

Therefore, the domain of \dfrac{f}{g}\left(x\right) is \left(-\infty, \dfrac{3}{4}\right) \cup \left(\dfrac{3}{4}, \infty\right).

Reflection

Even though the final function is a quadratic equation which would appear to have a domain of all real x, we need to consider the original composition of the composite function when determining the domain and range.

Example 4

A cylindrical tank initially contains 200 in^3 of grain and starts being filled at a constant rate of 40 in^3 per second.

The radius of the tank is 12 inches. Let g be the amount of grain in the container after t seconds.

a

State the function for h\left(g\right), the height of the grain in the container, in terms of g.

Approach

As the tank fills with grain, the amount of grain takes the shape of a cylinder which has a volume given by V=\pi r^2h.

We know that g represents the volume, h\left(g\right) represents the height of the grain in terms of g and r is given to be 12 inches. Substituting these values into the volume of a cylinder, V=\pi r^2h, we can form an equation relating g and h\left(g\right).

Solution

\displaystyle g\displaystyle =\displaystyle \pi r^2 \cdot h\left(g\right)Setting up an equation
\displaystyle g\displaystyle =\displaystyle \pi\left(12^2\right) \cdot h\left(g\right)Substituting r=12
\displaystyle g\displaystyle =\displaystyle 144 \pi \cdot h\left(g\right)Evaluating the square
\displaystyle \dfrac{g}{144\pi}\displaystyle =\displaystyle h\left(g\right)Divide both sides by 144\pi
\displaystyle h\left(g\right)\displaystyle =\displaystyle \dfrac{g}{144\pi}Symmetric property of equality

The function h\left(g\right)=\dfrac{g}{144\pi} represents the height of the grain in the container, in terms of g.

b

State the function for g\left(t\right), the amount of grain in the tank after t seconds.

Approach

We know that initially, t=0, there are 200 in^3 of grain in the tank. Each second that passes, 40 in^3 is added.

t0123
g\left(t\right)200240280320

Creating a table of values, we can see that we have a linear equation where the amount of grain is equal to 200 plus 40 for every second that passes.

Solution

The function g\left(t\right)=40t+200

c

The function A\left(t\right) is defined as A\left(t\right)=\left( h \circ g \right)\left(t\right). Form an equation for A\left(t\right) in terms of t.

Approach

\left(h \circ g\right)\left(t\right) is the same as h\left(g\left(t\right)\right), so want to substitute g\left(t\right)=40t+200 into the function h\left(g\right)=\dfrac{g}{144\pi}.

Solution

\displaystyle A\left(t\right)\displaystyle =\displaystyle \left( h \circ g \right)\left(t\right)
\displaystyle =\displaystyle h\left(g\left(t\right)\right)Definition of \left( h \circ g \right)\left(t\right)
\displaystyle =\displaystyle h\left(40t+200\right)Substitute g\left(t\right)
\displaystyle =\displaystyle \dfrac{40t+200}{144\pi}Substitute h\left(g\right)
\displaystyle =\displaystyle \dfrac{5t+25}{18\pi}Simplifying the quotient

Reflection

In the working above we substituted g\left(t\right)=40t+200 into the function for h. We can also obtain the same answer by first substituting h\left(g\right)=\dfrac{g}{144\pi} into h\left(g\left(t\right)\right):

\displaystyle A\left(t\right)\displaystyle =\displaystyle h\left(g\left(t\right)\right)
\displaystyle =\displaystyle \dfrac{g\left(t\right)}{16\pi}Substitute h\left(g\right)
\displaystyle =\displaystyle \dfrac{40t+200}{144\pi}Substitute g\left(t\right)
\displaystyle =\displaystyle \dfrac{5t+25}{18\pi}Simplifying the quotient
d

Explain what A\left(t \right) represents.

Approach

g\left(t\right) represents the amount of grain in the container after t seconds, and h\left(g\right) represents the height of grain in terms of the amount of grain. Composing the two gives us \left(h \cdot g\right)\left(t\right). This represents height as a function of time.

Solution

A\left(t \right) represents the height of the grain in the container, in inches, after t seconds.

e

If the barrel can hold 10\,000 in^3 of grain, determine the domains of g\left(t\right), h\left(t\right) and A\left(t\right).

Approach

The lower boundary of the domain of g\left(t\right) is 0 as the time starts at 0 seconds. As h is a function of g the lower boundary of h\left(g\right) is 200 in^3 as this is how much grain is in the barrel initially. This means the lower boundary of the domain of A\left(t\right) is also 0 seconds.

To calculate the upper boundaries, we can use the fact that the barrel can hold a maximum of 10\, 000 in^3 of grain. The time it takes to fill the barrel will be the upper boundary of both g\left(t\right) and A\left(t\right).

As g is the input for h\left(g\right), the range of g\left(t\right) will be the domain of h\left(g\right), and we know the maximum amount of grain is 10\, 000 in^3.

Solution

Calculating the total amount of time needed to fill the barrel:

\displaystyle g\left(t\right)\displaystyle =\displaystyle 40t+200
\displaystyle 10\,000\displaystyle =\displaystyle 40t+200Substitute g\left(t\right)=10\,000
\displaystyle 9800\displaystyle =\displaystyle 40tSubtract 200 from both sides
\displaystyle 245\displaystyle =\displaystyle tDivide both sides by 40

This means the barrel will be completely full after 245 seconds. The domain of both h\left(g\right) and g\left(t\right) are \left[0, 245 \right].

  • Domain of g\left(t\right): \left[0, 245\right]
  • Domain of h\left(g\right): \left[200, 10\,000\right]
  • Domain of A\left(t\right): \left[0, 245\right]

Outcomes

A2.F.BF.A.1

Build a function that describes a relationship between two quantities.*

A2.F.BF.A.1.A

Combine standard function types using arithmetic operations.

A2.F.BF.A.1.B

Combine standard function types using composition.

A2.MP1

Make sense of problems and persevere in solving them.

A2.MP3

Construct viable arguments and critique the reasoning of others.

A2.MP6

Attend to precision.

A2.MP8

Look for and express regularity in repeated reasoning.

What is Mathspace

About Mathspace