Integral rational functions are locally bounded I am having some trouble solving the following problem:
"Let $X$ be an affine variety over $\mathbb{C}$. Denote by $\mathbb{C}[X]$ its coordinate ring, and by $\mathbb{C}(X)$ its field of rational functions (so $\mathbb{C}(X)$ is the field of fractions of $\mathbb{C}[X]$).
If $f \in \mathbb{C}(X)$ is integral over $\mathbb{C}[X]$ (i.e., it is the root of a monic polynomial with coefficients in $\mathbb{C}[X]$), then for every $x \in X$ there exists an open neighborhood $U$ of $x$ in $X$ (in the usual Euclidean topology) and a constant $C > 0$ such that
$$|f(z)| \leq C$$
for every $z \in U \cap \text{dom }f$."
It is given as hint to use the Maximum Modulus Principle, which sounds weird to me because its conclusion is quite the opposite...
Any help will be very welcomed.
 A: Consider the affine space $\mathbb{C}^n\times \mathbb{C}^n$ and define algebraic variety 
$$Z = \{(x_1,...,x_n,a_0,...,a_{n-1})\in \mathbb{C}^n\times \mathbb{C}^n\,|\,\forall_{1\leq i\leq n}\,x_i^n+a_{n-1}x_i^{n-1}+...+a_1x_i+a_0=0\}$$
Define $\pi:Z\rightarrow \mathbb{C}^n$ as the restriction of the projection
$$\mathbb{C}^n\ni (x_1,...,x_n,a_0,...,a_{n-1})\mapsto (a_1,...,a_{n-1})\in \mathbb{C}^n$$
to $Z$. You can describe $\pi$ by the canonical $\mathbb{C}$-algebra morphism 
$$\pi^*:\mathbb{C}[a_0,...,a_{n-1}]\rightarrow \mathbb{C}[x_1,...,x_n,a_0,...,a_{n-1}][x_1,...,x_n,a_0,...,a_{n-1}]_{/(x_i^n+a_{n-1}x_i^{n-1}+...+a_1x_i+a_0\,|\,1\leq i\leq n)}$$ 
From this description it follows that $\pi$ is a finite morphism of complex algebraic varieties. In particular, this implies that $\pi$ is a projective morphism. Hence we have a closed immersion $i:Z\rightarrow \mathbb{P}^N_{\mathbb{C}}\times \mathbb{C}^n$ and $\pi$ factors as $i$ composed with the projection $\mathbb{P}^N_{\mathbb{C}}\times \mathbb{C}^n \rightarrow \mathbb{C}^n$. Now we forget everything about Zariski topology and complex algebraic varieties and we work in complex analytic setting and euclidean topology. Since $\pi$ is the composition of a closed immersion of complex analytic spaces with the projection $\mathbb{P}^N_{\mathbb{C}}\times \mathbb{C}^n$ along axis that is a compact space, we deduce that $\pi$ is proper map (in the euclidean topology). Thus if $K$ is a compact subset of $\mathbb{C}^n$, we derive that $\pi^{-1}(K)$ is compact. This means that the subset 
$$\pi^{-1}(K) = \{(x_1,...,x_n,a_0,...,a_{n-1})\in \mathbb{C}^n\times \mathbb{C}^n\,|\,\forall_{1\leq i\leq n}\,x_i^n+a_{n-1}x_i^{n-1}+...+a_1x_i+a_0=0\}\cap \{(a_0,...,a_{n-1})\in K\}$$
is compact and hence it is bounded in $\mathbb{C}^n\times \mathbb{C}^n$.
Now consider $f, X$ as in your question (but think of them in complex analytic setting). Then 
$$f^n + p_{n-1}f^{n-1}+...+p_1f+p_0=0$$
for some polynomial functions $p_{n-1},...,p_1,p_0$. For every point $x\in X$ pick an open and bounded euclidean subsets $U,V\subseteq X$ such that
$$x\in U\subseteq \textbf{cl}(U)\subseteq V$$
Since polynomial functions $p_{n-1},...,p_1,p_0$ are bounded on compact sets, we derive that 
$$(p_{0}(z),...,p_{n-1}(z))\in K$$
for every $z\in \textbf{cl}(U)$ and for some compact subset $K\subseteq \mathbb{C}^n$. Note that for each $z\in U\cap \mathrm{dom}(f)$ the value $f(z)$ is a coordinate of a point in $\pi^{-1}(K)$. Indeed, we have 
$$f(z)^n + p_{n-1}(z)f(z)^{n-1}+...+p_1(z)f(z)+p_0(z)=0$$
Since $\pi^{-1}(K)\subseteq \mathbb{C}^n\times \mathbb{C}^n$ is bounded, we derive that $f$ is bounded on $U\cap \mathrm{dom}(f)$.
