Q:

some question on polynomial function

Let $f,g$ be polynomials. There are two questions :
(1) If $f(n)\geq 0$ for all $n\gg 0$ and $n$ integer, then the leading coefficient of $f$ is a positive.
(2) If $f(n)=g(n)$ for all $n\gg 0$ and $n$ integer, then $f=g$.
I know that it is true. but I can't prove in detail.

A:

I'll replace $n$ with $x$ since proving the statements for $\mathbb{R}$ implies they are true for $\mathbb{N}$:
(1) If $f(x)\geq 0$ for all $x$ then the degree of $f$ must be even (including degree 0). 
Assume the leading coeff. is negative: 
$\bullet$ If the degree of $f$ is greater than 1, $\displaystyle\lim_{\infty}f=-\infty$ therefore there exists $x_0$ such that for all $x>x_0$ we have $f(x)<0$. Contradiction. Therefore the leading coefficient must be positive
$\bullet$ If $f$ is constant the leading coefficient must be either positive or 0 to satisfy $f(x)\geq 0$. 
(2) First note that if $u(x)=v(x)$ for $x\geq 0$ and $u,v$ are even, then $u(-x)=v(-x)$. Similarly if $u(x)=v(x)$ for $x\geq 0$ and $u,v$ are odd, then $-u(-x)=-v(-x)\Leftrightarrow u(-x)=v(-x)$
Therefore if two polynomials are either even or odd and equal for $x\geq 0$ they are equal for all $x\in\mathbb{R}$
Now let:
$\bullet$ $f(x)=p_n(x)+p_{n-1}(x)\cdots p_1(x)+p_0(x)$ where $p_i(x)=a_ix^i$
$\bullet$ $g(x)=q_n(x)+q_{n-1}(x)\cdots q_1(x)+q_0(x)$ where $q_i(x)=b_ix^i$
For each $i,\;\;p_i$ and $q_i$ are either both even or both odd. Since $p_i(x)=q_i(x)$ for all $x\geq 0$, necessarily $p_i=q_i$ for all $x\in\mathbb{R}$. Therefore $f=g$

