Finding maximum of a function by iterating the weighted average inside an interval Let $f:\mathbb{R}\to\mathbb{R}$ be a smooth function. Suppose $f>0$ and $f$ has a single local maximum at $\overline{x}$. Also, assume $f$ is $L1$-normalizable, $\int\limits_{-\infty}^{\infty}fdx<\infty$. We are now going to define a sequence recursively in the following way:


*

*Preliminary step: Choose $\beta\in(0,1)$, $r>0$

*Step 1: Choose $x_0$, such that $\overline{x}\in (x_0-r,x_0+r)\equiv I_1$, and define $x_1 = \frac{\int\limits_{I_1}xf(x)dx}{\int\limits_{I_1}f(x)dx}$

*Step $n$: Let $I_{n} = (x_{n-1}-\beta^{n-1} r,x_{n-1}+\beta^{n-1} r)$, and define $x_n = \frac{\int\limits_{I_n}xf(x)dx}{\int\limits_{I_n}f(x)dx}$
I want to find the conditions on $x_0,\beta,r$ s.t. $x_n\to\overline{x}$.
First, is this sequence convergent?
If we write more explicitly:
$$
x_{n+1} = \frac{\int\limits_{x_n-\beta^nr}^{x_n+\beta^nr}xf(x)dx}{\int\limits_{x_n-\beta^nr}^{x_n+\beta^nr}f(x)dx}
$$
then we notice that $|x_{n+1}-x_n| < \beta^nr$. Generally, if consecutive elements get closer it doesn't necessarily mean that the sequence converge, but in this case the distance gets smaller in an exponential way, so we know $x_n$ converges.
I am having trouble finding conditions on $\beta,r,x_0$ for when $x_n\to \overline{x}$.
The motivation for this equation is the 'shrinking spheres' method used sometimes in astrophysics to find the peak density of a distribution of matter.
Here is a visual illustration of the iterations for a Lorentzian. In this case, $x_n(x_{n-1})$ can be computed analytically (but $x_n$ cannot be). This is also a special function since it is symmetric around the maximum (which is another constraint).

 A: Not a complete answer, but if you view 
$$
X_n :=\frac{f(x)}{\int_{x_n-\beta^nr}^{x_n+\beta^nr}f(z)dz}
$$
as a random variable over $(x_n-\beta^nr,x_n+\beta^nr)$, then at each iteration, you are computing the expectation of this random variable. So what you are essentially trying to do is compute the mode of this distribution by computing successive means over smaller and smaller intervals. In this light, I believe that you can show this converges. It is true that for any unimodal random variable $X$, 
$$
|E[X]-\mathrm{mode}(X)|\leq (\sqrt{3}+\sqrt{3/5})\sigma.
$$
In your iteration, provided $r$ and $\beta$ are large enough, the mode of the random variables restricted to successively smaller domains will be the same and is equal to $\bar{x}$. The expectation of these random variables are $x_n$. We then have
$$
|x_n-\bar{x}|\leq(\sqrt{3}+\sqrt{3/5})\sigma_n.
$$
We now just need an estimate on $\sigma_n = \sqrt{\mathrm{var}(X_n)}$. Notice that we only need $f$ to be $L^2$ on compact intervals for this to work (I think). 
To determine when the iteration converges, you need to know how $\sigma_n$ changes along with changes in the interval. For example, if $\sigma_n$ decreases a lot faster than the interval contraction does and the mode is still in the interval, then the iteration converges. But on the other hand, if the interval contracts too fast and $\sigma_n$ does not decrease fast enough, then this bound becomes less useful as the mode of $X_n$ is not located at the global maximum of $f$. In this first case, it is possible that if our initial interval is large enough, then all these intervals will be nested, so $\sigma_n$ is monotonically decreasing and the iteration is guaranteed to conver. However, if the maximum is global and $f'(x)=0$ only  at $\bar{x}$, then the modes of the random variables $X_n$ will tend towards $\bar{x}$, but the contraction of the interval is not adaptive, i.e., it is completely independent of  the convergence of $x_n$ to $\bar{x}$ and it becomes a crapshoot whether the contraction of the intervals is slow enough to allow the iteration to reach $\bar{x}$. 
This is similar in spirit to trust-region methods which are used in optimization algorithms, but all the ones that people use have adaptive criteria for expanding or contracting these regions. I think that any result you would get on the convergence of this algorithm would boil down to "The interval remains sufficiently large and converges slower than the variation of $f$ over said interval" so it is very problem dependent. 
As a comment pointed out, some examples do not show convergence unless $x_0$ is close to $\bar{x}$. This should not dissuade you. This is typical of these types of algorithms, as all optimization and root finding theorems begin with some set of assumptions on $x_0$ that constitute "good data." If you managed to find an algorithm for global optimization regardless of initial data without extremely restrictive assumptions on $f$ then this would be a significant achievement indeed.
My guess is that for $r$ sufficiently large and $\beta$ sufficiently close to $1$ then most initial guesses $x_0$ should work.
