Let's define function $f:\mathbb{R}^m\rightarrow \mathbb{R}$ as linear combination of two Gaussian functions $g$ and $h$:
$$f(x) = a\ g(x) + b\ h(x) $$
$$g(x) = \frac {1}{\sqrt {2\pi}\sigma_1}e^{-\frac {\|x-\mu_1 \|^2}{2\sigma_1^2}}$$
$$h(x) = \frac {1}{\sqrt {2\pi}\sigma_2}e^{-\frac {\|x-\mu_2 \|^2}{2\sigma_2^2}}$$
now for a given point $p\in \mathbb{R}$ I need to solve this optimization problem:
$$ \arg\min_x \| x-p \|_2^2\\ subject\ to \ \\ \ \ \ f(x) =0 $$
note that one of $a$ or $b$ is negative and we are sure the equality $f(x)=0$ has solutions.
I tried to write the optimization as below, but the problem is Gaussian function is log-concave, not convex, so function $f$ is not convex, so I don't know how to solve non-convex problems with non-convex constraints.
$$ \arg\min_x \| x-p \|_2^2\\ subject\ to \ \\ \ \ \ f(x) \leq 0\\ - f(x) \leq 0 $$
In general form, if $f(x) = \sum_{i=1}^{k}{a_i \ f_i(x)} $ where $f_i$ is a Gaussian function, how to solve this problem?
For $k>2$ this is obviously difficult. For $k=2$ the set of $x\in R^n$ such that $f(x)=0$ is a sphere $\|x-c\|^2=R^2$ and the best $x_0$ which minimizes $\|x-p\|$ is easy to find: $$x_0=c+R\frac{p-c}{\|p-c\|}.$$