On Wikipedia it says ``Formally, an analytic function $f(z)$ of one real or complex variable $z$ is transcendental if it is algebraically independent of that variable. This can be extended to functions of several variables.''
I have a real analytic function $f$ which is defined only on some closed and bounded interval $I$. Suppose there exists a polynomial $g(x, y)$ such that $$ g(x, f(x)) = 0 $$ on $I$. Does it then mean that $f$ is algebraic? I was not sure because this holds only on $I$... Any comments would be appreciated. Thank you.