Consider the following small example of partial fraction decomposition:
$ \frac{x+1}{(x-1)^2}=\frac{A_{11}}{(x-1)}+\frac{A_{12}}{(x-1)^2}= \frac{A_{11}(x-1)+A_{12}}{(x-1)^2}$
Everything fine so far. Now, I see very often examples where -- instead of a comparison of coefficients -- one of the roots of the denominator is inserted into the equation (here $x=1$)
$x+1 = A_{11}(x-1)+A_{12}.$
which simplifies it to
$2=A_{12}$
This works, as long as we don't have a too high degeneracy (if the degeneracy is too high, inserting the roots results in too few equations to solve for all $A_{ij}$). But I have the concern that strictly speaking the roots are not in the domain of the rational function. Thus, I am not allowed to insert $x=1$ in the equation for the coefficients as done above. Is there a case which leads to a wrong result?
That sort of manipulation is perfectly valid on the level of formal polynomials and rational functions. In practice you typically do partial fractions on concrete rational functions. In that case there are two fixes. First, if you're working over the real numbers (say), you can imagine that plugging in $1$ is really done by taking the limit as $x \to 1$ on both sides. Second, you could instead use the fact that over an infinite field, formal polynomials and polynomials as functions are the same thing, so you can just use the formal polynomial case.