Exercise 5.5.A. of Vakil. Support of $f$ is either empty, the origin, or all space. The following is a question from Professor Vakil's notes on Algebraic Geometry.
$\DeclareMathOperator{\Spec}{Spec}$ $\DeclareMathOperator{\Supp}{Supp}$

Suppose $f$ is a function on $\Spec \mathsf{k}[x, y]/(y^2, xy)$ (i.e., $f \in \mathsf{k}[x, y]/(y^2, xy))$.
Show that $\Supp f$ is either the empty set, or the origin, or the entire space.

This has been asked before here and here.
I did not completely understand the answers there. (Why do they look at $A_x$?)
I have a proof of my own that I would like to get verified.

Let $A = \mathsf{k}[x, y]/(y^2, xy)$.
Recall that $\Supp f$ is a closed subset of $\Spec A$. Also recall that the primes of $\Spec A$ are of the form $[(y)]$ or $[(x - a, y)]$ for some $a \in \mathsf{k}.$ Since all ideals of the latter form contain $(y),$ they are in its closure. Thus, if $[(y)] \in \Supp f,$ then $\Supp f = \Spec A.$
The above tells us that to prove the statement, it suffices to prove the following:
Suppose $[(x - a, y)] \in \Supp f$ for some $a \in \mathsf{k}^\times.$ Then, $[(y)] \in \Supp f.$
Now, in our case, the stalks are simply localisations at those primes and the map taking a function to its germ is simply the natural localisation map. Support that we are given $f(x, y) \in A.$ Then, since we have quotient-ed out $(xy, y^2),$ we can write $f$ as
\begin{equation} \tag{$*$} \label{eq}
 f(x, y) = g(x) + cy
\end{equation}
for some $c \in \mathsf{k}.$
Now, suppose that $f(x, y)$ is nonzero in the localisation at $(x - a, y)$ for $a \neq 0.$ (In other words, $[(x - a, y)] \in \Supp f.$)
Since $x \notin (x - a, y),$ we see that $x$ is a unit in the localisation. But $xy = 0$ in $A$ forces $y = 0$ in the localisation. Thus, \ref{eq} tells us that $g(x) \neq 0.$
We now claim that $[(y)] \in \Supp f$ as well.
As before, the $cy$ terms becomes $0$ in the localisation. A typical element of $A \setminus (y)$ looks like $h(x) + by$ for some $b \in \mathsf{k}$ and $h(x) \neq 0.$ Then, we have
\begin{equation*} 
 [h(x) + by]g(x) = h(x)g(x) + byg(0).
\end{equation*}
Since $h$ and $g$ are nonzero, we see that the above is nonzero and thus, the image of $f$ is nonzero in the localisation and $[(y)] \in \Supp f,$ as desired.
(One can check that all the three possibilities are indeed attained. Consider $0,$ $y,$ and $1$ to get the support as $\emptyset,$ $[(x, y)],$ and $\Spec A,$ respectively.)

Two questions:

*

*Is that correct?

*Is there something easier that I'm missing?

 A: This looks okay as long as you're assuming that $k$ is algebraically closed (I did not see this assumption in the problem): otherwise there are points of $X$ which are not of the form $(x-a,y)$. Consider $k=\Bbb R$ and $(x^2+1,y)$, for instance. While it is correct except for that hurdle, it feels overwrought to me and I think there is an easier way. The solution in your second link is in my opinion a great argument to use, so I'll attempt to add a bit of explanation for you.
Let's start with a preliminary fact: if $a\in A$ is a function on $\operatorname{Spec} A$ with $A$ an integral domain, then $a$ has support either $\varnothing$ or $\operatorname{Spec} A$. Proof: if $a=0$ in some local ring of $\operatorname{Spec} A$, then $a=0$ in $A$ because localization is injective for an integral domain.
Now we can see why they look at $A_x\cong k[x]_x$: taking our original function $f$ and restricting it to $D(x)=\operatorname{Spec} k[x]_x\subset X$, we see that our preliminary fact applies to $f|_{D(x)}$, and so $\operatorname{Supp} (f|_{D(x)}) = D(x)\cap \operatorname{Supp} f$ is either empty or all of $D(x)$. Therefore $\operatorname{Supp} f$ is a closed set either disjoint from or containing $D(x)\subset X$, which gives exactly the options listed.
