We want to integrate
$$\int \frac{1}{x^2-4} dx$$
I have tried the following:
$$\frac{1}{(x-2)(x+2)} = \frac{c_1}{x-2} + \frac{c_2}{x+2}$$
I wanted to find out the value of $c_1$ by multiplying with $(x-2)$:
$$\frac{(x-2)}{(x+2)} = c_1 + \frac{c_2 \cdot (x-2)}{x+2}$$
If I understood it correctly, we want $(x-2) = 0$ to cancel $c_2$ out.
$x \to 2$ leads to
$$\frac{2-2}{2+2} = c_1+ \frac{c_2 \cdot(2-2)}{2+2} \\ 0 = c_1$$
But an online integration calculator says $c_1 = \frac{1}{4}$ and $c_2 = - \frac{1}{4}$
Where did I go wrong?
$$$$
You went wrong when you wrote $\frac{(x-2)}{(x+2)}$ , the $(x-2)$ already cancels with the previous $(x-2)$
It should be instead $\frac{1}{(x+2)} = c_1+ \ldots$