TITLE: For a (not necessarily affine) scheme $X = \bigcup_{i=1}^n X_{f_i}$, does $(f_1, \ldots, f_n) = (1)$ in $\mathcal{O}_X(X)$?
QUESTION [10 upvotes]: This is of course true in the affine case, so it seems like it should be true in general, because $\mathcal{O}_X(X)$ should be "smaller" for a non-affine scheme than for a similar affine scheme (e.g. all global sections over a projective scheme are constants).  Just to be clear on notation:
$X$ is a scheme, not necessarily affine.
$f_1, \ldots, f_n \in \mathcal{O}_X(X)$.
$X_f := \{ x \in X \; | \; f_x \not \in \mathfrak{m}_{X, x} \}$, where $\mathfrak{m}_{X, x}$ is the maximal ideal of the stalk $\mathcal{O}_{X, x}$
$X = X_{f_1} \cup \cdots \cup X_{f_n}$
Does it follow that $(f_1, \ldots, f_n) = (1)$ in $\mathcal{O}_X(X)$?
We have $(f_1|_U, \ldots, f_n|_U) = (1)$ in $\mathcal{O}_X(U)$ where $U \subset X$ is open affine, but I don't see how to extend this to all of $X$.

REPLY [8 votes]: No. Let $X = \mathbb{A}^2 \setminus (0,0)$. Then $\mathcal{O}(X) = k[x,y]$ and $X = X_x \cup X_y$. However, the ideal $\langle x,y \rangle$ in $k[x,y]$ is not $1$. 
The plane with a point deleted should be in your standard toolkit to test things against.