If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Worked example: determining domain word problem (positive integers)

Determining the domain of a function that models the price of candy bars.

## Want to join the conversation?

• please explain the difference between the brackets
• [ = Represented as a closed dot on a number line. Up to and INCLUDING that value. Exmp. [-1,4] Means all values between -1 and 4, inclusive, meaning it includes -1 and 4.
( = Represented as an open dot on a number line. Up to but NOT INCLUDING that value. Parentheses are also used in front of negative or positive infinity. Exmps. (-4,6) Means all values between -4 and 6 exclusive, meaning it doesn't include -4 or 6. (-∞,4} Means all values between negative infinity and 4, including 4.
{ = Usually indicate sets. Exmp. {x ∈ ℝ | -4 < x < 9 }
In words: X belongs to the set of real numbers such that it is greater than -4 and less than 9.
• how do i buy 0 candy bars
• You getting caught up on the word "buy" in too technical of a sense. When you are at the store, you do not have to buy every item that there is. You can choose to buy nothing of most of the items, So choosing to buy nothing and choosing to not buy something are the same thing.
• At , Sal says "the fewest number of candy bars we can buy is zero candy bars". Why is this so? The definition of a purchase is receiving goods in exchange for money. Surely no money and no candy bars equals no purchase. Do all functions just have to accept zero as an input?
• Not all functions have the same words like "purchase" so this makes it easier to understand so in a less mathy way of saying it is "you can buy No candy bars" for \$0.00( my keyboard does not have the cent symbol).

So manly all functions have different meaning of the words so they can all accept 0 to make it easier to understand p(0) completely means 0 candy bars so \$0.00 was spent for it.

Hope this helps..........Sorry if you already had it. It been a month xD.
(1 vote)
• Can the domain be [0,401) since b epsilon to integer?
• no!! as it does not only means u r inputting 400 , it also means you are inputting 400.5 bars or 400.8 bars,400.94 bars etc... and ofcourse you cant buy these 400.94 bars so, your domain is wrong!!
• Okay, so this problem ends with [0, 400]. I totally get why, you can choose any amount of candy bars (in integers, because you can't buy a fraction of a candy bar; that would be rude) until the store runs out. My question is: Would it be the same thing to say (-1, 401), or [0, 401), or (-1, 400], instead? It just seems to me like they would amount to the same meaning.
• 0 is the least amount of bars there are, while 400 is the most. You can't buy less than 0 candy bars and you can't be more than 400.

So (-1, 401) wouldn't make sense because -1 is not the least amount we have. But 0 is. 401 is not the most we have. 400 is.

Same thing with [0, 401) because 401 is not the most. That parenthesis is telling us that 401 is the most we have in stock, but that's not true. If it were true, we could theoretrically buy 400.70 candy bars, but we can't. We can't go over 400 at all.

(-1, 400] is telling that -1 is the least amount, but you can still buy -.05. That's not possible
• Does the domain only refer to the input to the function? Or does it also refer to the output? For example, is the domain of P(b) different from the domain of b?
• The domain of a function is the set of (valid) inputs. The corresponding output set is called the "range".
• At I don't get it why does he want to include 0, as 0 candy bars can't be bought, sounds illogical. Buying 0 candy bars is equivalent to buying none, for which the function isn't defined. The Question says "Purchased" unless and until it is 1 it can't be purchased.
• You are correct. If the definition of making a purchase is the exchange of good(s) for money then both of these things have to happen in order for a purchase to occur. And that is exactly what "purchased no candy bars" or "purchased 0 candy bars" means. The "0" and "no candy bars" negates the act of purchasing, stating a purchase hasn't occured. This has to be included because it is a possible state.
• How do I buy 0 candy bars? () Why is 0 included? I would have thought the minimum would be 1.
• You can buy 0 candy bars by just not buying any. Today I'm going to buy no (zero) candy bars. Tomorrow I'm going to buy 1 candy bar. So you can include 0 in this case because you have the option to not purchase any candy bars.
• I know this is a really simple and stupid question but how can you buy 0 candy bars? Wouldn't it be [1,400]?
• At about :45, Sal noted you could buy 0 candy bars, 1 candy bar, 2 candy bars, etc. While you cannot "buy" 0 candy bars, you can choose not to buy any candy bars which gives the 0.
• can't understand it ?
• So, I have 400 candy bars (I wish!). You say, "I'd like 3.78 candy bars, please!"
I'd say, "Uh, I actually can only sell integers of candy bars, like, 1, 2, 3, 4 candy bars."
So you say, "Then I'd like 923 candy bars, please!"
And I'd say, "Nope, sorry, I don't have that many. And that many would make you ill."
So you say, "Okay, then, if 403 isn't in the domain of the candy bar function, is -7?"
And I say, "I don't have -7 candy bars, unless you owe me some, which you don't."
So you say, "Ah, I get it! Your domain's interval is [0, 400] because I can have a minimum of 0 candy bars and a maximum of 400! And they have to be whole numbers!"
And I say, "Yep! I guess I should have said that! How many candy bars would you like?"