# A formula that yields a particular graph shape

I would like a formula for a function whose graph has the following properties:

1. $f(0) = 0$.
2. $\lim\limits_{x\to\infty}f(x) = y$.
3. The shape of the function is approximately the following:

4. It should have an exponential or a logarithm in the formula.

Any function like this?

-
Well, yes: the function whose value at $x$ is the height of the graph you have is such a function. – Arturo Magidin May 26 '12 at 3:22
I think what Arturo is hinting at is that in mathematical terminology, what you want is formula, not a function. @Arturo, there are clearer ways to make that point, don't you think? – Rahul May 26 '12 at 3:26
@ArturoMagidin Could you give any function expression? Thanks! – Alpha May 26 '12 at 3:26
@Rahul: Actually, no, I did not mean that, because I was not aware that this is what the OP is trying to do. Hard enough to figure out what he means by what he writes. – Arturo Magidin May 26 '12 at 3:27
@RahulNarain Yes, I need a formula. – Alpha May 26 '12 at 3:27

## 3 Answers

$$y = 5 - 5 \exp(-\alpha x)$$ where $\alpha >0$ will do the job. You can control the rate of growth by playing around with $\alpha$.

-

The graph of $y=5-5e^{-x}$ has the desired characteristics. More generally, if you want $\lim\limits_{x\to\infty}f(x)=a>0$, the function $f(x)=a-ae^{-x}$ works.

-
Thanks! The formula fits my purpose – Alpha May 26 '12 at 3:38

Also your graph doesn't have anything shown for x<0, so presumably its equal to zero there?

i.e. Use a piecewise defined function:

f(x) = a-a*exp(-x) : for positive x and f(x)=0 for non-positive x.

-