Is g( ) rational if it looks that way on a large rational subset?

Let $F$ be any infinite field, $U\subset F^n$ be an open, dense (in Zariski topology) subset, $x_1,x_2,…,x_n$ be an algebraic independent system of variables over $F$ , $f,f_1,f_2,…,f_n \in F(x_1,x_2,…,x_n)$ be rational functions and $g:F^n\rightarrow F$ be a function(note that the rationality of the $g$ is not given). If $f(u)=g(f_1(u), f_2(u),…, f_n(u))$ for any $u\in U$ can one say that $f(x)\in F(f_1(x), f_2(x),…,f_n(x))$? In other words does it imply the "rationality" of $g$?

• The M.A., good job!--you turned a nothing q. title into something sensible. May 22, 2015 at 3:53
• Do you mean $g \in F(f_1(x), ... f_n(x))$? Otherwise I don't understand `implies the rationality of $g$'. May 22, 2015 at 8:43
• @DavidHolmes The question makes sense. Maybe it's clearer to ask whether, given the conditions, there is a rational function $g_1$ satisfying the same hypotheses as $g$. May 22, 2015 at 19:19
• Felipe, your example shows that I can't expect too much from $f(x)$. It seems that I have to reformulate the question in the following form: Under the same conditions can one say that $f(x)$ is algebraic over $F(f_1(x),f_2(x),...,f_n(x))$? May 25, 2015 at 7:00

No. Take $F$ to be the algebraic closure of a finite field of characteristic $p>0$. Now, let $n=1, U = F, f_1(x)=x^p, f(x)=x$. Then we can take $g(x) = x^{1/p}$, which is a well-defined function in the set-theoretic sense, but is not rational. Or, if you prefer, $x \notin F(x^p)$.
• Your example shows that I can't expect too much from $f(x)$. It seems that I have to reformulate the question in the form: May 25, 2015 at 6:45