Continuous superposition of bump functions

390 Views Asked by At

I am trying to "model" Fig 2 with a superposition of a bump function. I understand that bump functions are bounded and can be often differentiated. The bump function I have used is shown in Fig 1.

My bump function:

$$f(x)=exp\left(\frac{x^2}{x^2-L^2}\right)$$

$L$ varies from $-\pi$ to $\pi$ and produces the plot below (FIG 1):

FIG 1: Bump function

FIG 2What I am trying to model through a superposition of such bump functions ALSO AVAILABLE HERE:

FIG2: I would like to model this with a continuous bump function

What kind of superposition of bump functions will I need? I have tried fractional additive superpositions such as:

$$f(x)=exp\left(\frac{x^2}{x^2-L^2}\right) +0.01 exp\left(\frac{(x+2)^2}{x^2-L^2}\right)$$

$\ldots$ but that didn't work!

EDIT 1: Per fgp's comment below:

$L$ is a constant. In my plot $x$ ranges between $-L$ to $L$. I used Mathematica to do this plot and the code, in case anyone is interested is:

L=\[Pi];
f= Exp[x^2/(x^2-L^2)]
Plot[
f,
{x,-L,L}
]

EDIT 2: In an attempt to "scale and translate" as per Henning Malkholm, I produced this monstrosity which is not quite correct

$$a \exp \left(\frac{(2 x+3 \pi )^2}{(2 x+3 \pi )^2-(3 \pi )^2}\right)+a \exp \left(\frac{(2 x-3 \pi )^2}{(2 x-3 \pi )^2-(3 \pi )^2}\right)+\exp \left(\frac{x^2}{x^2-L^2}\right)$$

enter image description here

The scale factor a did not make too much of a difference as a number. I suppose I would need a function a=a(x) to do this.

Any ideas at this stage would be appreciated.

1

There are 1 best solutions below

6
On

How about just scaling and translating?

$$ g(x) = f(x) + af(2x-3\pi) + af(2x+3\pi)$$ where $f$ is your original bump function, for some appropriate coefficient $a$.

If that "doesn't work", you'll need to define "works" more clearly and tell us how it doesn't work.


Edit after question was updated: I see what's happening. Your bump function should actually be

$$ f(x) = \begin{cases} \exp\left(\frac{x^2}{x^2-L^2} \right) & \text{when } |x|<L \\ 0 & \text{when } |x|\ge L\end{cases} $$

Outside the interval $(-L,L)$ the first expression will give you large numbers that are not part of the bump, so you need a piecewise definition to get rid of them.