I seriously doubt that is what it is actually called, but I'm not very knowledgeable in this matter.

Conceptually, what I am trying to do is calculate the function of a line/curve that shows the divide between two other functions. As a visual example:

visual example

$$Red: f(x) = x^2 + 2$$ $$Blue: g(x) = -(x-3)^2$$

The orange curve would be some function $h(x)$, where all points on one side of the function would be nearest $f(x)$ and all points on the other side would be nearest $g(x)$. I would like to find a way to figure out what $h(x)$ is.

I'm sure something like this already exists, but I don't even know what to google to find out. I'd also like to mention that I'm looking for a general solution, not something specific to quadratic functions.

Thanks in advance.

  • $\begingroup$ If anyone wants to mess around with a graph, here: desmos.com/calculator/bvrekoymb5 $\endgroup$ – Conor O'Brien May 8 '15 at 2:27
  • $\begingroup$ @CᴏɴᴏʀO'Bʀɪᴇɴ That is the exact site I used to draw up the image for the example (sans h(x), which I drew in manually). To clarify, though, I'm not looking for a solution to this specific pair of functions. $\endgroup$ – Abion47 May 8 '15 at 3:05
  • $\begingroup$ Obviously many different separating functions $h$ are possible. A pretty simple one would be $h(x) = \frac{f(x) + g(x)}{2}$. This $h$ at least has a name, it is the average of $f$ and $g$. $\endgroup$ – Mike F May 8 '15 at 6:09
  • $\begingroup$ @MikeF At first glance this strikes me as an ideal solution, but upon further pondering I wonder if there would be a case where a point would be under $h$ in the y direction and thus "closer" to $f$, but technically closer to $g$ in some direction other than vertical? Would such a concern even matter? $\endgroup$ – Abion47 May 8 '15 at 9:06
  • $\begingroup$ @Abion47: I guess you need to decide more precisely what you mean by a separating function. As you say, the average is precisely halfway between them in the vertical direction, but perhaps not by other measures of "halfway between". $\endgroup$ – Mike F May 8 '15 at 17:28

When I first read your question I thought that is simple you just wanted the vertical mean of the functions f(x) and g(x) at point x

h(x) = (f(x) + g(x)) / 2

But looking at your graph example it seems like you want h(x) to be such that the distance to any point f(y) on the f curve and the distance to any point g(z) on the g curve are equal.

This seems similar to the problem of creating an international boundary at sea between two countries where the boundary is equidistant from the land in each country. Using the equidistance principle http://en.wikipedia.org/wiki/Equidistance_principle is what I think you want.

I searched for the math on how to calculate such a line and the best I found was this article http://en.wikipedia.org/wiki/Equidistant

Hope this helps give you some ideas on solution

| cite | improve this answer | |
  • $\begingroup$ I think you want to go one wikipedia link further to en.wikipedia.org/wiki/Equidistant_set which already gives some examples of equidistant curves between two other objects. $\endgroup$ – quarague Feb 11 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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