Partial fraction integration $\int \frac{dx}{(x-1)^2 (x-2)^2}$ $$\int \frac{dx}{(x-1)^2 (x-2)^2} = \int \frac{A}{x-1}+\frac{B}{(x-1)^2}+\frac{C}{x-2}+\frac{D}{(x-2)^2}\,dx$$
I use the cover up method to find that B = 1 and so is C. From here I know that the cover up method won't really work and I have to plug in values for x but that won't really work either because I have two unknowns. How do I use the coverup method?
 A: To keep in line with the processes you are learning, we have:
$$\frac{1}{(x-1)^2 (x-2)^2} = \frac{A}{x-1}+\frac{B}{(x-1)^2}+\frac{C}{x-2}+\frac{D}{(x-2)^2}$$
So we want to find $A, B, C,  D$ given $$A(x-1)(x-2)^2 + B(x-2)^2 + C(x-1)^2(x-2) + D(x-1)^2 = 1$$
As you found, when $x = 1$, we have $B = 1$, and when $x = 2$, we have $D = 1$.
Now, we need to solve for the other two unknowns by creating a system of two equations and two unknowns: $A, C$, given our known values of $B, D = 1$. Let's pick an easy values for $x$: $x = 0$, $x = 3$
$$A(x-1)(x-2)^2 + B(x-2)^2 + C(x-1)^2(x-2) + D(x-1)^2 = 1\quad (x = 0)  \implies$$ $$A(-1)((-2)^2) + B\cdot (-2)^2 + C\cdot (1)\cdot(-2) + D\cdot (-1)^2  = 1$$ $$\iff  - 4A + 4B - 2C + D = 1 $$ $$B = D = 1 \implies -4A + 4 - 2C + 1 = 1  \iff 4A + 2C = 4\tag{x = 0}$$ 
Similarly, $x = 3 \implies $
$2A + 1 + 4C + 4 = 1 \iff 2A + 4C = -4 \iff A + 2C = -2\tag{x = 3}$
Now we have a system of two equations and two unknowns and can solve for A, C.
And solving this way, gives of $A = 2, C= -2$
Now we have
$$\int\frac{dx}{(x-1)^2 (x-2)^2} = \int \frac{2}{x-1}+\frac{1}{(x-1)^2}+\frac{-2}{x-2}+\frac{1}{(x-2)^2}\,dx$$
A: We can use the following method
$$\frac1{(x-1)^2(x-2)^2}=\frac{\{(x-1)-(x-2)\}^2}{(x-1)^2(x-2)^2}=\frac1{(x-2)^2}+\frac1{(x-1)^2}-2\frac1{(x-1)(x-2)}$$
$$\frac1{(x-1)(x-2)}=\frac{(x-1)-(x-2)}{(x-1)(x-2)}=\frac1{x-2}-\frac1{x-1}$$

Alternatively, 
Put $x-2=y$ to ease of calculation
$$1=A(y+1)y^2+By^2+C(y+1)^2y+D(y+1)^2$$
$$\implies 1=D+y(C+2D)+y^2(A+B+2C+2D)+y^3(A+C)$$
As this is an identity, we can compare the coefficients of the different powers of $y$
Comparing the coefficients of $y^0,D=1$
Comparing the coefficients of $y,C+2D=0\implies C=-2D=-2$
Comparing the coefficients of $y^3,A+C=0\implies A=-C=2$
Comparing the coefficients of $y^2,A+B+2C+2D=0$
May I leave this for you to find $B?$
A: $$
\frac1{(x-1)^2(x-2)^2}=\frac{A}{x-1}+\frac{B}{(x-1)^2}+\frac{C}{x-2}+\frac{D}{(x-2)^2}\tag{1}
$$
Multiply both sides by $(x-1)^2$ and evaluate at $x=1$: $B=1$
Multiply both sides by $(x-2)^2$ and evaluate at $x=2$: $D=1$
$$
\frac{1-(x-1)^2-(x-2)^2}{(x-1)^2(x-2)^2}=\frac{A}{x-1}+\frac{C}{x-2}\tag{2}
$$
Multiply both sides by $x-1$ and use L'Hospital at $x=1$: $A=2$
Multiply both sides by $x-2$ and use L'Hospital at $x=2$: $C=-2$
$$
\frac1{(x-1)^2(x-2)^2}=\frac{2}{x-1}+\frac{1}{(x-1)^2}+\frac{-2}{x-2}+\frac{1}{(x-2)^2}\tag{3}
$$

Details of $(2)$
It is pretty simple to subtract off the parts we got from $(1)$:
$$
\frac1{(x-1)^2(x-2)^2}-\frac1{(x-1)^2}-\frac1{(x-2)^2}
=\frac{1-(x-1)^2-(x-2)^2}{(x-1)^2(x-2)^2}\tag{4}
$$
$(4)$ gives us $(2)$.
In the next part, we can use a small bit of simplification. Suppose we have $(x-a)^nP(x)$ in the denominator, and we want to look at $x\to a$. We are going to need to apply L'Hospital $n$ times. This will give $n!P(a)$ in the denominator.
Multiply $(2)$ by $(x-1)$ and let $x\to1$. The denominator is $(x-1)(x-2)^2$, so we apply L'Hospital once.
Take one derivative of the denominator and evaluate at $\color{#C00000}{x=1}$: $1!(\color{#C00000}{1}-2)^2=1$.
Take one derivative of the numerator and evaluate at $\color{#C00000}{x=1}$: $-2(\color{#C00000}{1}-1)-2(\color{#C00000}{1}-2)=2$
Thus, $A=\frac21=2$
Multiply $(2)$ by $(x-2)$ and let $x\to2$. The denominator is $(x-1)^2(x-2)$, so we apply L'Hospital once.
Take one derivative of the denominator and evaluate at $\color{#C00000}{x=2}$: $1!(\color{#C00000}{2}-1)^2=1$.
Take one derivative of the numerator and evaluate at $\color{#C00000}{x=2}$: $-2(\color{#C00000}{2}-1)-2(\color{#C00000}{2}-2)=-2$
Thus, $C=\frac{-2}1=-2$
A: I will add this answer because I think there is a method that is getting lost in mathematical culture. The method is based on Ruffini-Horner algorithm to evaluate polynomials. This is one of the most efficient methods to compute these coefficients. It also allows for a calculation of any partial fraction decomposition in which the denominator splits completely.
First I will give the explanation, which has some length, but then we can see that the actual computation is very very efficient using Ruffini.
Assume that we have $\frac{P(x)}{Q(x)}$ (reduced fraction) and $(x-a)^n$ is the highest power of $(x-a)$ that divides $Q$. We want to write $$\frac{P(x)}{Q(x)}=\frac{A_1}{(x-a)}+\frac{A_2}{(x-a)^2}+\ldots+\frac{A_n}{(x-a)^n}+h(x),$$
where $h$ doesn't have a pole at $x=a$. Let us multiply by $(x-a)^n$. We get 
$$(x-a)^n\frac{P(x)}{Q(x)}=A_1(x-a)^{n-1}+A_2(x-a)^{n-2}+\ldots+A_n+(x-a)^nh(x),$$
So, computing the coefficients $A_1,\ldots, A_n$ is the same as computing the first few terms of the Taylor expansion of the Rational function $\frac{(x-a)^nP(x)}{Q(x)}$ at the point $x=a$.
..........................
Computing the first few terms the Taylor of a rational function:
If we have a rational function $\frac{P(x)}{Q(x)}$ and the numerator and denominator are written in decreasing powers of $(x-a)$ then we get the first few terms of the Taylor expansion of $P(x)/Q(x)$ (very efficiently) by doing long division.
Therefore we only need to see how to (efficiently) write polynomials in powers of $(x-a)$.
..........................
(re)Writing polynomials in powers of $(x-a)$:
Given a polynomial $P(x):=a_nx^n+\ldots+a_0$, say written in powers of $x$. We would like to compute 
$$P(x)=A_0+A_1(x-a)+\ldots+A_n(x-a)^n.$$
Notice that $A_0$ is the result of computing $P(a)$. For this computation, one of the most efficient ways is to use Ruffini-Horner algorithm. The cool thing is that Ruffini doesn't only give you $P(a)$, but the partial computations you do give you the result of $(P(x)-A_0)/(x-a)$. It is clear that $$(P(x)-A_0)/(x-a)=A_1+A_2(x-a)+\ldots+A_n(x-a)^{n-1}.$$
Therefore, what we need to do is to apply again Ruffini to this new polynomial, who's coefficients we already have from the previous Ruffini. Repeating $n$ times you get all the $A_i$'s. 
..............................
Summarizing:
One of the most efficient ways to compute the partial fraction decomposition is to first do Ruffini enough times (degree of the polynomial) with the numerator and the denominator of the given fraction. This will give you the coefficients for writing the numerator and denominator as powers of $(x-a)$. Then do $n$ steps, where $n$ is the order of the pole $x=a$, of the long division with these two polynomials to get the coefficients you are looking for. DONE!
..............................
PS: We teach in courses what is more easy for the teachers to teach. This is not always what is more easy for the students to learn, or what is more easy for the students to use.
Ruffini-Horner is a simple and powerful algorithm with many applications. These applications are not finding its way into the classroom and it is our fault.
..............................
Example:
You example. I will compute the coefficients corresponding to the pole $x=1$, i.e. the $A$ and $B$ in your question.
First we need to write the numerator $1$ and the denominator after division by $(x-1)^2$, i.e. $(x-2)^2$ in powers of $(x-1)$. The numerator is already written in powers of $(x-1)$. We write now $(x-2)^2=(x-1-1)^2=1-2(x-1)+(x-1)^2$. This part is, in general, faster by Ruffini, but here we take advantage of it being written in that particular way.
Now we do long division of $1$ divided by $1-2x+x^2$, just two steps. That will give you the numbers we want. Recall long division. We first divide $1$ by $1$ that give us $1$, which is the first coefficient $B=1$. Yes, we get first the coefficients for the higher powers in the denominators. Then we subtract $1$ minus $1$ multiplied by $1-2x+x^2$ to get $2x-x^2$. Divide $2x$ by $1$ to get $2x$. The $2$ is the next coefficient we were looking for, i.e. $A=2$.
In the same way you get those for the pole $x=2$.
