Remark. I'd like to avoid the "ring of formal expressions" viewpoint for this question. I know we can avoid these kinds of questions by working "purely algebraically" and in particular by taking the algebraic closure of $K(x).$ But I don't want to do this here.

If I understand the wikipedia article correctly, a function $f$ is algebraic iff there's a polynomial $P(x,y)$ such that the equation $P(x,f(x)) = 0$ is true for all $x$ in the domain of $f$. For example, the function $$[0,\infty) \rightarrow \mathbb{R}, x\mapsto \sqrt{x}$$ is algebraic because $y^2-x$ has this property.

However that article is pretty vague and I'm not sure I quite understand what's being said. In particular, which of the following functions would be considered algebraic?

  1. $(0,\infty) \rightarrow \mathbb{R}, x\mapsto \sqrt{x}$
  2. $(0,1) \cup (2,3) \rightarrow \mathbb{R}, x\mapsto \sqrt{x}$
  3. $(0,1) \cup (2,3) \rightarrow \mathbb{R}, x \mapsto \begin{cases}\sqrt{x} & x \in (0,1), \\ -\sqrt{x} & x \in (2,3)\end{cases}$
  4. $(0,e) \rightarrow \mathbb{R}, x\mapsto \sqrt{x}$
  5. $[0,\infty) \rightarrow \mathbb{R}, x \mapsto \begin{cases}\sqrt{x} & x \in \mathbb{Q}, \\ -\sqrt{x} & x \notin \mathbb{Q}\end{cases}$

These pertain to different issues, namely:

  1. Does a function have to be defined on the largest possible domain to be considered algebraic?
  2. Does it have to be defined on a connected set?
  3. If defined on a disconnected set, do we require that it be extensible to an algebraic function defined on a connected set?
  4. Can non-algebraic real numbers be used to define the domain of an "algebraic" function?
  5. Do they have to be continuous?

Question: What are the standards here?


I think that wikipedia page is written for (and by) non-experts. In fact, that definition is one that you may find frequently. (In elementary math textbooks; and on-line. But not in technical math papers.) The predicament is similar to the definition of "continuous" in elementary calculus courses.

Students learning mathematics, not yet sophisticated enough to grasp the definitions used in more advanced studies, have to be given a simple definition to use.

When mathematicians use the term "algebraic function" they may in fact have in mind a specific situation. And the definition may vary depending according to the situation.

One example may look like this...

Let $f$ be a holomorphic function defined on a connected open set $U$ in the complex plane. We say that $f$ is an algebraic function iff there exists a polynomial $P(x,y)$ of two variables with complex coefficients such that $P(z,f(z))=0$ for all $z \in U$.

There may be other definitions used in other settings.

the examples in the OP
If you take the simplistic definition of the Wikipedia page, then all 5 of your examples are algebraic functions. Some of them (especially 5) show that the Wikipedia definition is not very useful. And any instructor in such an elementary course who asks questions such as your 1 to 5 has missed the point: this is a "general idea" definition and not a technical definition.

another situation
Suppose we have the claim

The function $\mathbb R \to \mathbb R$ defined by $x \mapsto \sin x$ is not an algebraic function

A proof may go like this...

A nonzero algebraic function on $\mathbb R$ can have only finitely many zeros. But $\sin(\pi n) = 0$ for all $n \in \mathbb Z$, so this function has infinitely many zeros. Therefore it is not algebraic.

This is a good proof. But not with the simplistic definiton of "algebraic function". For example, the function $$ \phi(x) = \begin{cases}1, \quad x \text{ rational} \\ 0, \quad x \text{ irrational} \end{cases} $$ has infinitely many zeros, and satisfies $\phi(x)^2 - \phi(x) = 0$ for all $x$.