I am trying to prove the following statement:
Let $k$ be an arbitrary field. Let $f(x, y) \in k[x, y]$ and $\beta \in k$. If $f(x, \beta) = 0 \in k[x]$, then $f(x, y)$ is divisible by $(y - \beta)$.
Here is my attempt:
Consider $f$ as an element of the polynomial ring $k(x)[y]$. Using division algorithm, we can write $f = (y - \beta) q + r$, where $q, r \in k(x)[y]$, and $r$ has degree [in $y$] strictly smaller than $1$, hence $r \in k(x)$. Since we are given $f(x, \beta) = 0 \in k[x] \subseteq k(x)$, we have $$0 = f(x, \beta) = (\beta - \beta) q(\beta) + r,$$ so $r = 0 \in k(x)$, and we just have $f = (y - \beta) q$. Now write $q$ explicitly as $q(y) = a_0(x) + a_1(x) y + \dots + a_n(x) y^n$ [with all $a_i(x)$'s in the field $k(x)$], and without loss of generality assume $a_n(x) \neq 0$. Let $b(x) \in k[x]$ be a common denominator for $a_0(x), a_1(x), \dots, a_n(x)$. Then $$b(x) f(x, y) = (y - \beta) [b(x) q(x, y)]$$ and note that $b(x) q(x, y) \in k[x, y]$. Since $(y - \beta) \in k[x, y]$ is irreducible, unique factorization implies that $(y - \beta)$ has to divide either $b(x)$ or $f(x, y)$. It cannot divide $b(x)$ because $b(x)$ has no $y$ term. Therefore $(y - \beta) \mid f(x, y)$.
Is my answer correct? Is there perhaps a more elementary method?
This is not a homework question. I was reading the proof of the very first lemma in Shafarevich's Basic Algebraic Geometry 1, and the second last sentence in that proof said "... $f(x, \beta)$ is not identically $0$, since otherwise $f(x, y)$ would be divisible by $y - \beta$ ..." It wasn't immediately obvious to me, and I'm just trying to fill in that gap.