<h3>
Answer:</h3>
- 20 cans of cola
- 10 cans of root beer
<h3>
Step-by-step explanation:</h3>
x and y are whatever you want them to be.
It can be convenient for solving a problem like this to use x and y to represent <em>what the problem is asking for</em>: the number of cans of cola and the number of cans of root beer. It is also convenient (less confusing) to use those variable names in the same order that the nouns of the problem are named:
... x = # of cans of cola
... y = # of cans of root beer
Then the problem statement tells you ...
... x + y = 30 . . . . . . . 30 cans total were bought
... x = 2y . . . . . . . . . . the number of cans of cola is twice the number of cans of root beer
_____
This set of equations is nicely solved by substitution: use the second equation to substitute for x in the first.
... (2y) +y = 30 . . . . . put 2y where x was
... 3y = 30 . . . . . . . . collect terms
... y = 10 . . . . . . . . . divide by 3
... 2y = x = 20
<em>You're not done yet. You need to answer the question the problem asks.</em>
Jared bought 20 cans of cola and 10 cans of root beer.
_____
<em>Comment on x and y</em>
You customarily see x and y as the variables of a problem. Personally, I like to use variables that remind me what they stand for. In this problem, I might use "c" for cans of cola and "r" for cans of root beer. Then when I've found the solution, I know exactly how it relates to what the question is asking.
Always start by writing down what the variables stand for (as we did here). Sometimes, this is called <em>writing a Let statement</em>: <u>Let</u> x = number of colas; <u>let</u> y = number of root beers.
<em>Comment on problems of this type</em>
When a proportional relationship is given between the items in a sum (2 cola cans for every root beer can), it is often convenient to work the problem in terms of groups of items. Here, a group of 3 items can consist of 2 cola cans and 1 root beer can. Then 30 items will be 10 groups, so 10 root beers and 20 colas. The problem is solved even before you can name the variables.
Even when the relationship isn't exactly proportional, you can add or subtract the extras and still work the problem this way. Had we said colas numbered 3 more than twice as many root beers, we could have our groups of 3 total 27 (30 less the 3 extra), giving 9 root beers and 21 colas (3 + 2·9).