# Step function

1. Apr 29, 2005

### AntonVrba

I would like to invite comment to the near step function below.

$$\Mvariable{step(x)}=\frac{{e^{-\frac{\gamma }{{x^2}}}}}{{\sqrt{1-\frac{{e^{-\frac{\gamma }{{x^2}}}}}{{x^2}}}}}$$

the above function evaluates to nearly 1 for |x|>1 and nearly zero for |x|<0.3

for gamma = 0.4823241136337762 I have attached the plots of step and 1-step

here are some spot values for
x and step(x)
0.05 1.15E-83
0.1 1.84E-21
0.2 6.55E-6
0.3 5.11E-3
0.4 6.11E-2
0.5 2.32E-1
0.6 0.518
0.8 0.932
1.0 1.0068
2.0 1.006
5.0 1.00092
10 1.00022
50 1.0000090

#### Attached Files:

• ###### step.gif
File size:
2.8 KB
Views:
138
Last edited: Apr 29, 2005
2. Apr 29, 2005

### Data

Indeed. If you change all the $x^2$s to $x^4$s (or $x^{1000}$s), then it'll get even closer to a step function.

3. Apr 30, 2005

### AntonVrba

I just noticed that the step function can be simplified even more
$$\Mvariable{step}(x)= \frac{{e^{-\frac{\gamma }{{x^2}}}}}{{\sqrt{1-\frac{{e^{-\frac{\gamma }{{x^2}}}}}{{x^2}}}}} =\frac{{{\alpha}^{\frac{1}{{x^2}}}}}{{\sqrt{1-\frac{{{\alpha}^{\frac{1}{{x^2}}}}}{{x^2}}}}}\\$$

for above gamma= 0.4823241136337762 , alpha =0.61734693877551, hence

$$\Mvariable{step}(x)= \frac{{{0.61734693877551}^{\frac{1}{{x^2}}}}}{{\sqrt{1-\frac{{{0.61734693877551}^{\frac{1}{{x^2}}}}}{{x^2}}}}}\\$$

4. Apr 30, 2005

### Data

Well, it's not really "simpler." You have the same number of arbitrary constants, though I guess you have a couple fewer symbols in general (you got rid of two minus signs - but you could do that just by specifying that $\gamma$ must be negative). I'd usually just leave it in the exponential form, but that's a subjective choice based on the fact that I like the letter e

5. Apr 30, 2005

### AntonVrba

Last edited: Apr 30, 2005
6. Apr 30, 2005

### Data

arbitrary within a certain domain is what I should have said, of course. In this case, you need $\gamma > 1/e$.