Following on from my previous question, kindly answered by @peter-k, I have a related one...

I have, in a small interval $a \leq x \leq b$, a function $q(x) := q(x;\rho,\gamma)$ whose exact form is unknown. However, a Taylor expansion around a point $x=\rho_0$ shows that, to the first order, we have $$ q(x;\rho_0,\gamma) \approx c(x;\rho_0,\gamma) = \frac{1}{\pi}\left[ \frac{\gamma}{(x-\rho_0)^2 + \gamma^2} \right], $$ where in general, $c(x) := c(x;\rho,\gamma)$ is the density function of the Cauchy probability distribution with location $\rho$ and scale $\gamma$. This is illustrated in the figure. enter image description here

From prior analysis we also have that $$ \arg\max_\rho q(x;\rho,\gamma) = \arg\max_\rho c(x;\rho,\gamma) = \rho_0 $$ and $\gamma > 0$ is a (small) known constant.

My question therefore is what method(s) are available to 'fit' $c(x)$ to $q(x)$ in the interval $[a,b]$ so as to discover the value of $\rho_0$ and hence the value of $x \in \mathbb{R}$ at which $q(x)$ attains its maximum?

I have been experimenting with the discretised convolution of $q(x)$ with $c(x)$ but so far have not achieved the desired result. If this is indeed an applicable approach, any comments or guidance would be much appreciated.


1 Answer 1


I think a least square error fit should do the trick. Assuming $c$ is discrete at the values $x_i$ you can define your error as:

$$E = \sum \left[ \frac{1}{\pi} \frac{\gamma}{(x_i-\rho)^2 + \gamma^2} - c_i\right]^2 $$

and you can get $\rho_0$ by minimizing the error, i.e. solving for

$$\frac{\partial E}{\partial \rho} = 0$$

That's not going to be a pretty equation but since it's only one variable and your function is well behaved with a single smooth minimum, a simple binary search may do the trick. Since you can calculate the partial derivatives you can also do steepest descent or maybe conjugate gradient search.

  • $\begingroup$ Thanks for this ... yes, we can discretise $c$ at points $x_i$. I actually started my approach of attacking this problem with least-squares and you're right the equation is pretty nasty! $\mathcal{O}(\rho^5)$ in the denominator (without looking back at my notes). But as you say the function is well-behaved so it is an option and I'm glad to have found your support in the approach. I'd like to leave the question open for a while to see what other ideas may be suggested, but otherwise I will persist with this one. $\endgroup$
    – RickyBoy
    Commented Jul 22, 2022 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.