I have to solve the following system of non-linear equations.
- The variables are $x_i$ and $y_i$ for $i=1,...,n$.
- For the parameters, we have $a_i\in \mathbb{R}$, $b_i\geq 0$ and $B\geq 0$.
The $n+1$ equations are: $$x_i^2+y_i^2=b_i, \text{ }i=1,...,n,$$ $$\left(\sum_{i=1}^na_ix_i\right)^2+\left(\sum_{i=1}^na_iy_i\right)^2=B.$$
I am wondering what are the conditions on $a_i$, $b_i$ and $B$ so that a solution exists ?
Thank you very much for your help!
Because $$x_i^2 + y_i^2 = b_i \ge 0$$ you can define $r_i = \sqrt{b_i}$, and switch to polar coordinates: $$\begin{cases} x_i = r_i \cos{\phi_i} \\ y_i = r_i \sin{\phi_i} \end{cases}$$ The first $n$ equations are obviously true in polar coordinates, $$r_i^2 \cos^2 \phi_i + r_i^2 \sin^2 \phi_i = r_i^2 \left ( \cos^2 \phi_i + \sin^2 \phi_i \right ) = r_i^2$$ and the last equation becomes $$\left ( \sum_{i=1}^n a_i r_i \cos \phi_i \right )^2 + \left ( \sum_{i=1}^n a_i r_i \sin \phi_i \right )^2 = B$$ Applying $\left ( \sum_{i=1}^n z_i \right )^2 = \sum_{i=1}^n \sum_{j=1}^n z_i z_j$ we get $$\sum_{i=1}^n \sum_{j=1}^n a_i a_j r_i r_j \cos \phi_i \cos \phi_j + \sum_{i=1}^n \sum_{j=1}^n a_i a_j r_i r_j \sin \phi_i \sin \phi_j = B$$ Because $\cos \phi_i \cos \phi_j + \sin \phi_i \sin \phi_j = \cos(\phi_i - \phi_j)$, we get $$\sum_{i=1}^n \sum_{j=1}^n a_i a_j r_i r_j \cos ( \phi_i - \phi_j ) = B$$ The above means that we are free to choose the orientation of the coordinate system ($\phi_i' = \phi_i + \phi_0$) without affecting the result. If there is a solution, it can be rotated by any angle, and still be a valid solution (so, if there is a solution, there are an infinite number of solutions). For example, we can choose $$\begin{cases}\left ( \sum_{i=1}^n a_i x_i \right )^2 = B \\ \left ( \sum_{i=1}^n a_i y_i \right )^2 = 0 \end{cases}$$ Because $B \ge 0$, we can take the square root on both sides of both equations: $$\begin{cases} \sum_{i=1}^n a_i x_i = \sqrt{B} \\ \sum_{i=1}^n a_i y_i = 0 \end{cases}$$ We are left with two equations to determine $n$ variables, $\phi_i$: $$\begin{cases} \sum_{i=1}^n a_i r_i \cos{\phi_i} = \sqrt{B} \\ \sum_{i=1}^n a_i r_i \sin{\phi_i} = 0 \end{cases}$$ Substituting $r_i = \sqrt{b_i}$ so that $$\begin{cases} x_i = \sqrt{b_i} \cos{\phi_i} \\ y_i = \sqrt{b_i} \sin{\phi_i} \end{cases}$$ we arrive at the form that uses only the known variables $n$, $a_i$, $b_i$, and $B$, plus the $n$ unknown variables $\phi_i$:
I am sure there are lots of patterns for $a_i$ and $b_i$ (constants or sequences) where $\phi_i$ is easy to determine, but I am really not a mathematician, so I'll leave that for those who have the skill and inclination to do so. (I'd continue with numerical methods from this point.)
I do note an interesting property, however. If
there cannot be any solutions, because $\lvert a_i \cos \phi_i \rvert \le \lvert a_i \rvert$.