Let’s walk through some application problems for working with functions. Here’s an example.
Mark wants to calculate the total cost for reserving a number of nights at a particular hotel. If the cost for a night is fifty dollars plus a registration fee of twenty-five dollars, write a function that describes the total cost based on the number of nights. What is the initial cost?
First, we wanna make sure we know what the problem is asking of us. It’s asking that we write a function. It’s also asking a question, what is the initial cost. To answer these questions, let’s highlight all the information we were given. The cost of the hotel for a night is fifty dollars. There’s a registration fee of twenty-five dollars. And we’re trying to write a function that describes the total cost based on the number of nights.
We know that a function is a relationship between numbers. It’s a specific relationship where every input has exactly one output. In our case, we need to input the number of nights. And we need the output to be the total cost. Before we move any further with our function, let’s answer the question, what is the initial cost. The initial cost is twenty-five dollars; it’s the registration fee for the hotel. You pay the initial cost or the registration fee one time, no matter how many nights you stay. It’s your initial cost for the hotel.
Let’s set up a table. For one night, you would pay fifty dollars for the room plus twenty-five dollars for the registration fee. For the second night, you would pay one hundred dollars for the room plus twenty-five dollars for the registration fee. We know that the number of nights is our 𝑥-value and the cost is our 𝑦-value. So our function, 𝑦 equals the cost per night plus the initial cost. In this case, it’s fifty dollars times 𝑥 plus twenty-five. Fifty times 𝑥, where 𝑥 is the number of nights and twenty-five dollars is the registration fee. We’ll just clear up the screen a little bit, and then check and see, have we answered both of the things the question was asking us. Did we write a function? Yes. This is a function that describes the total cost based on the number of nights. And we answered the question, what was the initial cost, which is twenty-five dollars for the registration fee. Here’s another example.
An artist bought some paintbrushes for five dollars each. He had a coupon for two dollars and thirty-one cents off his purchase. Write a function to represent the total purchase price.
Let’s check what the problem is asking of us. It wants us to write a function. We need to find the information we were given. Here’s the information we’re given. He bought some paintbrushes, we don’t know how many. They cost five dollars each. He had a coupon for two dollars and thirty-one cents off. And then we want our function to represent the total purchase price. So we’ll have an 𝑥-value going in and some 𝑦-value going out. This is the variable that the price depends on, the number of paintbrushes will tell us how much the total price should be. We’re going to label them with 𝑥 and 𝑦 for the input and the output.
Inside our function rule box, something is going to happen. We know that each of our 𝑥-values cost five dollars. That means that for every paintbrush you buy, you pay five dollars. This is represented by multiplication, more simply five 𝑥. But, does five dollars times 𝑥 equal the total purchase price. It would if he didn’t have a coupon, but he does. This means that no matter what he buys, the artist will take two dollars and thirty-one cents off the price of the paintbrushes. The operation that represents that is subtraction. We’ll take away two dollars and thirty-one cents. And this is our function, 𝑦 equals five 𝑥 minus two dollars and thirty-one cents. We could use this function to find the total purchase price, if the artist bought one paintbrush, if the artist bought seventeen paintbrushes. It wouldn’t matter; this function would still work. Here’s our last example.
Find the domain and range of the following function: 𝑦 equals three 𝑥 and 𝑥 is seven, eight, nine, and ten.
Let’s pause the question here and quickly review what domain and range mean. Domain is the set of all the input values and range is the set of all the output values. So in our function, domain, the set of all the input values together, range, the set of all the output values. Remember, we usually use 𝑥 and 𝑦 to represent our function. So another way to describe the domain would be the set of all the 𝑥-values. And another way to describe the range would be the set of all the 𝑦-values.
Back to the problem on hand, we can make a table to find the domain and the range. We were already given the 𝑥-values, which means we were already given the domain. Now we need to use our function to calculate the range. So we need to solve three times seven equals twenty-one. Three times eight is twenty-four, three times nine is twenty-seven, three times ten is thirty. And these values make up the range. And if we write them out, they look like this. The domain, seven, eight, nine, ten. The range, twenty-one, twenty-four, twenty-seven, and thirty. Those were only a few applications of functions. You’ll find many more as you explore and practice.