Why are the coefficients always equal?

Suppose that $ax^{2} + bx + c = 3x^{2} + 4x + 53$ for all $x$, or $ax^{2} + bx + c - (3x^{2} + 4x + 53) = 0$ for all $x$.

$ax^{2} + bx + c - (3x^{2} + 4x + 53) = 0$ is a polynomial with at most degree $2$ so by the fundamental theorem of algebra it has at most $2$ roots if it is not the zero polynomial.

But $ax^{2} + bx + c - (3x^{2} + 4x + 53) = 0$ has infintely many roots (it is zero for every value of $x$), so it must be the zero polynomial. Then we have $a=3$, $b=4$ and $c=53$.

$$ax^{2} + bx + c - (3x^{2} + 4x + 53) = (a-3)x^2+(b-4)x+(c-53)$$

Every coefficient must be equal to zero for it to be the zero polynomial, thus $a-3=0$, and $a=3$. Similiarly, one has $b=4$ and $c=53$.


The equation is valid for all $x$ take $x=0$ to get $c=53$. The equation now rewrites as follows $ax^2+bx=3x^2+4x$ and again this is true for all $x$ especially for say $x=-{4\over 3}$ and the equation now looks like ${16a\over 9}-{4b\over 3}=0$ and for $x=1$ we get $a+b=7$ the solution of the system in $(a,b)$ is $(3,4)$

In general if two polynomial are such as $a_nx^n+\cdots+a_0=b_nx^n+\cdots+b_0$ for all x this means $(a_n-b_n)x^n+\cdots+(a_0-b_0)$ has an infinity of solutions while it has degree $n$ and therefore all its coefficients are $0$ which translates into $a_i=b_i\,\forall i$


Here's a cute way of proving it I don't think has been mentioned yet.

If you agree two polynomials are equal, you should also agree that their derivatives are equal.

Let $f(x) = ax^2 + bx + c = 3x^2+4x+53$.

Taking the derivative of $f$, we get:

$f'(x) = 2ax + b = 6x + 4$.

Taking the second derivative, we get:

$f''(x) = 2a = 6$.

Working backwards, we can solve for each variable in turn. The last equation gives $a = 3$. Going to the one before it, we can replace $2ax$ with $6x$ and subtract $6x$ from both sides to get $b=4$. And finally, we go back to the original to subtract $3x^2 + 4x$ from both sides to get $c=53$.

It's not the most efficient way, but it doesn't require any evaluation of the polynomial or talk of its roots.