Solve $2a + 5b = 20$

Is this equation solvable? It seems like you should be able to get a right number! If this is solvable can you tell me step by step on how you solved it. \begin{align} {2a + 5b} & = {20} \end{align}

My thinking process: \begin{align} {2a + 5b} & = {20} & {2a + 5b} & = {20} \\ {0a + 5b} & = {20} & {a + 0b} & = {20} \\ {0a + b} & = {4} & {a + 0b} & = {10} \\ {0a + b} & = {4/2} & {a + 0b} & = {10/2} \\ {0a + b} & = {2} & {a + 0b} & = {5} \\ \end{align}

The problem comes out to equal: \begin{align} {2(5) + 5(2)} & = {20} \\ {10 + 10} & = {20} \\ {20} & = {20} \end{align}

since the there are two different variables could it not be solved with the right answer , but only "a answer?" What do you guys think?

-
Are $a$ and $b$ supposed to be integers or real numbers? I don't really know a lot about number theory, but I know that if they're real numbers then there are infinite solutions. –  Javier Badia Nov 5 '12 at 2:05
There are infinite solutions either way (for this one anyways). See here. –  EuYu Nov 5 '12 at 2:07
Anyway, I don't understand the thinking process. How do you get from $2a+5b =20$ to $0a+5b=20$? That's certainly not a valid step. –  Javier Badia Nov 5 '12 at 2:09
I have no vaild reason why I put 2a to 0a. My thinking process was that if i had just magicly put it to 0 that i could get "a answer." but that I look at it makes me feel dumb! –  Hobbs Nov 5 '12 at 13:57

You have what is known as a linear diophantine equation. An equation of the form $$ax + by = c$$ is solvable in $x$ and $y$ if and only if $\gcd(a,\ b)\mid c$. In your particular case the equation is solvable.

You've generated one solution already, the pair $(x,\ y)=(5,\ 2)$. All the other solutions are then given by $$(x,\ y)=\left(5 + 5k,\ 2-2k\right)$$ for $k\in \mathbb{Z}$.

-

Also, this equation has solutions in the integers in the greatest common divisor of 2 and 5 is 1, which divides 20.

To get an explicit solution, use the Euclidean algorithm. (BTW these are called Diophantine equations if you want to do further reading on them)

-

Note that $2a$ must have as its unit digit $0, 2, 4, 6,$ or $8$ (because it's even!).

Similarly, note that $5b$ must have as its unit digit $0$ or $5$.

With a bit of thinking, you can see that for $2a + 5b$ to be $20$, we need to ensure that $2a$ has a unit digit of $0$ (hence $a$ is a multiple of $5$).

So let $a$ be a multiple of $5$. That is, let $a = 5k$, for some integer $k$.

Then $2a + 5b = 20$ becomes $10k + 5b = 20$, so that $5b = 20 - 10k$.

Dividing both sides of our last equation by $5$, we have $b = 4 - 2k$.

This gives you all the possible answers for $(a, b)$, namely, $(5k, 4-2k)$.

For example, when $k = 1$ you get $(5 \cdot 1, 4 - 2 \cdot 1) = (5, 2)$, which is the answer you came to.

-
Generally one can use the Extended Euclidean algorithm, but that's overkill here. First note that since $\rm\,2a+5b = 20\:$ we see $\rm\,b\,$ is even, say $\rm\:b = 2n,\:$ hence dividing by $\,2\,$ yields $\rm\:a = 10-5n.$
Remark $\$ The solution $\rm\:(a,b) = (10-5n,2n) = (10,0) + (-5,2)\,n\:$ is the (obvious) particular solution $(10,0)\,$ summed with the general solution $\rm\,(-5,2)\,n\,$ of the associated homogeneous equation $\rm\,2a+5b = 0,\:$ i.e. the general form of a solution of a nonhomogeneous linear equation.