What is a function that is equidistant from two functions?

387 Views Asked by At

For example, let $f(x)$ be $x^2$ and $g(x)$ be $x^3 + 1$. It is easy to see that $h(x)=\frac{f(x)+g(x)}{2}$ is not equidistant from $f$ and $g$.

Then, what is a general form of a fucntion $h(x)$ that has the same distance between both of $f(x)$ and $g(x)$ ?

*If it is hard to define $h(x)$ over all range of $x$, limiting a range of $x$ is possible.

1

There are 1 best solutions below

0
On

Imagine a circle moving so that it is simultaneously tangent to your two curves. Then the locus of the center of this circle would be the "equidistant" curve that you want. In computational geometry, this curve is called the "medial axis", and it has a great many uses. If you want to learn about it, you can get started at this page. The page includes a link to code that computes the medial axis. If your curves are very simple (straight lines and circular arcs, for example), there are closed-form solutions. In more general cases, the best you can do is a polygonal approximation.