Usually, we define a polynomial as
$a_n x^n + \cdots + a_1 x + a_0$
where $x$ is called indeterminate.
Would it be better to define it as
$a_n x^n + \cdots + a_1 x + a_0 x^0$
where $x^0$ means the identity element in the structure which $x$ belongs to.
For the study of the polynomial itself, I think these two definition make no difference. But when you treat a polynomial (expression) as a polynomial function, and if we use the second definition, we can just substitute all the $x$ with some variable (eg. some square matrix), rather than define it in a "adhoc" way, i.e. if we are using the first definition, we have to explicitly define the function to add an identity element to the constant term $a_0$ to make $a_1 x$ and $a_0$ addable.
Is the second definition equivalents to the first one?
If yes, then is it true that the authors of those texts actually means def 2 when the define the polynomial using def 1, they just omit the identity element?
If not, why? Would it be nicer to eliminate the non-addable $a_1x + a_0$ with $a_1x + a_0 x^0$, (even though we really don't need to add these two terms together when we are studying the knowledge of polynomial itself)?
It really doesn't matter which way you define polynomial. Another way is to consider all sequences:
$$(a_0,a_1,\dots,a_n,\dots)$$ where only finitely many $a_i$ are non-zero.
Then we add series point-wise, and we find their products by the Cauchy product.
Then $(1,0,0,0,\dots)$ is the multiplicative identity, and $(0,1,0,0,\dots)$ is $x$. So $1$ isn't really $x^0$, and $x^2$ just means $x\cdot x$.