cancelling out before evaluation of variable

Solution 1:

Yes, if we know that the answer has polynomial form then we can perform such cancellations. As a simple example, if we wish to solve $\, x f(x) = x^2\,$ and we know the solution $\,f\,$ is a polynomial in $\,x\,$ then the solution is $\,f(x) = x.\,$ This can lead to very efficient solutions in less trivial contexts. For example, see this slick proof of Sylvester's determinant identity $\rm\, det (I+AB)=det(I+BA)\, $ that proceeds by universally cancelling $\rm\ det\, A\ $ from the $\rm\, det\, $ of $\rm \ (1+A\ B)\, A\, =\, A\, (1+B\ A),\,$ thus trivially eliminating the "apparent singularity" at $\rm\ det\, A\, =\, 0.\,$ Further discussion is here.

As another example, we can algebraically define derivatives of polynomials by a formula involving universal cancellation. By the Factor Theorem we know that $\,x-y\mid f(x)-f(y)\,$ in $\,R[x,y]\,$ for any ring $\,R.\,$ Let the quotient be the polynomial $\,g(x,y)\in R[x,y].\,$ Then we easily show using linearity that the derivative of $\,f(x)\,$ w.r.t. $\,x\,$ is $\,f'(x) = g(x,x),\,$ i.e.

$$\begin{eqnarray}{}& g(x,y)\ &=&\ \frac{f(x)-f(y)}{x-y}\ \in\ R[x,y]\\ \Rightarrow\ & g(x,x)\ &=&\ f'(x)\ \in\ R[x] \end{eqnarray}$$

For example, $\,f(x) = x^n$ $\,\Rightarrow$ $\,g(x,y) = \dfrac{(x^n\!-y^n)}{(x\!-\!y)} = x^{n-1}\! + x^{n-2}y+\cdots+xy^{n-2}\!+y^{n-1}$

therefore $\,\ g(x,x) = x^{n-1} + \cdots + x^{n-1} = n x^{n-1} = f'(x).$