Simplify $$\frac{b^2+c^2-a^2}{(a-b)(a-c)}+\frac{c^2+a^2-b^2}{(b-c)(b-a)}+\frac{a^2+b^2-c^2}{(c-a)(c-b)}\,.$$
I tried very hard but I am not being able to solve it easily I opened up everything and multiplied all of it and got the answer -2. But it took me 1 hour and I also made many silly mistakes. Is there a quicker way than brute force?
Let $$ f(a,b,c)=\frac{b^2+c^2-a^2}{(a-b)(a-c)}+\frac{c^2+a^2-b^2}{(b-c)(b-a)}+\frac{a^2+b^2-c^2}{(c-a)(c-b)} $$Observe $f$ is invariant under permutations: $f(a,b,c)=f(b,c,a)=f(c,a,b)$, etc. Further, observe $f(0,1,2)=f(1,0,-1)=-2$. In other words, $f$ evaluates to $-2$ at $12$ points, and $12$ is greater than the sum of the degrees of the numerator and denominator. Thus $f$ is identically constant (provided no two of $a,b,c$ are equal).