Testing a polynomial is irreducible. This question may be easy but I am unable to fix it.
How is the polynomial $f(x,y)=x^2-2y^2$ irreducible over $\mathbb{Q}[x,y]$?
 A: If $x^2 - 2y^2 = (ax + by)(cx + dy)$ for $a, b, c, d \in \mathbb{Z[x,y]}$, then:
$ac = 1$, $ad + bc = 0$, and $bd = -2$. So: $b = 2, d = -1$ or $b = -2, d = 1$, or $b = -1, d = 2$, and $b = 1, d = -2$. But $a = c = 1$ or $a = c = -1$. Either of these yields:
$b + d = 0$, but this can't happen. So you get the irreducibility of $f(x,y)$ over $\mathbb{Z[x,y]}$, but this implies irreducibility over $\mathbb{Q[x,y]}$
A: Let $R= \mathbb{Q}[y].$ Note that $\mathbb{Q}[x,y]$ is canonically isomorphic to $R[x] = (\mathbb{Q}[y])[x],$ and that $R$ is a unique factorization domain. 
You want to show $x^2 - 2y^2$ is irreducible in $R[x].$ The coefficients of this polynomial are $1$ and $-2y^2.$ Since the greatest common divisor of the coefficients is $1,$ the polynomial is primitive and Gauss's lemma applies. This states that $x^2-2y^2$ is irreducible in $R[x]$ if and only if it is irreducible in $(\text{Frac}(R))[x],$ where $\text{Frac}(R)$ is the field of fractions of $R.$
A quadratic polynomial with coefficients in a field is reducible if and only if it has a root, so your polynomial is reducible in $(\text{Frac}(R))[x]$  if and only if there is a rational function $g(y)\in \mathbb{Q}(y)$ such that $g(y)^2 = 2y^2.$ 
If there is such a $g,$ write it as $g(y) = \dfrac{a(y)}{b(y)}$ where $a(y),b(y)\in \mathbb{Q}[y]$ and have no common factors. Then we have the following equality in the ring $\mathbb{Q}[y]$ : $$ a(y)^2 = 2y^2 b(y)^2.$$ 
The coefficients of $a$ and $b$ are rational numbers. If we clear denominators on both sides we get an equality of the form $$ \tilde{a}(y)^2 = 2 y^2 \tilde{b}(y)^2$$ where $\tilde{a},\tilde{b}\in \mathbb{Z}[y],$ which is a UFD. Now note that the power of $2$ in the prime factorization of the left hand side is even, while on the right it is odd. Hence we have a contradiction and so such $g(y)$ exists. Therefore $f$ is irreducible in $(\text{Frac}(R))[x],$ and so $x^2-2y^2$ is irreducible in $R[x] = \mathbb{Q}[x,y].$
