# Variants of the bump function.

The title of this question isn't really clear because of the 150 char limit. What I actually want to ask is this:

If I would have a bump function for $-1 < x < 1$ and I would have some variants of it (a little wider or smaller and higher or lower), how does the bump function have to be designed so I can determine when it is equal or higher than the other function(exponential decay)?

This explains a little what a bump function is. The function I'm looking for is does not have to look like that exactly, but at $x = 0$ and $x = 1$, the slope has to be $0$.

I've been trying to create some functions that make a bump between $-1$ and $1$, but when I have a sum of some of those, I can't solve for $x$.

What I mean by a sum of variants is this. Let the bump represent the energy level of a light flash. So, if $y = e\times \operatorname{exp}\left(-\frac{1}{1-x^2}\right)$, $x$ represents time and $y$ represents the energy level.

If you would have some device with a light sensor which has to do something if at some moment the light exceeds a value, it has constantly have to check if its input (sum of energy levels) is more than some value. So a bump function represents a flash of light, but the flashes are not the same, they don't start at the same time, they differ in duration and they might differ in intensity.

So if I would have three flashes, the first starts at $4$, its duration is $2.5$, and it is $1.1$ times intense as the standard flash. For the second: start $2$, duration $6$, intensity $0.5$. And for the third: start $5$, duration $2$, intensity $3$. The formulas would then be

$$y = 1.1\times e\times \operatorname{exp}\left( -\frac{1}{1-(\frac{x-5}{1.25})^2}\right)$$ $$y = 0.5\times e\times \operatorname{exp}\left( -\frac{1}{1-(\frac{x-3}{3})^2}\right)$$

$$y = 3\times e\times \operatorname{exp}\left( -\frac{1}{1-(x-6)^2}\right)$$

and the formulas for the sum of those flashes would be

$$y = 0.5\times e\times \operatorname{exp}\left( -\frac{1}{1-(\frac{x-3}{3})^2}\right)$$ for $2 < x < 4$ and for $7 < x < 8$, $$y = 0.5\times e\times \operatorname{exp}\left( -\frac{1}{1-(\frac{x-3}{3})^2}\right) + 1.1\times e\times \operatorname{exp}\left( -\frac{1}{1-(\frac{x-5}{1.25})^2}\right)$$ for $4 < x < 5$,

$y = 0.5\times e\times \operatorname{exp}\left( -\frac{1}{1-(\frac{x-3}{3})^2}\right) + 1.1\times e\times \operatorname{exp}\left( -\frac{1}{1-(\frac{x-5}{1.25})^2}\right) + 3\times e\times \operatorname{exp}\left( -\frac{1}{1-(x-6)^2}\right)$

for $5 < x < 6.5$,

$$y = 0.5\times e\times \operatorname{exp}\left( -\frac{1}{1-(\frac{x-3}{3})^2}\right) + 3\times e\times \operatorname{exp}\left( -\frac{1}{1-(x-6)^2}\right)$$ for $6.5 < x < 7$.

This is impossible to invert so it can't be solved for $x$.

What function which makes a nice bump can I use so It can be inverted if it is summed up like that?

• You really should try and learn how to type simple math formulas... – tomasz Dec 17 '13 at 19:20
• Hi @TiLor. $$\color{red}{\Large\text{Welcome to Math.SE!}}$$ Don't worry about it now but you might like to know that we use MathJax here :) – Shaun Dec 17 '13 at 19:24
• @Shaun Thanks, I'll try to use it in this question. – TiLor Dec 17 '13 at 19:35
• seriously sort out the formatting. what you wrote is horrible and most people probably wouldnt even want to read all of it on sight – Lost1 Dec 17 '13 at 19:49
• @Shaun Thanks, I'll do the rest myself, I got the hang of it. – TiLor Dec 17 '13 at 20:29

## 1 Answer

Many functions will "resist" to inversion when summed this way.

If you accept a piecewise definition of the bump, you can go for a quadratic spline, made of three arcs of a parabola. that will ensure continuity and slope continuity.

Then any sum remains a piecewise quadratic polynomial and inversion is straightforward.

Better continuity can be achieved with piecewise cubics, and the inversion remains possible, though a little more involved.