Solving the whole number equation $2x+5y=90$

6.6k Views Asked by At

$$2x + 5y = 90$$$x$ and $y$ are whole numbers. how many $(x,y)$ can this equation get?

I thought it like this; \begin{align*} 2x & = 90-5y\\ x & = \frac{90-5y}{2} \end{align*}

$x$ is a whole number so must be divisible by $2$. So I thought that by giving $y$ the values $\{ 0, 2, 4, 6, 8, 10, 12, 14, 16 \}$ it can be divided by $2$.

There can be $9$ $(x,y)$'s.

If it is true, is there a better way to do it? And If not, where did I make the mistake?

Thanks!

1

There are 1 best solutions below

1
On BEST ANSWER

What you did is correct, except that you stopped short: $y=18$ is also possible. You could also have rewritten the equation as $5y=90-2x$, so $$y=\frac{90-2x}5=18-\frac{2x}5\;.$$ This implies that $x$ must be a multiple of $5$, so you get $x=0,5,10,15,20,25,30,35,40$, and $45$.

You can reduce the work by noticing that in the equation $$x=\frac{90-5y}2=45-\frac{5y}2\;,$$ $x$ decreases when $y$ increases. The smallest permissible value of $y$ is of course $0$, and as you saw, $y$ must be even. With just a little more work we determine directly what the largest possible value of $y$ is, and then we don’t have to try values one by one. The smallest permissible value for $x$ is $0$, so we must have $$\begin{align*}&45-\frac{5y}2\ge 0\;,\\\\ &45\ge\frac{5y}2\;,\\\\ &5y\le90\;,\text{ and finally}\\\\ &y\le18\;. \end{align*}$$

Thus, we know that $y$ can only be one of the numbers $0,2,4,\dots,16,18$.