Prove that $\frac{1}{a(a-b)(a-c)} +\frac{1}{b(b-c)(b-a)} +\frac{1}{c(c-a)(c-b)} =\frac{1}{abc}$ for all sets of distinct nonzero numbers $a,b,c$. 
Prove that $$\cfrac{1}{a(a-b)(a-c)} +\cfrac{1}{b(b-c)(b-a)}
 +\cfrac{1}{c(c-a)(c-b)} =\cfrac{1}{abc}$$ for all sets of distinct nonzero numbers  $a,b,c  $.

Now my question is not about how to solve this but rather why the technique which shows my book works.
Technique:

Rather than showing that the left side equals $\cfrac{1}{abc}$,we show
   that  $$\cfrac{1}{a(a-b)(a-c)} +\cfrac{1}{b(b-c)(b-a)}
 +\cfrac{1}{c(c-a)(c-b)} -\cfrac{1}{abc}=0 $$
Writing the left side with the common denominator
   $abc(a-b)(a-c)(b-c)$,we have
   $$\cfrac{bc(b-c)-ac(a-c)+ab(a-b)-(a-b)(a-c)(b-c)}{abc(a-b)(a-c)(b-c)}=0$$
We can show that this is $0$ by showing that the numerator is $0$.We
  can do this by looking at the numerator as a polynomial in $c$,meaning
  let $a$ and $b$ be constants and $c$ be a variable,or
  $$f(c)=bc(b-c)-ac(a-c)+ab(a-b)-(a-b)(a-c)(b-c)$$
Since $f(c)$ is a quadratic equation ,if we can show that this
  quadratic has $3$ different roots,then $f(c)=0$ for all $c$.

The proof ends up with showing that $f(a)=0$,$f(b)=0$ and $f(0)=0$.
Now,while I can understand why a quadratic with $3$ roots is the zero polynomial I can't understand why we can treat the numerator as a polynomial and so treat $a,b$ as constants while $c$ as a variable.
Furthermore when we let it be a polynomial we also let $c=a=b$ but the problem in the beginning states that ${a,b,c}$ is all sets of distinct nonzero numbers,so I thought that we can't let $c=a=b$ by definition.
So can someone explain in depth why this is legit to do ?
 A: For a proof that might satisfy a thirst for more symmetry, but which uses a very similar technique, consider the equivalent identity $$\cfrac{bc}{(a-b)(a-c)} +\cfrac{ac}{(b-c)(b-a)} +\cfrac{ab}{(c-a)(c-b)} =1.$$ Let $f(x)$ be the polynomial function defined by $$f(x) = \cfrac{(x-b)(x-c)}{(a-b)(a-c)} +\cfrac{(x-c)(x-a)}{(b-c)(b-a)} +\cfrac{(x-a)(x-b)}{(c-a)(c-b)}.$$ Observe that $f$ is a quadratic polynomial with $f(a)=f(b)=f(c)=1$. It follows that $f(x)-1$ is a quadratic with three roots, so $f(x)-1=0$ identically. Now compare constant terms of the identity $f(x)=1$.
A: First, I'll mention an elementary way to finish the proof.  Observe that this could be done by expanding the following product:
$$
f(c)=bc(b−c)−ac(a−c)+ab(a−b)−(a−b)(a−c)(b−c).
$$
At the end, you should get everything to cancel.  
Instead, the proof uses a tricky method.  By inspection, we can see that 
$$
bc(b−c)−ac(a−c)+ab(a−b)−(a−b)(a−c)(b−c)
$$
can be written as 
$$
\text{Something}\cdot c^2+\text{Something}\cdot c+\text{Something}
$$
where these "Somethings" are written in terms of $a$ and $b$.  The goal of the proof is to show that these "Somethings" are always zero (independent of the choice of $a$ or $b$).
Now, all of $a$, $b$, and $c$ are variables, but we can choose to pick (arbitrary) values for $a$ and $b$ and not change them.  Then, the quadratic above becomes an actual quadratic (all the coefficients are numbers after substituting in for $a$ and $b$).  At that point, we are free to choose $c$ as we wish.  By finding three distinct values where $c$ vanishes, the quadratic then has zero coefficients, and this holds for any choice of $a$ and $b$.
It is somewhat more tricky to explain why we can drop the distinct assumption without some experience with polynomials.  When a polynomial is equal to $0$ at all but a small number of points (I can make this more precise, but it seems beyond the tags for the OP).  Then, when a polynomial (the numerator) is equal to $0$ at all but the points where $a=b$, $a=c$, or $b=c$.  We can extend it to all possible values of $a$, $b$, and $c$.  Basically, a polynomial in one variable either has finitely many roots or it's zero (there are no other options).  So, if a polynomial is $0$ at all but the points where $a=b$, $a=c$, or $b=c$, it already has too many roots to be nonzero.
The only reason that the original problem required $a$, $b$, and $c$ to be distinct was so that the fractions didn't have $0$ in the denominator.  If you use limits from calculus, you may be able to get the original equality to "hold" even when $a$, $b$, or $c$ are equal.
