<s>[INST] Comparing Coefficients for Partial Fractions See this simple example :
$$\frac{x+1}{(x-1)(x-2)}\equiv \frac{A}{(x-1)}+\frac{B}{(x-2)}$$
Then we can get 
$x+1 \equiv A(x-2)+B(x-1)$ for $x \neq 1 ,2$ 
My Question :
Is it correct to put $x=1$ to find $A$ ,
Is it correct to put $x=2$ to find $B$, other than comparing coefficients ?
Both methods give the same answer. But we get $x+1 \equiv A(x-2)+B(x-1)$ for $x \neq 1 ,2$ . So is it okay if I use $x=1$ to find $A$ ? 
 [/INST] Yes, it is perfectly valid to do that.  Notice that while the fractions are not defined at x= 1 or x= 2, once you have multiplied by (x- 1)(x- 2) those fractions are no longer a problem.  If you set x= 1, 1+ 1= 2= A(1- 2)+ B(0) or 2= -A so A= -2.  If you set x= 2, you get 2+ 1= 3= A(0)+ B(2- 1) or 3= B.
Another thing you can do is actually get "common denominators" on the right and add the fractions: $\frac{A}{x- 1}+ \frac{B}{x- 2}= \frac{A(x- 2)}{(x- 1)(x- 2)}+ \frac{B(x-1)}{(x- 1)(x- 2)}= \frac{(A+ B)x+ (-2A- B)}{(x- 1)(x- 2)}= \frac{x+ 1}{(x-1)(x- 2)}$.   Since those fractions have the same denominator, they must have the same numerator: (A+ B)x+ (-2A- B)= x+ 1 for all x.  Since they are equal for all x, the corresponding coefficients must be equal.  That means we must have A+ B= 1 and -2A- B= 1.  Adding the two equations, -A= 2 so A= -2 as before.  And then, -2+ B= 1 so B= 3 as before.
</s>