is there a nonpolynomial function $g$ so that $g(p,y)\in \mathbb{Q}[y], g(x,q) \in \mathbb{Q}[x]\forall p,q\in \mathbb{Q}$

35 Views Asked by At

Is there a nonpolynomial function $g : \mathbb{Q}^2\to \mathbb{Q}$ so that $g(p,y)\in \mathbb{Q}[y], g(x,q) \in \mathbb{Q}[x]\forall p,q\in \mathbb{Q}$? To clarify, for a ring $R$ (e.g. $\mathbb{Q}$ with the usual addition and multiplication operations), $R[x]$ denotes the set of polynomials with coefficients in $R$.

I think such a function does exist. One approach could involve writing $g$ as an infinite sum. For a simple case, suppose $g(x,y) = xy$. It clearly satisfies the requirement that $g(p,y)\in \mathbb{Q}[y], g(x,q) \in \mathbb{Q}[x]\forall p,q\in \mathbb{Q}$ but it's obviously a two-variable polynomial. If $g(x,y) = \sin(x) + y,$ it is no longer a polynomial (I'm not sure about the formal proof since we're working with multivariable polynomials but this is fairly obvious from an informal point of view) but it doesn't satisfy the second requirement; it seems hard to satisfy both requirements.