00:02
In this problem, we're looking at how to write a function given some information in a word problem.
00:08
And so in this problem, we're talking about people are trying to plan their wedding, and they're trying to figure out how much the caterer is going to cost.
00:15
The caterer said if there are 100 people at their wedding, then it's $20 per person, but every person less than 100, the cost will go up by $5.
00:24
So we're trying to assume no more than 100 people will be there, where x is going to represent how many people less than 100.
00:32
So like if 90 people come, x is 10 because that's 10 less than 100.
00:38
And so for part a, we need to write a function that we're going to call n of x, and that's going to represent how many guests will be at the wedding.
00:47
Okay, so if the maximum is 100, so we've got our function n of x, and this is part a, n of x is representing the number of people, and there's a maximum of 100 people, and then we're going to subtract x is how many people less than 100.
01:06
Okay, so if 90 people were going to be there, x would be 10, 100 minus 10 would give us that 90.
01:12
So this function here represents the number of people that are attending the wedding.
01:19
And then for part b of this problem, part b says, we need to now write a function g of x that gives us the cost per guest.
01:28
And so the problem said that every person less than, 100 is going to make the is going to make the price increase by five by five dollars so for our function if we're calling this one g of x it originally if there's 100 people it's going to cost 20 dollars per person but any number of people less than a hundred we're going to have to add on five dollars more per person that there is less than a hundred so g of x the cost per person is $20 plus five times however many people less than 100.
02:04
So, for example, if there was 99 people, then x is one.
02:09
So there's one less than 100.
02:10
So that means it would cost 25 per person.
02:12
So we add $5 on for every extra person underneath.
02:16
That's less than 100.
02:18
And part c is asking to write a function that gives us the total cost, which they already told us would be n of x times g of x.
02:26
So part c, we're calling our cost function is going to be c of x, which they told us is just n of x times g of x.
02:44
And we've already got our functions for n and g...