I would like to compute the following sheaf of regular functions over topological space $X\subset A^2$ over $C$ in a systematic manner.
$X$ is endowed with subspace topology of $A^2$. Consider any open set $U\cap X\subset X$. So $U=D(f_1,\dots, f_n)=\cap D(f_i)$. I always have an injective restriction map $O_X(D(f_i))=A(X)_{f_i}\to O_X(U)$ where the former indicates localization at $f_i$. So $\{\frac{g}{\prod_i f_i^{n_i}}\vert g\in A(X)\}\subset O_X(U)$ where the former indicates the subring generated by those elements.
Hope I am correct so far. Is this all the elements of $O_X(U)$? How do I conclude that I do not have anything extra? Is there a generic way to construct sheaf of regular functions?
I computed $X=V(x_1x_2)$. Open set on $X$ can avoid either only finitely many points, $x_i=0$, $x_i=0$ plus some points or everything.
For open set $U$ avoiding points on $x_1$ axis, $O_X(U)=k[x_1,x_2]_{\{(x_1-a_i)\}}$ where $\{(x_1-a_i)\}$ is simply multiplicative closed set formed by points avoided. If $U$ avoids more points, then $O_X(U)$ is simply localize at more points.
If $U$ avoids $x_i=0$, $O_X(U)=k[x_1,x_2]_{(x_i)}$. If $U$ avoids $x_1=0$ and some extra points on $x_2=0$, $O_X(U)=k[x_1,x_2]_{(x_2,\{x_1-a_i\})}$
Correction: All $k[x_1,x_2]$ should quotient out $I(X)$.