Given $n \in\mathbb{N}$, $a_1, \dots, a_n \in\mathbb{C}$, $k \in \mathbb{R}$ and $x_1, \dots x_n \in \mathbb{R}^3$, let $\Phi : \mathbb{R}^3 \to \Bbb C$ be defined by
$$\Phi (y) := \sum_{i=1}^{n} {a_i \frac{e^{j k \| x_i - y \|_2}}{\| x_i - y \|_2}}$$
where $j := \sqrt{-1}$ is the imaginary unit. Note the singularities at $y \in \{ x_1, \dots x_n \}$.
Can somebody please point me to a more elegant method than brute forcing (just evaluating the expression at millions of points) to find $y$ for which $|\Phi|$ has the global maximum and is not near a singularity (distance > $k$)?
Follows a MATHEMATICA script which implements a maximization procedure to obtain the desired maximum. The nature of the problem, prone to many relative maxima, indicates to choose an evolutionary algorithm to perform the search. The charge points are given in
Xthe coefficients $a_k$ are given asa[1],...,a[n], $k$ is represented bylambda. The objective function is handled as $\|\Phi(y)\|^2$ and the unknown $y$ asY. Attached a plot showing in blue theXcharge points and in red the solution forY.