# Money question about percentage — Algebra 1

Homework Statement:
If Ollie bought some records at .35 cents each and .45 cents each. If he spent a total of 4.25 how many records did he buy altogether? Explain.
Relevant Equations:
No relevant equations.
I've tried to answer but I've been coming up with nonsense answers, but I'll show my method and see if its right or wrong so I can get pointed in the right direction.

.35x + .45(35 - x) = 4.25, I think this is where my error is but I'm unsure.

Multiply by 100 to clear the decimals and I get 35x + 1575 -45x = 425 then I get -10x + 1575 = 425, then -10x = -1150, so x = 115
which gives me $40 . 25 so the answer seems close to the desired one but I'm still confused. ## Answers and Replies phinds Science Advisor Gold Member .35x + .45(35 - x) = 4.25, I think this is where my error is but I'm unsure. Yep, sure is. Where did you get the "35-x" ? What does that expression assume? WWGD I thought if x is the amount invested at .35 then I see I forgot a decimal. Please ignore my previous attempt it was misguided. I brute forced it trying numbers and ended up with the answer. I see that if you phrase it in terms of two variables with .35x + .45y= 4.25 you end up with x= 7 = 2.45, y = 4 = 1.80 add those together and you get 4.25. The book offered me no hints or methods so is there a better way to solve this? This current chapter is on equations in two variables. symbolipoint Homework Helper Education Advisor Gold Member Homework Statement: If Ollie bought some records at .35 cents each and .45 cents each. If he spent a total of 4.25 how many records did he buy altogether? Explain.Relevant Equations: No relevant equations. Some information seems to be missing, but you can make an educated guess to begin like this: If all the records were at price 0.35 whatever the money unit per record, then 12.14 records bought. If all the records were at price of 0.45 of these moneys then 9.44 records bought. The total number of records, being a WHOLE number, would be something from 10, or 11, or 12. Try each of these and see what you can find. Vanadium 50, Delta2 and Lnewqban Some information seems to be missing, but you can make an educated guess to begin like this: If all the records were at price 0.35 whatever the money unit per record, then 12.14 records bought. If all the records were at price of 0.45 of these moneys then 9.44 records bought. The total number of records, being a WHOLE number, would be something from 10, or 11, or 12. Try each of these and see what you can find. What information seems to be missing? That's exactly what the problem says. I seem to get he bought 11 records total with 7 being at 35 cents per record and 4 at 45 cents per record. Is there a method besides just plugging in numbers until you get the answer? symbolipoint Homework Helper Education Advisor Gold Member What information seems to be missing? That's exactly what the problem says. I thought you could understand without my having to tell you. OBVIOUSLY, the total number of records. If that were given in the example, then you'd have a very typical two-variable linear system example problem. One could choose to solve with two variables or convert to a one-variable solution. I seem to get he bought 11 records total with 7 being at 35 cents per record and 4 at 45 cents per record. Is there a method besides just plugging in numbers until you get the answer? So you worked through what I told you and found a result. What you ask here may come from some study in Linear Algebra. I did not use it when analyzing the example problem. phinds Science Advisor Gold Member The book offered me no hints or methods so is there a better way to solve this? This current chapter is on equations in two variables. You did the right thing and you did not leave anything out of the problem statement. Such equations where only integer solutions are valid are called "Diophantine" equations. I don't remember anything about techniques for solutions but there probably are some. Google Diophantine equations. Brute force, such as what you did, works well if there aren't too many possibilities. Lnewqban phinds Science Advisor Gold Member I thought you could understand without my having to tell you. OBVIOUSLY, the total number of records. No, THAT'S what is being solved for, that plus how many of each cost. WWGD Science Advisor Gold Member I think this could work: After multiplying through, you get 7x+9y=85. Find a pair x',y' of x,y so that: 7x'+9y'=1. ( Possible since gcd(7,9)=1). Try it out or use the Euclidean Algorithm if you're familiar with it. Now Notice 7x'+9y'=7(x'-9k)+9(y'+7k) , k any Integer. (**) This gives you all ( infinitely many) solutions to the system. Now multiply through by 85: 595x'+765y'=85 By adjusting the values of x',y' using (**) above, you get all solutions to above equation , which is what you're looking for. Of course, select non-negative values for x',y'. Hope I was clear; let me know of any question. Edit: I need to make some changes to this. Will do them Asap. Last edited: PeroK Science Advisor Homework Helper Gold Member 2020 Award I think this could work: After multiplying through, you get 7x+9y=85. Starting with this and looking modulo ##7## we get: $$2y = 1 \ (mod \ 7) \ \ \text{hence} \ \ y = 4 \ (mod \ 7)$$ That gives us ##y = 4, 11, \dots##. But, as ##9y \le 85##, we have ##y < 10##; so ##y = 4## is the only possibility. Mark44 Mentor If Ollie bought some records at .35 cents each and .45 cents each. If he spent a total of 4.25 how many records did he buy altogether? Explain. Minor point: .35 cents and .45 cents are just fractions of a penny. If Ollie bought just the cheaper records, he could get 1,214 of them. If he bought only the more expensive records, he could get 944 of them. What you undoubtedly mean, but didn't write, was that the records were 35 cents and 45 cents, respectively, or$.35 and $.45, respectively. SammyS and phinds symbolipoint Homework Helper Education Advisor Gold Member No, THAT'S what is being solved for, that plus how many of each cost. I had to reread the actual question part. neilparker62 Homework Helper Homework Statement:: If Ollie bought some records at .35 cents each and .45 cents each. If he spent a total of 4.25 how many records did he buy altogether? Explain. Relevant Equations:: No relevant equations. I've tried to answer but I've been coming up with nonsense answers, but I'll show my method and see if its right or wrong so I can get pointed in the right direction. .35x + .45(35 - x) y = 4.25, I think this is where my error is but I'm unsure. Multiply by 100 to clear the decimals and I get 35x + 1575 -45x = 425 then I get -10x + 1575 = 425, then -10x = -1150, so x = 115 which gives me$ 40 . 25 so the answer seems close to the desired one but I'm still confused.

As mentioned in post #7 it's a Diophantine equation. So just plot your corrected equation above and look for integer solutions.

(you could use https://www.desmos.com/calculator or other online graphing utility)

We have ##7x+9y=85##, but let's consider ##7x+9y=1## for the moment. Since ##\text{gcd}(7,9)=1##, Bezout's identity tells us that the last equations has a solution. We can find such a solution like this:
1) Apply the euclidian algorithm on ##7## and ##9## until you get ##1## as rest (we know that we will get it because ##\text{gcd}(7,9)=1##). Basically you divide the greatest out of ##9## and ##7## by the smallest, then you always divide the divisor by the rest.
\begin{align*} &9=1\times7+\mathbf2\\ &7=3\times\mathbf2+\mathbf1 \end{align*}
I have bolded the rests on purpose. Now, what you need to do is put the last equation in the form ##1=...##, then replace the rest from the before last equation in that one without performing calculations on the rests or ##9## or ##7##.
We have:
\begin{align*} \mathbf1&=7-3\times\mathbf2\\ &=7-3\times(9-1\times7)\\ &=7\times(4)+9\times(-3) \end{align*}
This yields us a particular solution ##(4,-3)##.
At this point, you might be tempted by multiplying the whole equation by ##85## to have the solutions ##(4\times85,-3\times85)##, but you can't really have a negative number of records.

For the sake of making the rest a bit general such that you can see the point, I'm going to refer to ##(4,-3)##, i.e the particular solution we have found, as ##(a,b)##.
Since ##7x+9y=1## and ##7\times(4)+9\times(-3)=1##, then ##7x+9y=7\times(4)+9\times(-3)##, or ##9(y+3)=7(4-x)##.

If you look at the last equation, you can see that it is in the form ##9(y+3)=7k##, where ##k\in\mathbb{Z}##. This tells us that ##7## divides ##9(y+3)##.
However, we know that ##\text{gcd}(7,9)=1##, thus ##7## divides ##(y+3)##, hence ##y+3=7k##, or ##y=7k-3##.
If you do the same thing with ##x##, then you'll find that ##4-x=9k##, or ##x=4-9k##.

We now have our general solution for ##7x+9y=1##, which is the couples ##(4-9k,7k-3)##, where ##k\in\mathbb{Z}##.
Multiply the while equation by ##85## and you get ##7(85x)+9(85y)=85##, whose solutions (some, there are actually integer solutions for some non integer ##k##) are ##(340-765k,595k-255)##.

And it seems that there is no solution where both ##x## and ##y## are positive and non zero integers for ##k\in\mathbb{Z}##. So, not sure how you are supposed to find a solution.
I can't delete this, seriously.

Last edited:
PeroK
PeroK
Homework Helper
Gold Member
2020 Award
And it seems that there is no solution where both ##x## and ##y## are positive and non zero integers.

That's except for ##x = 7, y =4##, of course!

phinds
That's except for ##x = 7, y =4##, of course!
Oh no..
It gets generated for ##k=\frac{37}{85}##.
Well, I'm tilted.

phinds
Gold Member
Oh no..
It gets generated for ##k=\frac{37}{85}##.
Well, I'm tilted.

etotheipi
kuruman
Homework Helper
Gold Member
I saw Diophantine equations in high school algebra and I remember being taught to solve for one of the unknowns in terms of the other and then use trial and error. Here we have $$x=\frac{85-9y}{7}.$$Note the constraints that ##y## be an integer and ##9y<85##. This limits the search to 8 candidates for ##y## so the calculation is not at all tedious or long. With spreadsheets, it's even easier to solve Diophantine equations today than back in my high school, slide rule, days.

SammyS
WWGD
Gold Member
Starting with this and looking modulo ##7## we get:
$$2y = 1 \ (mod \ 7) \ \ \text{hence} \ \ y = 4 \ (mod \ 7)$$
That gives us ##y = 4, 11, \dots##. But, as ##9y \le 85##, we have ##y < 10##; so ##y = 4## is the only possibility.
But for a more general result , just set the terms of the solution set to be greater than 0:
From ##7\cdot 4+ 9\cdot (-3)=1## , multiply through by 85:

##7\cdot 340+ 9\cdot (-255) =85##

We get the general solution set:

## 7\cdot (340-9k)+9\cdot ( -255+7k) ##

Now, require the solution to have positive coefficients:

##340-9k>0 ; -255+7k>0 ##

Which forces k to be an integer in ##\{36, 37, 38\}## since first requires ##k<37 ##, second requires ## k >36 ##.By trial, 37 works and :

##340-9\cdot 37= 7 ; -255+ 7\cdot 37 =4 ##.

What confuses me is why using/adding both equations together we get just that

## 85 > 2k ## , which entails a great loss of information.

pasmith
Homework Helper
Let the number of records bought be $N$, with $n$ costing 35 cents. Then we need to find integers N and n such that $$7n+9(N−n)=85$$ or $$9N=85+2n.$$ Working modulo 9 we have $85 \equiv 4$ so we must have $2n \equiv 5$. Fortunately 2 is invertible modulo 9 (since $2 \times 5=10$) so multiplying by 5 yields $$n \equiv 25 \equiv 7 \Rightarrow n = 7 + 9k$$ for some integer $k \geq 0$. Substituting this into the second equation above yields $9N=99+18k$ or $$N=11+2k.$$ Then $$N - n = 4 - 7k$$ and as this must be positive we must have $k = 0$.

Last edited: