Proof: Two polynomials $P(x)$ and $Q(x)$ attain same value for every $x \in \mathbb R$ if and only if coefficients $p_i = q_i$ are equal for every $i$ Proof: Two polynomials $P(x)$ and $Q(x)$ attain same value for every $x \in \mathbb R$ if and only if coefficients $p_i = q_i$ are equal for every $i$
I've been thinking how to prove this. I know we can write both polynomials as a product of irreducible polynomials corresponding to roots, however this only prove that the values attained by the polynomials are equal for every $x \in \mathbb R$ not that the coefficients are equal.
Also we could let $x = 0$ to conclude $p_0 = q_0$. However we may not cancel $x$ by division on both sides ? Then we cannot continue the procedure, since division by zero is undefined.
Could someone give me a hint ?
 A: Besides the standard proof considering the roots of $P-Q$ (which works for polynomials over any infinite integral domain) there is another approach that works for polynomials over the real (or complex) numbers specifically. If the polynomial functions associated to $P$ and $Q$ are equal, then so must their derivative functions, to any order, be. Now the $n$-th derivative of $P$ evaluated at $x=0$ gives you $n!$ times the coefficient of $x^n$ in$~P$. From this you can conclude that all coefficients of $P$ and $Q$ coincide. 
A: Let $S(x) = \sum_{i=0}^ns_ix^i$ be a degree-$n$ polynomial for some $n \ge 0$ (so that $s_n \ne 0$). As $|x|$ grows without limit, the highest-order term $s_nx^n$ comes to dominate all the other terms, in the sense that it is bigger in absolute value than all the other terms added together. Specifically, this happens when
$$|x| > \frac1{|s_n|}\sum_{i=0}^{n-1}|s_i|$$
(as long as $|x| > 1$). So if the above inequality holds, then $|S(x)|$ must be strictly greater than zero. This means that $S$ can't be zero on the whole of $\mathbb R$.
Now just put $S(x) = P(x) - Q(x)$. Your hypothesis implies that $S$ is zero on the whole of $\mathbb R$, so it can't be a degree-$n$ polynomial for any $n \ge 0$. Hence all its coefficients $s_i = p_i - q_i$ must be zero.
A: Do you know that over any field a polynomial of degree $\;n\;$ has at most $\;n\;$ different roots? Well then, look at the real polynomial $\;h(x):=P(x)-Q(x)\;$ ...
A: Consider $P(x) - Q(x)$ as a polynomial. How many roots does it have? What can you say about a polynomial that has that many roots? 
