Comparing coefficients of polynomials If we have two polynomials, say for example, $a_0+a_1x+a_2x^2 = 1+2x+3x^2$ for all $x$, why must it follow that $a_0 = 1,a_2 = 2,$ and $a_3 = 3$? Can we generalize this for any polynomials and infinite sum polynomials as well?
 A: One way to think about it is that a polynomial is characterized by the name of the variable, the degree, and the list of coefficients.  In other words, if I said, "I'm thinking of a polynomial in the variable $x$, of degree $2$, with constant term $1$, linear coefficient $2$, and quadratic coefficient $3$", you could guess which polynomial I was thinking about in one try.  I gave you all the information necessary to write down $1 + 2x + 3x^2$.  
To make it slightly more sophisticated, two polynomials are equal if and only if they have the same variable, degree, and coefficients.  So if
$$
a_0 + a_1 x + a_2 x^2 + a_3 x^3 + \dots + a_n x^n = 1 + 2x + 3x^2
$$
then $a_0 = 1$, $a_1 = 2$, $a_3 = 3$, and $a_4 = a_5 = \dots = a_n = 0$.
Yes, it does generalize.  For any ring $R$, the ring $R[x]$ stands for polynomials in $x$ with coefficients from $R$.  By definition, the powers of $x$—$1$, $x$, $x^2$, $x^3$, etc.—are independent over $R$, so two polynomials are equal iff their coefficients are equal.  The ring $R[[x]]$ consists of infinite series in $x$, and has the same property.  
A: Yes.
Evaluate $a_0+a_1x+a_2x^2 = 1+2x+3x^2$ at $x=0$ and conclude that $a_0=1$.
Subtract $a_0$ from both sides, divide by $x$ and evaluate at $x=0$ to conclude that $a_1=2$.
Repeat.
This procedure works in general, for both polynomials and formal power series.
A: If equal, subtract them from each other and you know the answer is zero, perfect! So that means
$0 = (a_0 - 1) + (a_1 - 2)x + (a_2 - 3) x^2$, but you already picked up on that. But, and here's where it all happens, there's a LOT of flexibility with what $x$ is. What is it telling you when $x = 0$, for example? And if that's the case, about $a_1$? I think you see the pattern.
A: This follows from the fact that if a polynomial is identically vanishing, then it mist be the null polynomial, all of whose coefficients vanish.
Now transpose all terms to one side to have a polynomial which vanishes identically. Setting the coefficients of this polynomial each to $0$ gives you your result.
