Solution to the following diophantine equation

311 Views Asked by At

I have the following problem:

A woman went to the supermarket to buy 12 liters of milk, some of which are whole and the others skimmed, for \$1200. If the whole milk is worth \$30 more per liter than the skimmed, and she bought the minimum of skimmed milk, How many liters would she have bought of each type?

I am having difficulties extracting the data from such type of questions. From my knowledge:

$$x \rightarrow \text{ whole milk, } \\ y\rightarrow \text{ skimmed milk, } \\ a \rightarrow \text{ price of whole milk, } \\ b \rightarrow \text{ price of skimmed milk. }$$

I gathered that:

$$x + y = 12 \implies y = 12 - x \rightarrow \text{ eq. 1 } \\ ax + by = 1200 \rightarrow \text{ eq. 2 } \\ a = b + 30 \rightarrow \text{ eq. 3 }$$

Substituting eq. 1 and 3 into eq. 2:

$$(b+30)x + b(12-x) = 1200 \\ bx + 30x + 12b - bx = 1200 \\ 30x + 12b = 1200$$

$$mcd(30, 12) = 6 \implies \frac{30x}{6} + \frac{12b}{6} = \frac{1200}{6} \\ 5x + 2b = 200$$

Then:

$$x_0 = \frac{200 - 2y_0}{5} \\ y_0 = 5 \implies x_0 = \frac{200 - 2(5)}{5} = \frac{200 - 10}{5} = \frac{190}{5} = 38 \\ x_0 = 38$$

Therefore:

$$(x_9, y_0) = (38, 5)$$

General Solution:

$$(38-2k, 5+5k)$$

Would that be the way to go? From here, how do I proceed?

1

There are 1 best solutions below

2
On BEST ANSWER

From $a = b + 30$ and $x + y = 12\to y=12-x$

substituting in the 2nd equation we have

$(b+30)x+b(12-x)=1200$

$bx +30x+12b-bx=1200$

$30x+12b=1200$

$5x+2b=200$

$x=\dfrac{200-2b}{5}$

$y=12-\dfrac{200-2b}{5}=\dfrac{2b-140}{5}$

and finally the solution

$$a= b+30,x= \frac{200-2b}{5},y= \frac{2b-140}{5}$$ $200-2b>0$ then must be $b<100$ and $2b-140>0$ because $y$ must be positive so must be $b>70$

Thus must be $70<b<100$ and divisible by $5$ so the solution is

$ \begin{array}{l|l|l|l} a & b & x & y\\ \hline 105& 75 &10&2\\ 110&80&8&4\\ 115&85&6&6\\ 120&90&4&8\\ 125&95&2&10\\ \end{array} $

Hope this helps