Let $X$ be a quasi-compact scheme. There exists a natural map $X\rightarrow\mathrm{Spec}(\mathcal{O}_X(X))$. Prove that the image of this map is dense.
I think I've got it under assumption $X$ is integral. If so then it is equivalent to proving that the generic point is mapped to the generic point. Suppose that $X$ is covered by finitely many $\mathrm{Spec} A_i$ and that the generic point is inside $\mathrm{Spec} A_j$ for $j=1,\dots ,k$. Then it is the generic point of $\mathrm{Spec} A_j$ and we show it is mapped to the generic point of $\mathrm{Spec}(\mathcal{O}_X(X))$. For suppose that for every $1\leq j\leq k$ we have the kernel of the map is a non-zero prime ideal $\mathfrak{p}_j$. Observe that the intersection of $\mathfrak{p}_j$ cannot be zero since $\mathcal{O}_X(X)$ is an integral domain. Hence $\exists b\neq 0$ that is in every $\mathfrak{p} _j$. Then the image of $b$ in $A_j$ is its restriction on $\mathrm{Spec} A_j$ hence $b=0$, a contradiction.
We can also assume $X$ is reduced, since $X_\mathrm{red}\rightarrow X$ is homeomorphism and idem for $\mathrm{Spec} (\mathcal{O}_{X_\mathrm{red}})\rightarrow\mathrm{Spec}\mathcal{O}_X$.
How to tackle the remaining case, that is $X$ is finite union of integral schemes?