Precalculus by Richard Wright

Previous Lesson Table of Contents Next Lesson

Are you not my student and
has this helped you?

This book is available
to download as an epub.


Be strong and take heart, all you who hope in the Lord. ‭‭‭‭‭‭Psalms‬ ‭31‬:‭24‬ ‭NIV‬‬

1-04 Functions and Functional Notation

Mr. Wright teaches the lesson.

Summary: In this section, you will:

SDA NAD Content Standards (2018): PC.6.4

vending machine
Figure 1: Vending machine. (credit: wikimedia/Leon Brooks)

Vending machines take an input, money, and give an output, food. If the machine functions properly, it will dispense the desired item. This lesson explores the idea of a function.

Determine Whether a Relation Represents a Function

A relation is a set of ordered pairs. The set of the first number of the pairs is the domain, or input, and the set of the second number of the pairs is the range, or output. For example, consider a vending machine where there are no choice buttons. It works by inserting the correct amount of money, and the machine automatically dispenses the food. The following ordered pairs could represent the price and food.

{(0.50, Bubble Gum), (0.75, Potato Chips), (1.00, Candy)}

The domain is {0.50, 0.75, 1.00}. The range is {Bubble Gum, Potato Chips, Candy}.

The values in the domain are known as the input values or independent variable, and is often labeled x. The values in the range are known as the output values or dependent variable, and is often labeled y.

A function f is a relation that assigns a single value in the range to each value in the domain. That means no x-values are repeated with different y-values. In the example above, each number in the domain is paired with exactly one number in the range making it a function. Think of it this way. Kim wants some candy, so she inserts $1.00 and the machine gives her candy. Kim says, "The machine functions."

Now consider that the price of potato chips have increased and now cost $1.00. This changes the relation of the vending machine.

{(0.50, Bubble Gum), (1.00, Potato Chips), (1.00, Candy)}

Karl walks by the machine and decides he wants some salty potato chips. He does not want the sweet candy. He inserts the $1.00 and the machine now has a choice. The input of $1.00 is paired with two different outputs: potato chips and candy. Remember there are no buttons to push, the machine automatically dispenses the food based on the input. The machine randomly chooses candy. Karl is upset because he did not get what he wanted. Karl says, "The machine does not function!" This new relation is not a function. Different inputs can go to the same output, but the same input cannot go different outputs.

Figure 2 compares relations that are functions and not functions.

relations and functions
Figure 2 (a) This relationship is a function because each input is associated with a single output. Note that input q and r both give output n. (b) This relationship is also a function. In this case, each input is associated with a single output. (c) This relationship is not a function because input q is associated with two different outputs.
Function

A function is a relation with each possible input value paired to exactly one output value.

The input values make up the domain, and the output values make up the range.

Example 1: Determine if Relations are Functions

Determine whether the following relations are functions. If they are not, explain why.

  1. {(2, 3), (2, 4), (2, 5)}
  2. {(2, 3), (3, 3), (4, 5)}
Solution
  1. Not a function because the input (2) is paired with more than one output (3, 4, and 5).
  2. Function because each input (2, 3, and 4) is paired with only one output (3 or 5).
  3. Not a function because the input (1) is paired with more than out output (7 and 8).
  4. Function because each input is paired with only one output.

Use Function Notation

Functions are very important in math because most uses of math require only one output per one input. Often functions are represented as equations, but having a list of several equations all starting y = could be confusing when identifying a certain function. Thus, it is nice to give functions names. Function notation names functions and its variable. It replaces "y =" in the equation. For example, using f(x) = says the name of the function is f and the independent variable is x. A function about the height of a tree with time might be h(t) where the function is named h for height and the independent variable is t for time. The name h(t) is read as "h is a function of t".

If the function is evaluated at some value, then that number is substituted for the variable in the name. For example if function f(x) is evaluated at x = 2, then the name is written f(2). Remember this indicates that 2 is the input of the function; it is not multiplication.

Function Notation

The notation f(x) defines a function named f.

Example 2: Use Function Notation

Use function notation to represent a function whose input is the day of the week and output is the number of days until the weekend.

Solution

The function gives the number of days until the weekend, so maybe call it w. The input is the day of the week, so call it d. The function would be w(d). An example would be input of Wednesday and output of 3 days: w(Wednesday) = 3 days until the weekend.

Try It 1

Use function notation to represent a function whose input is the age of a child, a, and the output is its height, h.

Answer

h(a)

Example 3: Interpret Function Notation

A function N(m) gives the number of geese, N, in a park's pond in month m as a number. What does N(7) = 74 represent?

Solution

The input of the function is the month as a number. The input of N(7) = 74 is 7 and represents July. The output is the number of geese in the park's pond and is 74. Thus, the function is saying there are 74 geese on the pond in July.

Try It 2

A function B(d) gives the number of days of good weather remaining to visit the beach, B, for a given day in September, d. What does B(10) = 8 mean?

Answer

There are 8 more good beach days after September 10.

Find Input and Output Values of a Function

After understanding function notation, it is important to know how to evaluate function outputs. Remember that every input gives exactly one output. Other times the output is known and the input is desired. This is solving and can produce more than one solution since more than one input can give the same output.

Evaluation of Functions in Algebraic Forms

When the function is given as a formula or equation, evaluating is done by substituting the input value into the equation and then simplifying.

Evaluate a Function Given as an Equation
  1. Replace the input variable in the equation with the value provided.
  2. Calculate the result.

Example 4: Evaluate a Function at Specific Values

Given f(x) = x2 − 2x + 1, evaluate

  1. f(2)
  2. f(a)
  3. f(a + h)
  4. \(\frac{f(a + h) - f(a)}{h}\)
Solution

Replace the x in the function with each given value.

  1. Substitute the input value, 2, for x and simplify.

    f(x) = x2 − 2x + 1

    f(2) = 22 − 2(2) + 1

    f(2) = 1

  2. Substitute the input value, a, for x and simplify.

    f(x) = x2 − 2x + 1

    f(a) = a2 − 2a + 1

  3. Substitute the input value, a + h, for x and simplify.

    f(x) = x2 − 2x + 1

    f(a + h) = (a + h)2 − 2(a + h) + 1

    f(a + h) = a2 + 2ah + h2 − 2a − 2h + 1

  4. This expression has two instances of function notation. The first one, f(a + h) was the answer for part c. The second one, f(a) was the answer for part b. Substitute these into the expression and simplify.

    $$ \frac{f(a + h) - f(a)}{h} $$

    $$ \frac{(a^2 + 2ah + h^2 - 2a - 2h + 1) - (a^2 - 2a + 1)}{h} $$

    Collect like terms. Notice all terms without h happen to cancel out.

    $$ \frac{2ah + h^2 - 2h}{h} $$

    Factor h in the numerator.

    $$ \frac{h(2a + h - 2)}{h} $$

    Cancel the h.

    2a + h − 2

Example 5: Evaluate Functions

Given the function \(I(q) = \frac{q}{200}\), evaluate I(400).

Solution

To evaluate I(400), substitute the value 400 for the input variable q in the function.

$$ I(q) = \frac{q}{200} $$

$$ I(400) = \frac{400}{200} $$

I(q) = 2

Try It 3

Given the function f(x) = −2x + 3, evaluate f(7).

Answer

f(7) = −11

Find Function Values from a Graph

It is also possible to find input and output values from a graph. If given an input value, find it on the horizontal axis. Then move up until reaching the graph. Next, move horizontally to the vertical axis. Finally, read the output value from the scale on the axis.

If given an output value, find it on the vertical axis. Then move horizontally until reaching the graph. Next, move vertically to the horizontal axis. Finally, read the input value from the scale on the axis.

Find Function Values from a Graph

Example 6: Read Function Values from a Graph

Given the graph in figure 3,

  1. Evaluate f(1).
  2. Solve f(x) = 2.
f(x)=−x²+6
Figure 3
Solution
  1. To evaluate f(1),

    1. Find 1 on the x-axis. (Point A)
    2. Move up until hitting the graph. (Point B)
    3. Move left until hitting the y-axis. (Point C)
    4. Read the value from the y-axis. (y = 5)
    Figure 4: Evaluating a function from a graph.

    f(1) = 5

  2. To solve f(x) = 2,

    1. Find 2 on the y-axis. (Point A)
    2. Move right until hitting the graph. (Point B)
    3. Move down until hitting the x-axis. (Point C)
    4. Read the value from the x-axis. (x = 2)
    Figure 5: Solving a function from a graph.

    Notice there is also an answer on the left side of the graph.

    1. Find 2 on the y-axis. (Point A)
    2. Move left until hitting the graph. (Point B)
    3. Move down until hitting the x-axis. (Point C)
    4. Read the value from the x-axis. (x = −2)
    Figure 6: Solving a function from a graph.

    f(−2) = 2 and f(2) = 2

Domain

The domain of a function is all the inputs, or x-values, that give outputs, or y-values.

Example 7: Find the Domain of a Function as a Set of Ordered Pairs

Find the domain of the following function: {(1, 15), (2, 10), (3, 5), (4, 10), (5, 15)}.

Solution

The domain is the input values which are the first number of each ordered pair.

Domain = {1, 2, 3, 4, 5}

Find the Domain of a Function Written as an Equation
  1. Identify the input values, usually the x.
  2. Identify any restrictions on the input and exclude those values from the domain.
  3. Write the domain in interval form, if possible.
Interval Form

Interval form of a set is given by two numbers and brackets, such as (lower limit, upper limit].

Examples of interval notation are

Example 8: Find the Domain of a Function

Find the domain of the function f(x) = x2 + 2.

Solution

The input value, x, is squared and then the result is increased by two. Any real number may be squared and then be increased by two, so there are no restrictions on the domain of this function. The domain is all real numbers.

In interval form, the domain of f is (−∞, ∞).

Example 9: Find the Domain of a Function Involving a Denominator

Find the domain of the function \(g(x) = \frac{x+2}{x-3}\).

Solution

The input value is x. The function is undefined when it is divided by 0. Find the excluded values of x by setting the denominator equal to 0 and solving for x.

x − 3 = 0

x = 3

Now, exclude that value, 3, from the domain. The domain is all real numbers except 3. This can be written as x ≠ 3. This can also be written as x < 3 or x > 3. These can be combined using the union symbol, ∪.

In interval form, the domain of g is (−∞, 2) ∪ (2, ∞).

Example 10: Find the Domain of a Function with an Even Root

Find the domain of the function \(h(x) = \sqrt{x + 6}\).

Solution

The input variable is x. When there is an even root in the equation, all negative numbers are excluded from the radicand because even roots of negative number produce unreal results.

Set the radicand greater than or equal to zero and solve for x.

x + 6 ≥ 0

x ≥ −6

The domain is all numbers greater than or equal to −6.

In interval form, the domain of h is [−6, ∞).

Try It 4

Find the domain of \(f(x) = \frac{2}{\sqrt{x}}\).

Answer

(0, ∞)

Piecewise Functions

Some functions are made up of several different equations or pieces. A piecewise function is a function in which more than one formula is used to define the output over different pieces of the domain.

Piecewise functions are used to describe situations where the rule or relation changes as the input crosses certain boundaries. For example, the United States Postal Service uses a piecewise function to determine the cost to mail a first class letter. The price is $0.55 if the weight is ≤ 1 ounce. The price is $0.75 for weights 1 < w ≤ 2 ounces. The cost goes up 20 cents for every partial ounce.

Piecewise function are written like this:

$$ f(x) = \left\{\begin{align} \text{formula 1}, \text{if domain 1} \\ \text{formula 2}, \text{if domain 2} \\ \text{formula 3}, \text{if domain 3} \end{align}\right. $$

For the Postal Service above, the postal rates use the piecewise formula

$$ p(x) = \left\{\begin{align} 0.55&, \text{if } x ≤ 1 \\ 0.75&, \text{if } 1 < x ≤ 2 \\ 0.95&, \text{if } 2 < x ≤ 3 \\ 1.15&, \text{if } 3 < x ≤ 4 \\ \vdots \end{align}\right. $$

Piecewise Functions

A piecewise function is made up of several functions over defined intervals.

$$ f(x) = \left\{\begin{align} \text{formula 1}, \text{if domain 1} \\ \text{formula 2}, \text{if domain 2} \\ \text{formula 3}, \text{if domain 3} \end{align}\right. $$

Example 11: Write a Piecewise Function

A museum charges $5 per person for a guided tour with a group of 1 to 9 people or a fixed $50 fee for a group of 10 or more people. Write a function relating the number of people, n, to the cost, C.

Solution

Two different formulas are needed. For n-values less than 10, C = 5n. When n is 10 or greater, the cost is $50 or C = 50.

$$ C(n) = \left\{\begin{align} 5n&, \text{if } n < 10 \\ 50&, \text{if } n ≥ 10 \end{align}\right. $$

Example 12: Work with a Piecewise Function

A cell phone company uses the function below to calculate the cost, C, in dollars for g gigabytes of data.

$$ C(g) = \left\{\begin{align} 50&, \text{if } g ≤ 5 \\ 50 + 10(g - 5)&, \text{if } g > 5 \end{align}\right. $$

Find the cost of using 3.5 gigabytes of data and the cost of using 8 gigabytes of data.

Solution
  1. To find the cost of 3.5 gigabytes of data, determine which of the domains it fits in. In this case, 3.5 ≤ 5, so it is in the domain of the top equation. Substitute the 3.5 into the first equation to get the answer. Of course, the top equation is just the constant 50, so the result is 50.

    C(3.5) = 50

    The cost of 3.5 gigabytes of data is $50.

  2. To find the cost of 8 gigabytes of data, determine which of the domains it fits in. In this case, 8 > 5, so it is in the domain of the bottom equation. Substitute the 8 into the bottom equation to get the answer.

    C(g) = 50 + 10(g − 5)

    C(8) = 50 + 10(8 − 5)

    C(8) = 80

    The cost of 8 gigabytes of data is $80.

Try It 5

Given \(g(x) = \left\{\begin{align} x^2&, \text{if } x < 2 \\ -x + 6&, \text{if } x ≥ 2 \end{align}\right.\), evaluate (a) g(2) and (b) g(5).

Answer

4; 1

Lesson Summary

Function

A function is a relation with each possible input value paired to exactly one output value.

The input values make up the domain, and the output values make up the range.


Function Notation

The notation f(x) defines a function named f.


Evaluate a Function Given as an Equation
  1. Replace the input variable in the equation with the value provided.
  2. Calculate the result.

Find Function Values from a Graph

Find the Domain of a Function Written as an Equation
  1. Identify the input values, usually the x.
  2. Identify any restrictions on the input and exclude those values from the domain.
  3. Write the domain in interval form, if possible.

Interval Form

Interval form of a set is given by two numbers and brackets, such as (lower limit, upper limit].

Examples of interval notation are


Piecewise Functions

A piecewise function is made up of several functions over defined intervals.

$$ f(x) = \left\{\begin{align} \text{formula 1}, \text{if domain 1} \\ \text{formula 2}, \text{if domain 2} \\ \text{formula 3}, \text{if domain 3} \end{align}\right. $$

Helpful videos about this lesson.

Practice Exercises (*Optional)

  1. How are relations and functions related?
  2. Determine whether the relation represents y as a function of x.

  3. {(1, 2), (4, 5), (−2, 2), (1, 4)}
  4. y = 2x2
  5. x2 + y2 = 4
  6. Evaluate function f for (a) f(2), (b) f(−1), (c) f(a), (d) f(a + h)

  7. f(x) = 2x + 3
  8. f(x) = x2 − 2x
  9. For f(x) = x2 − 2x, evaluate \(\frac{f(a + h) - f(a)}{h}\).

    For the function (a) evaluate f(−1) and (b) solve f(x) = 2.

  10. *f(x) = 5x − 14
  11. \(f(x) = \sqrt{-x + 2}\)
  12. f(x) as is in the graph.
  13. Find the domain of the function. Write the answer in interval form.

  14. \(f(x) = \frac{x^2 - 2}{x + 3}\)
  15. \(f(x) = -3\sqrt{x - 4}\)
  16. f(x) = −x3x
  17. \(f(x) = \frac{2}{x^2 - 9} + 4\)
  18. Evaluate the piecewise function for (a)f(−3), (b)f(0), (c)f(2), (d)f(5)

  19. \(f(x) = \left\{\begin{align} -2x&, \text{if } x ≤ 0 \\ \frac{1}{2}x^2 + 1&, \text{if } x > 0 \end{align}\right.\)
  20. \(f(x) = \left\{\begin{align} x + 1&, \text{if } x ≤ -1 \\ 0&, \text{if } -1 < x ≤ 2 \\ -x + 2&, \text{if } x > 2 \end{align}\right.\)
  21. \(f(x) = \left\{\begin{align} (x + 2)^2&, \text{if } x < 1 \\ \sqrt{10 - x}&, \text{if } x ≥ 1 \end{align}\right.\)
  22. Mixed Review

  23. (1-03) Find a linear equation that passes through (3, 4) and (0, −2).
  24. (1-03) Graph 2x − 4y = 0.
  25. (1-02) Graph (x − 1)2 + y2 = 9.
  26. (1-01) Find the distance (4, −6) is from the origin.

Answers

  1. Functions are relations where each input gives exactly one output.
  2. Not a function
  3. Function
  4. Not a function
  5. 7; 1; 2a + 3; 2a + 2h + 3
  6. 0; 3; a2 − 2a; a2 + 2ah + h2 − 2a − 2h
  7. 2a + h − 2
  8. f(−1) = −19; \(x = \frac{16}{5}\)
  9. \(f(-1) = \sqrt{3}\); x = −2
  10. f(−1) = −2; x = −2, 0.6, 2
  11. (−∞, −3) ∪ (−3, ∞)
  12. [4, ∞)
  13. (−∞, ∞)
  14. (−∞, −3) ∪ (−3, 3) ∪ (3, ∞)
  15. 6; 0; 3; \(\frac{27}{2}\)
  16. −2; 0; 0; −3
  17. 1; 4; \(2\sqrt{2}\); \(\sqrt{5}\)
  18. y = 2x − 2
  19. \(2\sqrt{13}\)