Groups of units of $\mathbb{Z}\left[\frac{1+\sqrt{-3}}{2}\right]$

Solution 1:

The reason you may want to change it from $a^2+ab+b^2=\pm 1$ to $(2a+b)^2+3b^2 = \pm 4$ is because the latter is a sum of squares, so this immediately cuts down on the possibilities: for one thing, you can tell that the answer must be $4$ and not $-4$ (sum of squares), that you must have $|2a+b|\leq 2$ and $3b^2\leq 4$; so that $b$ must be either $0$, $1$, or $-1$, etc. Whereas in $a^2+ab+b^2 = \pm 1$, $ab$ may be negative, which makes searching for solutions somewhat more complicated. (Not much, but things are not so quickly evident).

To go from $a^2+ab+b^2 = \pm 1$ to $(2a+b)^2 + 3b^2=\pm 4$, multiply by $4$ and complete the square: $$\begin{align*} a^2 + ab + b^2 &= \pm 1\\ 4a^2 + 4ab + 4b^2 &= \pm 4\\ (2a)^2 + 2(2a)b + b^2 +3b^2 &=\pm 4\\ (2a+b)^2 + 3b^2 &= \pm 4 \end{align*}$$ Alternatively, start by completing the square and then clear denominators: $$\begin{align*} a^2 + ab + b^2 &= \pm1\\ \left(a+\frac{1}{2}b\right)^2 + \frac{3}{4}b^2 &=\pm 1\\ \left(2a+b\right)^2 + 3b^2 &=\pm 4. \end{align*}$$

Solution 2:

Let $\omega=\frac{1+\sqrt{-3}}{2}$. Notice that the norm of an element $a+b\omega$ in $\mathbb{Z}[\omega]$ is $$(a+b\omega)(a+b\overline{\omega})=a^2+ab+b^2.$$ Since the norm is multiplicative, all units must have norm $1$, otherwise they would not be invertible. This means we are looking for solutions to $a^2+ab+b^2=1$. (It can't be $-1$, I don't know why you put $\pm$ for all these quantities.)

For the second part, the author likely found it nicer to shift the quadratic form, as we need not consider different cases. Here is a direct way: To solve $a^2+ab+b^2=1$, split based on whether $ab$ negative or nonnegative.
Case 1: If $ab$ is nonnegative, then $1=a^2+ab+b^2\geq a^2 +b^2$, so we see that $a=\pm 1$, $b=0$ and $a=0$, $b=\pm 1$ are the only solutions.
Case 2: If $ab$ is negative, then both $a$ and $b$ are not zero, and then $1=a^2+ab+b^2=a^2+2ab+b^2-ab=(a+b)^2 -ab$. This then gives the only other solutions, $a=1=-b$, and $b=1=-a$.