Solving a set of equations containing sums of logarithms I'm trying to solve a set of $J+1$ equations for variables $x,y_1,\ldots,y_J$. The equations are as follows:
\begin{align*}
\sum_j\sum_i\frac{1}{a_{ij}}\log\left(\frac{a_{ij}}{x+y_j}\right)&=MN\\
\left(N-\sum_i\frac{1}{a_{ij}}\log\left(\frac{a_{ij}}{x+y_j}\right)\right)y_j&=0,\,\,j=1,\ldots,J
\end{align*}
where each $a_{ij}>0$ and $x>0, y_j\ge0$. The logarithms are base $e$. Note that we cannot divide the second set of equations by $y_j$ because some may be zero. I've tried rearranging the equations using $\log\left(\frac{a_{ij}}{x+y_j}\right) = \log(a_{ij}) - \log(x+y_j)$ but it doesn't seem to help. Any ideas?

Attempt:
Using properties of logarithm and exponential functions, I've managed to write the equations as
\begin{align*}
\prod_j\prod_i\left(\frac{a_{ij}}{{x+y_j}}\right)^{1/a_{ij}}&=\exp(MN)\\
\prod_i\left(\frac{a_{ij}}{{x+y_j}}\right)^{y_j/a_{ij}}&=\exp(Ny_j),\,\,j=1,\ldots,J
\end{align*}
This looks nicer, but it doesn't appear to lead anywhere.
An alternate approach:
Based on N74's comments, by defining $z_j = \log(x+y_j)$, we can alternatively write the equations as 
\begin{align*}
\sum_j\sum_i\left[\frac{\log(a_{ij})}{a_{ij}}-\frac{z_j}{a_{ij}}\right]&=MN\\
\left(N-\sum_i\left[\frac{\log(a_{ij})}{a_{ij}}-\frac{z_j}{a_{ij}}\right]\right)(\exp(z_j)-x)&=0
\end{align*}
Defining $A = N-\sum_i\frac{\log(a_{ij})}{a_{ij}}$, $B = \sum_j\sum_i\frac{\log(a_{ij})}{a_{ij}}-MN$, and $c_j=\sum_i\frac{1}{a_{ij}}>0$, we have
\begin{align*}
\sum_jc_jz_j &= B\\
(A+c_jz_j)(\exp(z_j)-x)&=0,\,\,j=1,\ldots,J
\end{align*}
This is where I run into trouble.
 A: Using your definitions:
 $$z_j = \log(x+y_j)$$ $$A = N-\sum_i\frac{\log(a_{ij})}{a_{ij}}$$ $$B = \sum_j\sum_i\frac{\log(a_{ij})}{a_{ij}}-MN$$ $$c_j=\sum_i\frac{1}{a_{ij}}>0,$$ we want to solve:
$$\begin{align*}
\sum_jc_jz_j &= B\\
(A+c_jz_j)(\exp(z_j)-x)&=0,\,\,j=1,\ldots,J
\end{align*}.$$
To make null a product we need that one of the factors is null, so we have a solution when $z_j=\log x$ and another solution for $z_j=-{A\over c_j}$, for each $j$ in $[1,J]$.
Let's discuss some solutions.


*

*All $y_j$ are null:
In this case $z_j=\log x$  so $$\sum_jc_j\log x = B$$ $$x=\exp {B \over \sum_jc_j}$$

*Only $y_{j^*}$ is not null:
In this case $z_j=\log x$  for $j\neq j_*$ and $c_{j^*}z_{j^*}=-A$ so $$\sum_{j\neq j^*}c_j\log x = B+A$$ $$x=\exp {B+A \over \sum_{j\neq {j^*}}c_j}$$ $$y_{j^*}=\exp {-A \over c_{j^*}}-x$$

*All $y_j$ are not null:
In this case $c_jz_j = -A$ so the first equation becomes $$-JA=B.$$ This equation doesn't depend on the unknowns, so the system is either impossible (${B\neq -JA}$), or undetermined ($x$ cannot be fixed).
Obviously you can find all the other solutions by just fixing how many $y_j$are not null.
