0
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ You seem to be confused about what you independent variable is supposed to be. You define the bump function as $f(x) = \ldots$, but then say "L varies... " when describing the plot. Which is it? $\endgroup$ – fgp Apr 7 '14 at 18:28
  • $\begingroup$ @fgp apologies. On a semi regular basis, the engineer in me murderizes the mathematician. The x varies from 0 to L. I hope that provides clarity? $\endgroup$ – dearN Apr 7 '14 at 19:00
  • $\begingroup$ That murderous engineer has killed again, I fear... I think you mean $x$ varies from $-L$ to $L$... $\endgroup$ – fgp Apr 7 '14 at 19:02
  • $\begingroup$ @fgp yes. Thank you for catching that. Working on translation as suggested by Henning Makholm below. $\endgroup$ – dearN Apr 7 '14 at 19:08
3
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ @HenningMalkholm That was a good idea and I tried it. It would seem that the coefficient a would need to be a "curvature" type term? Right now I have discontinuities in my plot. See updated question. Thank you for your input! $\endgroup$ – dearN Apr 7 '14 at 19:20
  • $\begingroup$ @drN: No, $a$ is just a constant -- but you need to explicitly suppress the part of the bump function that is outside the support. $\endgroup$ – Henning Makholm Apr 7 '14 at 19:48
  • $\begingroup$ @HenningMakhold Yes I thought about a piecewise function but decided against it in case in is not "discretized" correctly with finite difference schemes and such. The pcw/s function, however, needs to be three part and I tried that (will include code soon) with no success! $\endgroup$ – dearN Apr 7 '14 at 21:52
  • $\begingroup$ @drN: Bump functions do need to be piecewise defined -- there's no getting around it. $\endgroup$ – Henning Makholm Apr 7 '14 at 22:19
  • $\begingroup$ I forgot to add that with the pcw/s function you have recommended, I will have only one "bump". I am looking at getting a central bump and "satellite" bumps of smaller amplitude around it. I believe these are called compactons. $\endgroup$ – dearN Apr 7 '14 at 23:07

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.