# Need a function that is near 1 at high values and tends to zero at low values

• June 8th 2012, 01:30 PM
xlxc34
Need a function that is near 1 at high values and tends to zero at low values
I've got a very simple problem that I can't seem to figure out. I need a function that is near 1 at high values of x but tends to zero as it gets nearer to 0. My first thought was f(x)=1-1/x, but it doesn't have enough control. For example, I need it to have a value of about 1 at x=1e8, still 1 at x=2e7 but at say x=5e5 it needs to have a value of 0.0000001. These numbers have kind of been plucked out of the air, I'm just trying to illustrate that I need a bit more control than I can achieve with 1-1/x.

Any help will be much appreciated!

Pete
• June 8th 2012, 01:55 PM
skeeter
Re: Need a function that is near 1 at high values and tends to zero at low values
$y = 1 - e^{-x}$
• June 8th 2012, 01:55 PM
Plato
Re: Need a function that is near 1 at high values and tends to zero at low values
Quote:

Originally Posted by xlxc34
I've got a very simple problem that I can't seem to figure out. I need a function that is near 1 at high values of x but tends to zero as it gets nearer to 0. My first thought was f(x)=1-1/x, but it doesn't have enough control. For example, I need it to have a value of about 1 at x=1e8, still 1 at x=2e7 but at say x=5e5 it needs to have a value of 0.0000001. These numbers have kind of been plucked out of the air, I'm just trying to illustrate that I need a bit more control than I can achieve with 1-1/x.

Look at $1-e^{-x}$,