A special case: determinant of a $n\times n$ matrix I would like to solve for the determinant of a $n\times n$ matrix $V$ defined as:
$$
V_{i,j}=
\begin{cases}
v_{i}+v_{j} & \text{if} & i \neq j \\[2mm]
(2-\beta_{i}) v_{i} & \text{if} & i = j \\
\end{cases}
$$
Here, $v_i, v_j \in(0,1)$, and $\beta_i>0$.  Any suggestions or thoughts are highly appreciated.  
 A: Let me consider $W:=-V$; we have 
$$
\det(V)=(-1)^n\det(W).
$$
As already noted in the comments, $W=D-(ve^T+ev^T)$, where $v:=[v_1,\ldots,v_n]^T$, $e:=[1,\ldots,1]^T$, and $D:=\mathrm{diag}(\beta_i v_i)_{i=1}^n$. 
Since $D>0$, we can take
$$
D^{-1/2}WD^{-1/2}=I-(\tilde{v}\tilde{e}^T+\tilde{e}\tilde{v}^T),
$$
where $\tilde{v}:=D^{-1/2}v$, $\tilde{e}:=D^{-1/2}e$.
Note that $\det(D^{-1/2}WD^{-1/2})=\det(D)^{-1}\det(W)$ and hence
$$
\det(W)=\det(D)\det(I-(\tilde{v}\tilde{e}^T+\tilde{e}\tilde{v}^T))
=\det(I-(\tilde{v}\tilde{e}^T+\tilde{e}\tilde{v}^T))\prod_{i=1}^n v_i\beta_i.
$$
Since $I-(\tilde{v}\tilde{e}^T+\tilde{e}\tilde{v}^T)$ is the identity plus a symmetric rank-at-most-two matrix, its determinant can be written as
$$
\det(I-(\tilde{v}\tilde{e}^T+\tilde{e}\tilde{v}^T))=(1-\lambda_1)(1-\lambda_2),
$$
where $\lambda_1$ and $\lambda_2$ are the two largest (in magnitude) eigenvalues of $BJB^T$ with 
$$B=[\tilde{v},\tilde{e}]\quad\text{and}\quad J=\begin{bmatrix}0 & 1\\1 & 0\end{bmatrix}.$$
Since the eigenvalues of $BJB^T$ are same as the eigenvalues of $JB^TB$ (up to some uninteresting zero eigenvalues), we have that 
$$
\begin{split}
\det(I-BJB^T)
&=
\det(I-JB^TB)
=
\det
\left(
\begin{bmatrix}
1-\tilde{e}^T\tilde{v} & -\tilde{e}^T\tilde{e} \\
-\tilde{v}^T\tilde{v}  & 1-\tilde{v}^T\tilde{e}
\end{bmatrix}
\right)\\
&=
\det
\left(
\begin{bmatrix}
1-e^TD^{-1}v & -e^TD^{-1}e \\
-v^TD^{-1}v & 1-v^TD^{-1}e 
\end{bmatrix}
\right)\\
&=
(1-e^TD^{-1}v)^2-(e^TD^{-1}e)(v^TD^{-1}v)\\
&=
\left(1-\sum_{i=1}^n\frac{1}{\beta_i}\right)^2
-
\left(\sum_{i=1}^n\frac{v_i}{\beta_i}\right)
\left(\sum_{i=1}^n\frac{1}{v_i\beta_i}\right).
\end{split}
$$
Putting everything together,
$$
\det(V)
=
(-1)^n\left[\left(1-\sum_{i=1}^n\frac{1}{\beta_i}\right)^2
-
\left(\sum_{i=1}^n\frac{v_i}{\beta_i}\right)
\left(\sum_{i=1}^n\frac{1}{v_i\beta_i}\right)\right]\prod_{i=1}^n\beta_iv_i.
$$
I guess that after some manipulation you could arrive to the formula given in the other answer (probably by playing further with the term $(1-e^TD^{-1}v)^2-(e^TD^{-1}e)(v^TD^{-1}v)$).
A: By investigating the structure of the result I come to the nice general formula
$$
\left|V\right| = (-1)^n \left(1-\sum _{i=1}^n \left(\frac{2}{\beta _i}+\sum _{j=1}^{i-1}
   \frac{\left(v_i-v_j\right){}^2}{v_i v_j \beta _i \beta _j}\right)\right)
   \prod _{k=1}^n v_k \beta _k
$$
If you have Mathematica you can use the following code to check the result
n = 4;
V = Table[If[i == j, (2 - β[i]) v[i], v[i] + v[j]], {i, n}, {j, n}];
(-1)^n (1 - Sum[2/β[i] + Sum[(v[i] - v[j])^2/(
   v[i] v[j] β[i] β[j]), {j, i - 1}], 
   {i, n}]) Product[v[k] β[k], {k, n}] == Det[V] // Expand
(* True *)

I believe that there is a proof for this formula but I don't find it yet.
