$(x_1+x_2+x_3+\ldots+x_n)/(y_1+y_2+y_3+\ldots+y_n) = a$ and $x_1/y_1+x_2/y_2+\ldots+x_n/y_n = b$

47 Views Asked by At

I just have a interesting question:
When $(x_1+x_2+x_3+\ldots+x_n)/(y_1+y_2+y_3+\ldots+y_n) = a$ and $x_1/y_1+x_2/y_2+\ldots+x_n/y_n = b$
And all of $x_i$ and $y_i$ is positive float.
How can I find any solition of ${x_1, x_2,\ldots,x_n}$ and ${y_1, y_2,\ldots,y_n}$? Is there any existing method to do this?

1

There are 1 best solutions below

1
On BEST ANSWER

$$\begin{cases} (x_1+x_2+x_3+...+x_n)/(y_1+y_2+y_3+...+y_n) = a \\ x_1/y_1 +x_2/y_2 + ...+x_n/y_n = b \end{cases}\tag 1$$ Preliminary observation :

$$\text{Let : }\begin{cases} U=x_2+x_3+...+x_n \\ V=y_2+y_3+...+y_n \\ W=x_2/y_2 + ...+x_n/y_n \end{cases}\quad\implies\quad \begin{cases} \frac{x_1+U}{y_1+V} = a \\ \frac{x_1}{y_1} +W = b \end{cases}\quad\implies$$ $$\begin{cases} x_1=\frac{U-aV}{W+a-b}\\ y_1=\frac{(b-W)(U-aV)}{W+a-b} \end{cases}$$ Method to find as many solutions as you want : $$\begin{cases} \text{Takes arbitrary } x_2,x_3,...,x_n \text{ and } y_2,y_3,...,y_n\\ \text{Compute } U,V,W\\ \text{Compute } x_1,y_1 \end{cases}$$ So, you get $(x_1,x_2,x_3,...,x_n \:;\: y_1, y_2,y_3,...,y_n)$ which satisfies the initial equations $(1)$.