I'm trying to use fractions decomposition to integrate
$$ \frac{1}{x^n + 1} $$
As roots of the denominator are nth roots of $-1$, the denominator can be written as
$$ \prod_{j = 1}^{n} \left( x - e^{\frac{(2j - 1)i \pi}{n}} \right) $$
And the fractions decomposition can be written as
$$ \sum_{j = 1}^{n} \frac{A_j}{x - r_j}, \text{where $r_j$ is jth root of denominator ($e^{\frac{(2j - 1)i \pi}{n}}$)} $$
Having said that, I need to find $A_j$. To do so, let's look at the numerator of a resulting fraction, it has the form
$$ \sum_{k = 1}^{n} A_k \prod_{j = 1, j \neq k}^{n} (x - r_j) $$
At point $x = r_k$ it should be equal to 1, so we get
$$ A_k \prod_{j = 1, j \neq k}^{n} (x - r_j) = 1 $$
During my research, I found a statement without proof, that the product is equal to $-n e^{-\frac{(2k - 1)i \pi}{n}}$ so
$$ \prod_{j = 1, j != k}^{n} \left( e^{\frac{(2k - 1)i \pi}{n}} - e^{\frac{(2j - 1)i \pi}{n}} \right) = -n e^{-\frac{(2k - 1)i \pi}{n}} \quad (1) $$
But I failed to prove it yet. I've rewritten the product as
$$ \left( e^{\frac{(2k - 1)i \pi}{n}} \right)^n \prod_{j = 1, j != k}^{n} \left( 1 - e^{\frac{2i \pi (k - j)}{n}} \right) $$
And I see that if $e^{\frac{2i \pi (k - j)}{n}}$ are the roots of some polynomial $P(x)$, than I can easily calculate the product as $P(1)$, but I can't construct such $P(x)$. Is there any easier way to prove the statement (1)?
Let $\zeta:=e^{\frac{\pi i}{n}}$ so that your product is $$\prod_{\substack{j=1\\j\neq k}}^n\left(\zeta^{2k-1}-\zeta^{2j-1}\right).$$ As you already note, this product can be rewritten as $$\prod_{\substack{j=1\\j\neq k}}^n(\zeta^{2k-1}-\zeta^{2j-1}) =(\zeta^{2k-1})^{n-1}\prod_{\substack{j=1\\j\neq k}}^n \left(1-\zeta^{2(j-k)}\right).$$ A change of variables $i:=j-k$ and the fact that $\zeta^n=-1$ show that $$(\zeta^{2k-1})^{n-1}\prod_{\substack{j=1\\j\neq k}}^n\left(1-\zeta^{2(j-k)}\right) =-\zeta^{1-2k}\prod_{\substack{i=1-k\\i\neq0}}^{n-k}\left(1-\zeta^{2i}\right).$$ Note the following convenient identity of polynomials: \begin{eqnarray*} \prod_{\substack{i=1-k\\i\neq0}}^{n-k} \left(X^2-\zeta^{2i}\right) &=&\prod_{\substack{i=1-k\\i\neq0}}^{n-k} (X-\zeta^i)(X+\zeta^i) =\prod_{\substack{i=1-k\\i\neq0}}^{n-k} (X-\zeta^i)(X-\zeta^{i+n})\\ &=&\prod_{\substack{i=1-k\\i\neq0\\i\neq n}}^{2n-k} (X-\zeta^i) =\prod_{\substack{i=1\\i\neq n}}^{2n} (X-\zeta^i) \end{eqnarray*} where the latter equality holds because $\zeta^{2n}=1$. Of course this product is familiar; $$\prod_{\substack{i=1\\i\neq n}}^{2n}(X-\zeta^i) =\frac{X^{2n}-1}{X^2-1} =\sum_{l=0}^{n-1}X^{2l}.$$ Plugging in $X=1$ shows that $$\prod_{\substack{i=1-k\\i\neq0}}^{n-k} \left(1-\zeta^{2i}\right)=n,$$ and hence your original product equals $-\zeta^{1-2k}n$, as you already found.