I have a blackbox function that (for the purposes of this question) looks like $3+\cos(x) + 0.005/(x-a)$. The location of this $a$ is unknown (but within $0\to2\pi$). (The $3+\cos(x)$ is just a (bad) approximation.) I need to find the roots of this function. Unfortunately the functional form is too complicated to be analyzed (it involves hypergeometric function), so there is no straightforward bracketing that I can do to find the roots. So I am a bit stuck on it.
My idea so far:
- Generate a grid that is closely packed enough to see a small bump. near $x=a$. (When the element-wise differences of the grid change sign, further optimize this region.)
- Do some optimization algorithm to find $a$ (?)
- Bracket left & right from $a$ to find the root.
Ideas on how to approach this?