I am going over an old exam, and there is this question that I am stuck:
Given $A$ a commutative ring with unity, show that if $x\in\operatorname{Frac}(A)$ is integral over $A_m$ for all maximal ideals $m$ of $A$, then $x$ is integral over $A$.
Can anyone give me a hint please?
For each $\mathfrak m$, choose an $f \notin \mathfrak m$ such that $x$ is integral over $A_f$ (for instance, a common multiple of the denominators of the coefficients in a minimal equation for $x$ over $A_\mathfrak m$). Then the $f_\mathfrak m$'s generate the unit ideal in $A$, since no maximal ideal can contain all $f_\mathfrak m$'s by construction. Let $f_1, \dots, f_n$ be a finite subset of the $f$'s which generates the unit ideal.
Let $M=A[x]\subseteq \text{Frac}(A)$, considered as an $A$-module. Then $M_{f_i} = A_{f_i}[x]$ is a finite $A_{f_i}$-module for each $i$, because $x$ is integral over $A_{f_i}$. Since the $f_i$'s generate the unit ideal, it follows by a standard "patching" argument that $M$ is itself a finite $A$-module, hence $x$ is integral over $A$.