Calculating $\prod_{i=1}^n\left(\int_0^\infty du_i\right)\min\left[e^{-\sum_{i=1}^n u_i},e^{-\sum_{i=1}^n \lambda_i u_i}\right]$ Let $\lambda_i\in\mathbb{R_+}$, $i=1,...,n$ with $\lambda_i \neq 1$.
I know that the 'step' function for $u\in\mathbb{R}$ ( $\theta(u)=1$ for $u>0$ and $\theta(u)=0$ for $u<1$) has the integral representation
$$\theta(u)=\frac{1}{2\pi i}\int_{-i\infty}^{i\infty}\frac{e^{zu}}{z+\epsilon}\,dz\tag{1}$$
for an infinitesimal $\epsilon$.
With the help of $(1)$ and the residue theorem (that I am hardly familiar with) I have to calculate
$$Q(\lambda_1,\dots,\lambda_n)=\prod_{i=1}^n\left(\int_0^\infty du_i\right)\min\left[e^{-\sum_{i=1}^n u_i},e^{-\sum_{i=1}^n \lambda_i u_i}\right]\tag{2}$$
While doing this I am asked to prove
$$\sum_{i=1}^n (\lambda_i -1)^{n-1}\prod_{i\neq j=1}^{n}\frac{1}{\lambda_i -\lambda_j}=1.$$
To be honest I dont know how to even start on this.
Any help or tip is very much appreciated!
 A: $\newcommand{\residue}{\operatorname*{Res}}$
We need the following consequence of the residue theorem. Denote
\begin{align}
   \mathbb{C}_{+}&:=\{z\in\mathbb{C}:\Re z>0\},
\\ \mathbb{C}_{-}&:=\{z\in\mathbb{C}:\Re z<0\},
\\ C_R&:=\{z\in\mathbb{C}:|z|=R\},
\\ i\mathbb{R}&:=\{iz:z\in\mathbb{R}\},
\\ \int_{-i\infty}^{i\infty}f(z)\,dz&:=\lim_{R\to\infty}\int_{-iR}^{iR}f(z)\,dz.
\end{align}

Suppose $f$ is holomorphic in $\mathbb{C}\setminus S$ where $S$ is a finite set.
  
  
*
  
*If $\lim\limits_{R\to\infty}\int\limits_{C_R}f(z)\,dz=0$, then $\sum\limits_{s\in S}\residue\limits_{z=s}f(z)=0$.
  
*If $S\cap i\mathbb{R}=\varnothing$ and $\lim\limits_{R\to\infty}\int\limits_{C_R\cap\mathbb{C}_{-}}f(z)\,dz=0$, then $\int\limits_{-i\infty}^{i\infty}f(z)\,dz=2\pi i\sum\limits_{s\in S\cap\mathbb{C}_{-}}\residue\limits_{z=s}f(z).$
  
*If $S\cap i\mathbb{R}=\varnothing$ and $\lim\limits_{R\to\infty}\int\limits_{C_R\cap\mathbb{C}_{+}}f(z)\,dz=0$, then $\int\limits_{-i\infty}^{i\infty}f(z)\,dz=-2\pi i\sum\limits_{s\in S\cap\mathbb{C}_{+}}\residue\limits_{z=s}f(z).$

(The first claim follows from the theorem immediately; the second is obtained by applying the theorem to the integral over $[-iR,iR]\cup(C_R\cap\mathbb{C}_{-})$ (and taking $R\to\infty$, of course); for the last one, we take $\mathbb{C}_{+}$ in place of $\mathbb{C}_{-}$, but get the opposite orientation of the contour, hence the change of sign.) The conditions above are usually checked using the estimation lemma or Jordan's lemma. Another prerequisite we need is the evaluation of residues at simple poles.
For example, the above is sufficient to prove $(1)$, understood as
$$\theta(u)=\frac{1}{2\pi i}\lim_{\epsilon\to 0^{+}}\int_{-i\infty}^{i\infty}\frac{e^{uz}\,dz}{z+\epsilon},$$
because if $u>0$ then the conditions in "2." are met, with
$$\residue_{z=-\epsilon}\frac{e^{uz}}{z+\epsilon}=\lim_{z\to-\epsilon}e^{uz}=e^{-u\epsilon}\underset{\epsilon\to 0^{+}}{\longrightarrow}1;$$
and if $u<0$ then the conditions in "3." are met (giving $0$); the case $u=0$ is solved by immediate evaluation, giving $\theta(0)=1/2$ with this definition.
Next, we follow the usual vector notation
\begin{align}
   a\pm b&:=\langle a_1\pm b_1,\ldots,a_n\pm b_n\rangle,
\\ \lambda a&:=\langle\lambda a_1,\ldots,\lambda a_n\rangle,
\\ ab&:=a_1 b_1+\ldots+a_n b_n
\end{align}
for $a=\langle a_1,\ldots,a_n\rangle\in\mathbb{C}^n$, $b=\langle b_1,\ldots,b_n\rangle\in\mathbb{C}^n$ and $\lambda\in\mathbb{C}$. So, we have
$$\int_{\mathbb{R}_{+}^n}e^{-au}\,du=\prod_{k=1}^{n}\frac{1}{a_k},\qquad a\in \mathbb{C}_{+}^n.$$

Now let $n>1$ and consider slightly more general $$\color{blue}{Q(a,b)=\int_{\mathbb{R}_{+}^n}\min\{e^{-au},e^{-bu}\}\,du}$$ for $a,b\in\mathbb{R}_{+}^n$ with $1,a_1/b_1,\ldots,a_n/b_n$ pairwise distinct. We get $(2)$ back with $$a=\langle\lambda_1,\ldots,\lambda_n\rangle,\qquad b=\langle 1,\ldots,1\rangle.$$
Let's go. Write $\min\{e^{-au},e^{-bu}\}=e^{-au}\theta\big((a-b)u\big)+e^{-bu}\theta\big((b-a)u\big)$, so that
\begin{align}
Q(a,b)&=\frac{1}{2\pi i}\lim_{\epsilon\to 0^{+}}\int_{-i\infty}^{i\infty}\int_{\mathbb{R}_{+}^n}(e^{-[a+z(b-a)]u}+e^{-[b+z(a-b)]u})\,du\,\frac{dz}{z+\epsilon}
\\&=\frac{1}{2\pi i}\lim_{\epsilon\to 0^{+}}\int_{-i\infty}^{i\infty}\big(f(a,b,z)+f(b,a,z)\big)\,\frac{dz}{z+\epsilon},
\\f(a,b,z)&:=\prod_{k=1}^{n}\big(a_k+(b_k-a_k)z\big)^{-1}.
\end{align}
Under our assumptions, $f(a,b,z)$ has simple poles at $z=z_k:=\dfrac{a_k}{a_k-b_k}$ with
$$\residue_{z=z_k}\frac{f(a,b,z)}{z+\epsilon}=\lim_{z\to z_k}\frac{z-z_k}{z+\epsilon}f(a,b,z)=\lim_{z\to z_k}\frac{a_k+(b_k-a_k)z}{(b_k-a_k)(z+\epsilon)}\prod_{j=1}^{n}\frac{1}{a_j+(b_j-a_j)z}\\=\frac{1}{(b_k-a_k)(z_k+\epsilon)}\prod_{j\neq k}\frac{1}{a_j+(b_j-a_j)z_k}=-\frac{1}{a_k+(b_k-a_k)\epsilon}\prod_{j\neq k}\frac{a_k-b_k}{a_k b_j-b_k a_j}.$$
Thus, applying the item "3." from the above, we get
$$Q(a,b)=\sum_{\substack{1\leqslant k\leqslant n\\a_k>b_k}}\frac{1}{a_k}\prod_{j\neq k}\frac{a_k-b_k}{a_k b_j-b_k a_j}+\sum_{\substack{1\leqslant k\leqslant n\\b_k>a_k}}\frac{1}{b_k}\prod_{j\neq k}\frac{b_k-a_k}{b_k a_j-a_k b_j},$$
or simply $\color{blue}{Q(a,b)=\displaystyle\sum_{k=1}^{n}\frac{1}{\max\{a_k,b_k\}}\prod_{j\neq k}\frac{a_k-b_k}{a_k b_j-b_k a_j}}$. (We could also apply "2." instead, but then we would need to take care of the pole at $z=-\epsilon$. It leads to the RHS of the next equality.)
Finally, the analogue of your final equality (that you're asked to prove) is
$$\sum_{k=1}^{n}\frac{1}{a_k}\prod_{j\neq k}\frac{a_k-b_k}{a_k b_j-b_k a_j}=\prod_{k=1}^{n}\frac{1}{a_k}.$$
This equality is proven using the item "1." from the above, applied to $\frac{f(a,b,z)}{z+\epsilon}$. It allows to write out alternative forms of $Q(a,b)$ (or, rather, to get back to the "blue" one above - perhaps it's the reason the final equality is given for).
