## Pairs of Positive Integers

How many pairs of positive integers $\left (a,b\right )$, with $a$ and $b$ both less than $100$, satisfy the equation $a\sqrt{2a+b}=b\sqrt{b-a}$?
Source: NCTM Mathematics Teacher

SOLUTION
$\sqrt{b-a}$ implies that $b-a\geqslant 0$ or $b\geqslant a$.
Suppose $b=a$
$a\sqrt{2a+a}=a\sqrt{a-a}$
$a\sqrt{3a}=a\sqrt{0}$
$a\sqrt{3a}=0$  Not possible because $a$ is a positive integer.
We conclude that $b>a$. Since $b$ is a positive integer, there exists some positive integer $x$ such that $b=a+x$.
$a\sqrt{2a+\left (a+x\right )}=\left (a+x\right )\sqrt{\left (a+x\right )-a}$
$a\sqrt{3a+x}=\left (a+x\right )\sqrt{x}$
Squaring both sides of the equation
$a^2\left (3a+x\right )=x\left (a+x\right )^2$
Divide both sides by $3a+x\neq 0$
$a^2=\displaystyle\frac{x\left (a+x\right )^2}{3a+x}$
$a$ is an integer implies that $a^2$ is an integer. This in turn requires that $3a+x$ divides $x\left (a+x\right )^2$ which only occurs when $x=a$.
Verification
$\displaystyle\frac{a\left (a+a\right )^2}{3a+a}=\frac{a\left (4a^2\right )}{4a}$
The answers are $49$ pairs $\left (a,2a\right )$
$\left (1,2\right ),\left (2,4\right ),\left (3,6\right ),\dots,\left (49,98\right )$

Alternative solution
$a\sqrt{2a+b}=b\sqrt{b-a}$
Squaring both sides
$a^2\left (2a+b\right )=b^2\left (b-a\right )$
$2a^3+a^2b=b^3-ab^2$
Rearrange the terms
$a^3+a^2b+ab^2=b^3-a^3$
Factor both sides
$a\left (a^2+ab+b^2\right )=\left (b-a\right )\left (a^2+ab+b^2\right )$
Divide both sides by $a^2+ab+b^2\neq 0$
$a=b-a$
$b=2a$