Let $k$ be an algebraic closed field, $\mathbb{A}^n$ be an affine variety over $k$, $U$ be open set in $\mathbb{A}^n$ and $f,g\in k(x_1,...,x_n)$ and their denominators is not zero over $U$.If $f(x)=g(x)$ for all $x\in U$, is it true that $f=g$ as rational functions?
Thanks in advance!
Yes. By cross multiplying you can reduce this to a question about regular functions. If two regular functions agree on an open subset of a variety (this is because varieties are separated, and any non-empty open set is dense), then they agree everywhere. Use the fact then that $I(\mathbb{A}^n)=0$.