How do I solve this mathematical word problem without using trial and error?
Timmy has almost $2.00 in allowance money that he wants to spend on candy. He has two favorite candies, one selling at $0.15 a piece and one at $0.08 a piece. If he ends up spending $1.92 on 17 pieces of candy, how many $0.15 pieces of candy did Timmy decide to buy?
Is there a formula I can apply to this? Find the answer and show me how you did it.
Observing members:
0
Composing members:
0
11 Answers
It’s a simple linear system. Two equations, two variables.
Now think about it some more.
@bob_ is correct…
E1: a + b = 17 (two types of candy, but we know the total of both he bought is 17)
E2: 0.15 a + 0.08 b = 1.92 (we know total amount spent and how much each costs)
We want to know ‘a’, so…
Rearrange E1… b = 17 – a
Substitute into E2… 0.15 a + 0.08 (17 – a) = 1.92
Solve for a.
17 * 0.15 = 2.55
2.55 – 1.92 = 0.63
0.15 – 0.08 = 0.07
0.63 / 0.07 = 9
17 – 9 = 8
That is how I did it.
@jerv Clever. Not the most direct way, but it works.
@jerv @hiphiphopflipflapflop Thanks guys, those are both good answers. When i saw this question I immediately picked a random amount for the .15 cent candies, checked the remainder, and reached 8 by taking a few guesses and checking them.
@jerv it took me a while to extract the thought process there. Agree with @bob_ again, indirect and clever.
I have a knack and a reputation for doing things my own way.
A somewhat offbeat way of doing it.
Average price of candy = 1.92/17 = 11,3 cents (rounded)
If p is the fraction of 15 cent candies, then looking at it as a weighted average,
15 p + 8(1-p) = 11.3
7p = 3.3
p=,47 (rounded)
.47*17 = 8
It is unfortunate that weighted averages are not taught in schools. It is, after all, how people’s grades are determined.
One might argue that my method is just a complication on top of that of @hiphiphopflipflapflop
What I am doing in effect is dividing his equation by the total number 17.
0.15 a /17+ 0.08 (17 – a) /17= 1.92/17
I would argue though that average value takes on a life of its own. After computing the average price of 11.3 cents, you can compute (8+15)/2 = 11.5. That means that 11.3 is closer to 8 than 15. Without doing any other calculation, you know there will be more 8 cent candies than 15 cent ones. Further, since 11.3 is so close to 11.5, you know the numbers of the two candies will be pretty close.
8*17 = 136
15 – 8 = 7
192 – 136 = 56
56/7 = 8
@ratboy Yes, solving from the bottom and working up works just as well as going from the top down.
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.