 ## The Glue Function

This denizen of counter-example space is important in calculus on manifolds.  However, that's not why this page is here.  Rather, the page is here because I think this function is so incredibly cool.  This is a liesurely stroll through a few of the glue function's properties, just because I think they're neat.

### The Basic Function

Consider the exponential function, e-x.  As x -> infinity, the exponential goes smoothly to zero.  Furthermore, it goes to zero faster than any polynomial goes to infinity -- any polynomial, times e-x, also goes to zero as x->infinity.

The exponential function is the "magic ingredient" in the glue function. Next, let's squish the whole number line down into the interval (-1,+1), so that our function goes to zero at a finite location.  For a "squish function", we can use s(x) = 1/(1 - x2).  If we just compose f(x) with s(x), we obtain which looks like this:

Plot 1: (2) is infinitely differentiable in the interval (-1,1).  If we differentiate it, we find something remarkable:  All of its derivatives go to zero at the end points.  As x approaches either +1 or -1, the derivative with respect to x of g(s(x)) approaches zero.

This is remarkable because it means we can "piece" this with a constant function, to obtain: and h(x) is infinitely differentiable everywhere.

### Some Properties

The first odd thing about this function is that, because it's infinitely differentiable everywhere, we can find a Taylor series approximation to it at any point.  And for points within (-1,+1) the Taylor series will actually converge to the function, just as we expect -- or at least, it will converge to it in a neighborhood of the point where we construct it.

For points outside the interval [-1,+1], the Taylor series is just the constant function, 0 -- the series gives us no hint that there's any bump in the function, anywhere.

And for +/- 1, the radius of convergence of the Taylor series is zero!  For an apparently well-behaved function, this is most strange.

If we look at the derivatives of the function, it becomes clear what's going on.  Each derivative tends to zero as x goes to +/- 1, and each derivative is bounded.  But the bounds get wider and wider as the the order of the derivatives gets higher.  Looking at all the derivatives together, they're unbounded as we approach the endpoints -- they are progressively worse behaved as their order gets higher.  In consequence, if we try to evaluate the Taylor series at +/- 1, no matter how small we make the neighborhood, there will be derivatives in it which are arbitrarily large -- and the Taylor series won't converge to the function, as a result.

[Some actual graphs of several of the derivatives should appear here, eventually]

### The Final Step:  Making Glue

There's one last trick to making something we can use to stick things together:  We need a step function.

Let's integrate what we've got so far.   The derivative of the integral is just the function, so the result will still be infinitely differentiabl everywhere -- but instead of being zero almost everywhere, with a bump in the middle, it will start at zero, then suddenly step up to a new value, then remain at that value: With we obtain:

Plot 2 - H(x): And for the last step, we'll normalize it, so that the function rises from 0 to 1 on the interval (0,1): which is finally what we want:

Plot 3 -- g(x) =  H(2x - 1)/H(1): By a simple change of variable and by scaling, we can use g(x) to build a function that goes from any constant value to any other constant value, on any interval.  By multiplying two copies together with one of them reversed (stepping down), we can build a function that's constant on any interval we like, and zero everywhere outside some (larger) interval.  We can make it go from 0 to any constant value in as short a distance as we care to.

And it's always infinitely differentiable, everywhere.

### Applications for the Glue Function

The most important application is surely the creation of "partitions of unity", which are used throughout the study of calculus on manifolds in order to stitch together objects that are defined locally into global objects covering the manifold.

Generally, the glue function can be used to stick together any differentiable functions that would otherwise not "match".  Build a glue function that's 1 on the domain where the function is defined, and 0 outside it (with a small "frame" in which it can fall from 1 to zero), and multiply your original function by the glue.

A completely smooth not-quite-half-parabola, for instance, could be built as

x2 * g(1000*x)

It's an exact parabola for values of x >= 0.001, it's exactly zero for all values of x <= 0, and it's smoothly joined in the interval (0,0.001).

More to follow...

Some graphs on this page were not done with Gnuplot, because Gnuplot can't plot integrals that are not available in closed form.  An old "solver" package I had lying around was used instead.