[Math] The sum of digits in a 2-digit number

algebra-precalculus

The sum of digits in a two digit number formed by the two digits from $1$ to $9$ is $8$. If $9$ is added to the number then both the digits become equal. Find the number.

My attempt:

Let the two digit number be $10x+y$ where, $x$ is a digit at tens place and $y$ is the digit at unit's place. According to question:

$$x+y=8$$

I could not figure out the other condition. Please help. Thanks in advance.

Best Answer

First note that $y \ne 0$ since otherwise we would have $x + y = x + 0 = 8$, and so $10x + y = 80$, but $80$ doesn't satisfy the second condition.

Therefore we must have $1 \le y \le 9$. This means that when we add $9$ to $10x + y$, the tens digit must increase by $1$ and the ones digit decreases by $1$. So then $10x + y + 9 = 10(x+1) + (y-1)$. Since the digits are equal, we have $x+1 = y-1$. Now you just have a system of two equations in two variables:

\begin{align*} x+y &= 8\\ x+1 &= y-1 \end{align*}