# 2.1 Introduction to functions

### Functions as equations

A ** variable** represents a value that can change or “vary”, hence the name “variable”. Sometimes one variable’s value is related to another variable’s value. Ex: If Jan saves $1000 per month, what is the total savings y after x months? A person can create an equation to describe how a value for x converts to a value for y.

PARTICIPATION ACTIVITY

2.1.1: An equation can relate any value of one variable (x) to a value of another variable (y).Start2x speed

Jan saves $1000 per month.

Total dollars saved (y) for number of months (x)?

y = 1000x

Total savings for 5 months?

y = 1000 × 5

“Plug in” 5 for x

y = 5000

Total savings for 20 months?

y = 1000 × 20

y = 20000

Plug in 20 for x

y = 1000x *keyboard_arrow_down*CaptionsFeedback?

Mathematically, a relation of each value of one variable (x) to a value of another variable (y) is called a ** function**. One says that “y is a function of x”, meaning y’s value is based on, or comes from, x’s value.

PARTICIPATION ACTIVITY

2.1.2: Relating one variable’s values to another.

1)

Jan saves $1000 per month, so total savings y can be written as y = 1000x, where x is the number of months. How much will Jan have saved after 5 months?

2)

Jan saves $1000 per month, so total savings y can be written as y = 1000x, where x is the number of months. How much will Jan have saved after 30 months?

3)

Lee puts $20,000 into a savings account that earns 5% interest each year. A simple equation for calculating the total savings y after x years is: y = 20000 + (20000 × 0.05)x. What is the total savings after 10 years?

4)

A catering company charges a $500 setup plus $10 per person, so total cost y can be written as y = 500 + 10x, where x is the number of people. What is the cost for 100 people, and for 200 people?

5)

Pat is a salesperson. Pat earns a base monthly salary of $4000, plus 10% of sales. Pat’s total monthly earnings y can be written as y = 4000 + 0.10x, where x is the dollar amount of Pat’s sales. How much will Pat earn if sales are $5000, $6000, or $7000?$4500, $4600, $4700$5000, $6000, $7000

6)

Val wishes to provide free haircuts at an event for homeless people. Setting up and taking down the haircut booth takes 30 min combined. Each haircut takes 10 min. What is the total time y to cut x people’s hair?y = 30xy = 30 + 10x

7)

Lee burns 1.5 calories per minute at rest, and 4 calories per min when walking. A day has 24 × 60 =1440 minutes. What is Lee’s total calories burned if Lee walks x min per day and is at rest for the other minutes of the day? y = 1.5 × 1440 + 4xy = 1.5 × (1440 – x) + 4x

### Functions as tables and graphs

Beyond an equation, a relationship of a variable x to a variable y (a function) can be described with a table or as a graph as well. A ** table** is a partly-visual representation of a function, with a column for each variable, and a row for each value of x and the corresponding y value. A

**is a mostly-visual representation of a function, with x values displayed horizontally, and corresponding y values displayed vertically.**

*graph*PARTICIPATION ACTIVITY

2.1.3: Relating one variable to another via an equation, table, or graph.Start2x speed

x

y

1

2

3

1000

2000

3000

…

0

1

2

Jan saves $1000 per month.

Total dollars saved (y) for x months?

y = 1000x

3

4

4000

4

1000

2000

3000

4000

x (months)

y (dollars saved)

x axis

y axis *keyboard_arrow_down*CaptionsFeedback?

Drawing a point on a graph is called ** plotting** the point. Good practice is to label both x (horizontal) and y (vertical) axes with units.

PARTICIPATION ACTIVITY

2.1.4: Relating one variable’s values to another.

1)

Looking at the table above, how much had Jan saved after 3 months?$3000$4000

2)

Looking at the graph above, how much had Jan saved after 4 months?$3000$4000

3)

How many points were plotted on the graph above?14Feedback?

### Example: Water bill

(True story) One thing Frank did after moving into a home was disable the automated outdoor irrigation. He replaced the water-hungry plants and lawn (his kids were grown so a lawn wasn’t needed) with rocks and low-water plants.

Frank’s water company provides graphs showing the bi-monthly water bill as a function of the month. Below are two graphs on the same axes, a graph for 2011 (previous owner), and a graph for 2018 (Frank). The company labeled each point with the dollar cost for water usage. The lines connecting the points have no meaning other than to help a viewer follow each graph’s points.

Note that the 2018 costs are 2x to 3x lower. Ex: For Feb (February), the 2011 cost was $44, while the 2018 cost was only $19. The main difference? That outdoor watering. Irrigating can use a lot of water (at least in a warm-weather low-rain state like California). 2011 total usage cost was 44 + 47 + 45 + 46 + 49 + 23 = 254 dollars, vs. 2018 being 19 + 13 + 18 + 19 + 16 + 11 = 96 dollars, a difference of $158 per year.

Figure 2.1.1: Graphs for water usage costs with lawn/plant irrigation (2011) and without (2018).

Feedback?

PARTICIPATION ACTIVITY

2.1.5: Water usage graphs.

Consider the example above.

1)

How much was the water bill in October of 2011?$49$16

2)

How much was the water bill in October of 2018?$49$16

3)

What good practice do the graphs fail to follow?Providing units for the x axisProviding units for the y axisFeedback?

CHALLENGE ACTIVITY

2.1.1: Intro to functions.

433986.2690798.qx3zqy7Start

What are the values for y when x is 2, 4, and 6?

x | y |
---|---|

2 | iiiiiiiiiii |

4 | iiiiiiiiiii |

6 | iiiiiiiiiii |

y = 20x + 6

1

2

3CheckNext

1

2

3Feedback?

Need help with your math or Computer Science task! Let us help

At VictoryEssays, we do Python, Javascript, Html, Css, Bootstrap, R and many more

Reach out anytime