Is there an efficient way to check if a curve that was obtained as an Interpolating Function (from solving differential equations numerically) passes through a given region?
I am solving for two functions $f(r)$ and $g(r)$ from two coupled differential equations. I need to find the initial conditions for which the two functions pass through a specific point $(f(r)=f_0,g(r)=g_0)$ for any r.
What I had tried, was to solve for $r$ such that $f(r)=f_0$ using FindRoot, and then check if $g(r)==g_0$ for that $r$. Unfortunately, this doesn't work, as my equations depend very strongly on the initial conditions. Any small deviation makes the solution pass through a different point. Additionally, this method does not account for the fact that the curve may cut the $f(r)=f_0$ line multiple times. Since FindRoot finds only one root close to my initial guess for $r$, this method is not very trustworthy.
The second problem doesn't bother me as much as the first, since I expect the solution that I want to intersect $f(r)=f_0$ only once. Ideally, what I need is a method to check if the solution that I get from NDSolve for some set of initial conditions, passes through a region (say, a circle) around $(f_0,g_0)$ even once. If I could do that, I can progressively increase precision for the initial conditions and reduce the size of my region until I get a reasonable approximation for the initial conditions that I need.