Deriving an identity related to partial fractions of large products I am interested in products of the type
\begin{equation}
\prod_1^N \frac{x-a_i}{x-b_i}
\end{equation}
for integer $N$.
I would like to prove the following conjecture:
\begin{equation}
\prod_{i=1}^N \frac{x-a_i}{x-b_i} = 1 + \sum_{i=1}^N \frac1{x-b_i} \left[\prod_{j=1}^N (b_i-a_j)\right]\left[\prod_{\substack{j\neq i\\1}}^N b_{ij}^{-1}\right]
\end{equation}
based on symbolic simulations in Mathematica.
Sadly I have been unable to do so. The work I have done so far is
\begin{align}
\frac{x-a_{N+1}}{x-b_{N+1}} \prod_{i=1}^{N} \frac{x-a_i}{x-b_i} &= \left\{1+\frac{b_{N+1}-a_{N+1}}{x-b_{N+1}}\right\}\left\{1+\sum_{i=1}^{N} \frac1{x-b_i} \left[\prod_{j=1}^{N} (b_i-a_j)\right]\left[\prod_{\substack{j\neq i\\1}}^{N} b_{ij}^{-1}\right]\right\}\\
\begin{split}
&=1+\sum_{i=1}^{N} \frac1{x-b_i} \left[\prod_{j=1}^N (b_i-a_j)\right]\left[\prod_{\substack{j\neq i\\1}}^{N} b_{ij}^{-1}\right] + \frac{b_{N+1}-a_{N+1}}{x-b_{N+1}} +\cdots\\
&\phantom=\,\cdots+ \frac{b_{N+1}-a_{N+1}}{x-b_{N+1}}\sum_{i=1}^{N} \frac1{x-b_i} \left[\prod_{j=1}^{N} (b_i-a_j)\right]\left[\prod_{\substack{j\neq i\\1}}^{N} b_{ij}^{-1}\right] 
\end{split}\\
\begin{split}
&=1+\sum_{i=1}^{N} \frac1{x-b_i} \left[\prod_{j=1}^N (b_i-a_j)\right]\left[\prod_{\substack{j\neq i\\1}}^{N} b_{ij}^{-1}\right] + \frac{b_{N+1}-a_{N+1}}{x-b_{N+1}} +\cdots\\
&\phantom=\,\cdots+ (b_{N+1}-a_{N+1})\sum_{i=1}^{N} (b_{i,N+1})^{-1}\left[\frac1{x-b_{N+1}}-\frac1{x-b_i}\right] \left[\prod_{j=1}^{N} (b_i-a_j)\right]\left[\prod_{\substack{j\neq i\\1}}^{N} b_{ij}^{-1}\right] 
\end{split}\\
\begin{split}
&=1+\sum_{i=1}^{N} \frac1{x-b_i} \left[\prod_{j=1}^N (b_i-a_j)\right]\left[\prod_{\substack{j\neq i\\1}}^{N} b_{ij}^{-1}\right] + \frac{b_{N+1}-a_{N+1}}{x-b_{N+1}} -\cdots\\
&\phantom=\,\cdots - \frac{b_{N+1}-a_{N+1}}{x-b_{N+1}}\sum_{i=1}^{N} \frac1{a_{N+1}-b_i}\left[\prod_{j=1}^{N+1} (b_i-a_j)\right]\left[\prod_{\substack{j\neq i\\1}}^{N+1} b_{ij}^{-1}\right] -\cdots\\
&\phantom=\,\cdots - (b_{N+1}-a_{N+1})\sum_{i=1}^{N} \frac{1}{(b_i-x)(a_{N+1} - b_i)}\left[\prod_{j=1}^{N+1} (b_i-a_j)\right]\left[\prod_{\substack{j\neq i\\1}}^{N+1} b_{ij}^{-1}\right]
\end{split}\\
\begin{split}
&=1+\sum_{i=1}^{N} \frac1{x-b_i} \left[\prod_{j=1}^N (b_i-a_j)\right]\left[\prod_{\substack{j\neq i\\1}}^{N} b_{ij}^{-1}\right] + \frac{b_{N+1}-a_{N+1}}{x-b_{N+1}} -\cdots\\
&\phantom=\,\cdots - \frac{b_{N+1}-a_{N+1}}{x-b_{N+1}}\sum_{i=1}^{N+1} \frac1{a_{N+1}-b_i}\left[\prod_{j=1}^{N+1} (b_i-a_j)\right]\left[\prod_{\substack{j\neq i\\1}}^{N+1} b_{ij}^{-1}\right] +\cdots\\
&\phantom=\,\cdots + \frac{b_{N+1}-a_{N+1}}{x-b_{N+1}}\frac1{a_{N+1}-b_{N+1}}\left[\prod_{j=1}^{N+1} (b_{N+1}-a_j)\right]\left[\prod_{\substack{j\neq i\\1}}^{N+1} b_{{N+1},j}^{-1}\right] -\cdots\\
&\phantom=\,\cdots - (b_{N+1}-a_{N+1})\sum_{i=1}^{N+1} \frac{1}{(b_i-x)(a_{N+1} - b_i)}\left[\prod_{j=1}^{N+1} (b_i-a_j)\right]\left[\prod_{\substack{j\neq i\\1}}^{N+1} b_{ij}^{-1}\right] + \cdots\\
&\phantom=\,\cdots + \frac{1}{x-b_{N+1}}\left[\prod_{j=1}^{N+1} (b_{N+1}-a_j)\right]\left[\prod_{\substack{j\neq i\\1}}^{N+1} b_{{N+1},j}^{-1}\right]
\end{split}
\end{align}
I would gladly appreciate any kind of assistance,; I'm completely stuck.
 A: The Heaviside Method for Partial Fractions requires that the numerator have a lower degree than the denominator. However, a small modification fixes things up:
The Heaviside Method for Partial Fractions gives
$$
\begin{align}
\frac{\prod\limits_{k=1}^n(x-a_k)}{\prod\limits_{k=1}^n(x-b_k)}
&=1+\frac{\prod\limits_{k=1}^n(x-a_k)-\prod\limits_{k=1}^n(x-b_k)}{\prod\limits_{k=1}^n(x-b_k)}\\
&=1+\sum_{k=1}^n\frac1{x-b_k}\frac{\prod\limits_{j=1}^n(b_k-a_j)\color{#AAA}{-\prod\limits_{j=1}^n(b_k-b_j)}}{\prod\limits_{\substack{j=1\\j\ne k}}^n(b_k-b_j)}\\[3pt]
&=1+\sum_{k=1}^n\frac{b_k-a_k}{x-b_k}\prod_{\substack{j=1\\j\ne k}}^n\frac{b_k-a_j}{b_k-b_j}
\end{align}
$$
where the grayed-out term is $0$.
A: So I've been going back to this question in regards to generalisations of the above, and figured I'd contribute with an answer that is more accessible to newcomers than the one by robjohn, although his post is complete and correct. It's not my proof, but I forgot to write down my source and can't find it anymore, sorry!
Given the above notation, we may define:
\begin{equation}
\frac{\prod_1^A(x-a_\ell)}{\prod_1^B (x-b_m)} \equiv F_{A,B}(x),
\end{equation}
maintaining notation as in the OP.
Let's agree to limit the scope of the problem to the cases $B\geq A$ such that it is immediately agreed upon that partial fractions is the way to tackle the problem.
We may observe the following form of $F(x)$ in the first interesting case $A=0$, $B=2$, leading to an empty product in the numerator and two factors in the denominator. The answer is:
\begin{equation}
F_{A=0,B=2}(x) = \frac1{b_1 - b_2} \left[ \frac1{x-b_1} - \frac1{x-b_2} \right].
\end{equation}
For cases satisfying $A=0$ and $B>2$, we may apply this identity multiple times to argue that these will also lead to the general form
\begin{equation}
F_{A=0,B>2}(x) = \sum_j \frac{K_j}{x-b_j},
\end{equation}
where all the $K_j$ are independent of $x$, because we have decided to apply our identity for the case $A=0$ and $B=2$ repeatedly until we were left with isolated $1/(x-b_j)$ terms up to an $x$ independent expression.
Generalising to $A\neq0$ but also $A<B$, we may split the expression into two parts. The first part will be of an identical form as discussed above, with unity in the numerator. The second part will have $A=B$, such that we are left with the following product:
\begin{equation}
\frac{\prod_1^A(x-a_\ell)}{\prod_1^B (x-b_m)} = \frac{\prod_1^A(x-a_\ell)}{\prod_1^A (x-b_m)}\frac{1}{\prod_{A+1}^B (x-b_m)}
\end{equation}
or equivalently
\begin{equation}
F_{A\neq 0,B>A}(x) = F_{A=0, B>A}(x) F_{A=B}(x).
\end{equation}
This makes it clear that this just reproduces the case $A=B$ and $A\neq0$ alongside an instance of the case previously discussed.
It therefore suffices to show that:
\begin{equation}
\frac{x-a_\ell}{x-b_m} = \frac{x-b_m + b_m - a_\ell}{x-b_m} = 1+ \frac{b_m - a_\ell}{x-b_m}
\end{equation}
and to note that summations of summations can be simplified to one big summation (just keeping this in the back of our head is satisfactory here, we don't need to know the in-depth specifics).
Handwavingly multiplying out a product of these two factor terms, we again find something along the lines of:
\begin{equation}
\prod_1^A\left[1+ \frac{b_\ell - a_\ell}{x-b_\ell}\right] = 1 + \sum_1^A \frac{K_\ell}{x-b_\ell}
\end{equation}
which is all that we need to make the general assumption about $F$.
It is thus clear that the general $B\geq A$ leads to expressions for $F$ that satisfy
\begin{equation}
F_{B\geq A}(x) = \delta_{AB} + \sum_\ell \frac{K_\ell}{x-b_\ell}
\end{equation}
with $\delta_{AB}$ a function that equals $1$ if $A=B$ and vanishes otherwise.
To determine any of the coefficients $K_j$, multiply both sides of this last equation with $x-b_j$. All terms in the summation vanish except the $j$'th one, which is then equal to
\begin{equation}
K_j = \left\{(x-b_j) F_{B\geq A}(x)\right\}_{x=b_j}.
\end{equation}
Insert this into our expression to conclude:
\begin{equation}
\frac{\prod_1^A(x-a_\ell)}{\prod_1^B (x-b_m)} = \delta_{AB} + \sum_\ell \frac{1}{x-b_\ell} \frac{\prod_1^A(b_\ell-a_m)}{\prod_{n\neq \ell,n=1}^B (b_\ell-b_n)}.
\end{equation}
