TITLE: Domain of a Polynomial function
QUESTION [10 upvotes]: A polynomial function is given as, 
$P(x)= a_nx^n+a_{n-1}x^{n-1}+.....+a_1x+a_0$
Notice the last but one term $a_1x$. This term is a simplified form of $a_{n-(n-1)}x^{n-(n-1)}$. 
Now let us take the last term of the Polynomial. The term $a_0$ is a simplified form of $a_{n-n}x^{n-n}$. Notice that $x^{n-n} = x^0 = 1$ only when $x\neq0$. This is because $0^0$ is indeterminate. It is evident that $x=0$ is clearly not in the domain of $P(x)$. But by definition, the polynomial function given above is defined for all values of $x$, $x\in(-\infty,\infty)$. 
Was I right to frame the last term of the polynomial the way I did above? If no, I would like to know why.

REPLY [3 votes]: This is one area where a little computer science can be helpful.  Asked to test the value of $0^0$ by implementing the function $x^y$, one person writes this program
def powernat(real x, nat y) 
 if y = 0 : 
   return 1
 else: 
   return x * powernat(x,y-1)

and another person writes this program
def powerreal(real x, real y) 
 return exp(y * log(x))

Here "nat" is a data type for natural numbers and "real" is a data type for real numbers. 
We can see immediately that something different will happen with $0^0$. The powernat function will return 1, but the powerreal function will cause an error, because $\log(0)$ is not defined. 
The situation in mathematics is not so different - we often define exponentiation for natural numbers as in powernat, and exponentiation for real numbers as in powerreal. But we have no notation to distinguish powernat from powerreal: we write both of them as $x^y$ and rely on context only to tell them apart. 
This causes trouble when we write expressions such as $0^0$. If we mean for this to be treated as the powernat function - which is the case in the definition of a power series - then we read $0^0 = 1$. But if we want this to be treated as the powerreal function - which is also used, essentially, to treat complex exponentiation - then $0^0$ is undefined (as is $0^1$, actually...).  
For the more basic arithmetical operations, this does not cause any issues. For example $1 + 1 = 2$ is true regardless of whether we think of the numbers $1$ and $2$ as natural numbers or as Dedekind cuts representing real numbers. In each of these cases the "+" means something different, but it causes no confusion.  In the case of $x^y$, though, it does matter which definition we use.