I am working on the following exercise:
Show that $a^2+b^2 = 3$ has no rational solutions.
My proof goes as follows: Suppose there are two rational numbers $a = \frac{x}{d_1}$ and $b = \frac{y}{d_2}$ with $(x,d_1) = (y,d_2) = 1$ that solve the above equation. Then we can write:
$$x^2d_2^2+y^2d_1^2 = 3d_1^2d_2^2 \tag{1}$$
Since $x$ and $y$ are integers this implies w.l.o.g. that $x^2 = 2d_1^2$ and $y^2 = d_2^2$. But this in turn implies that $x = \sqrt{2}d_1$, which is obviously not an integer, a contradiction.
I think that this idea should work, but I think there should be a more elegant proof using the well known fact that for every odd prime $p$ holds
$$p = x^2 + y^2 \iff p \equiv 1 \bmod 4$$
, but I do not see how to do that here. Could you give me a hint?