TITLE: What is the Mathematical Property that justifies equating coefficients while solving partial fractions?
QUESTION [9 upvotes]: The McGraw Hill PreCaculus Textbook gives several good examples of solving partial fractions, and they justify all but one step with established mathematical properties.
In the 4th step of Example 1, when going from:
$$1x + 13 = (A+B)x+(4A-5B)$$
they say to "equate the coefficients", writing the linear system
$$A+B = 1$$
$$4A-5B=13$$
It is a simple step, color coded in the textbook for easy understanding, but McGraw Hill does not justify it with any mathematical property, postulate or theorem.  Addition and/or multiplication properties of equality don't seem to apply directly.
Can someone help me justify this step?!

REPLY [2 votes]: The general principle is: two polynomials are equal at every point if and only if their coefficients are equal. "If their coefficients are equal then the polynomials are equal" is clear. 
Proving the reverse is not so easy in general. It follows from a stronger result from linear algebra, which says that the Vandermonde matrix for $d+1$ distinct real numbers is invertible, and so there is a unique polynomial of degree at most $d$ passing through any $d+1$ points, provided they all have different $x$ coordinates. This is probably not accessible to you at your level, but it is probably the best way to see it overall.
Another way to see it, though making this rigorous requires some calculus, is to note that if two polynomials are equal at each point, then their constant terms must be the same. Subtracting off the constant term from each and dividing by $x$, you have two polynomials that now again have to be equal at each point. So you plug in $x=0$, which gives agreement of the linear coefficients of the original polynomials. Doing this a total of $d+1$ times gives the desired result. 
Where the lack of rigor comes in is in saying that $x/x=1$ even when $x=0$, which is not properly true. What we are really doing here is noticing that if two differentiable functions are equal everywhere then their derivatives are equal everywhere, and that if $p(x)=\sum_{k=0}^n a_k x^k$ then $a_k=\frac{p^{(k)}(0)}{k!}$, where $p^{(k)}$ denotes the $k$th derivative of $p$.