1

I'm looking for a specific function $f(x)$ with the following properties:

  • Continuous (no piecewise functions) and smoothly decreasing.
  • $f(x)>0$ for $0\leq x < c$
  • $f(0)=1$
  • $f(c)=0$

where $c$ is an arbitrary constant.

I've looked into decreasing exponentials [$a*exp(-b*x)$] and inverted square roots [$1/sqrt(a+b*x)$] but I haven't been able to pin down a combination of these that respects the above conditions.

A linear function like $1-x/c$ won't do it since it doesn't decrease smoothly (not sure if there's a more correct term for this) which is why I've been trying with exponents and square roots.

Here's what I mean by decreases smoothly graphically, where the functions tends to stabilize around $0$ for $x>c$:

enter image description here

Any ideas or pointers will be appreciated.

Gabriel
  • 1,355
  • 1
    @user The above $f$ is not zero at $x=c$. – coffeemath Mar 10 '14 at 15:31
  • 1
    Try $f(x)=1-(x/c).$ Unless you want more properties... – coffeemath Mar 10 '14 at 15:32
  • @coffeemath that respects the above conditions but I'm looking for something that decreases smoothly (like an exponential). I didn't think of a linear function so I didn't warn about this, sorry. I'll edit the question. – Gabriel Mar 10 '14 at 15:34
  • 1
    Are there any criteria for what you want your function to for $x>c$? – Foo Barrigno Mar 10 '14 at 15:40
  • Gabriel: What does "decreases smoothly" mean? does it mean the derivative is continuous? Also as Foo Barrigno asks, what requirements for $x>c$ do you need? – coffeemath Mar 10 '14 at 15:45
  • @FooBarrigno & cofeemath, I'll make it more clear in the question. I thought this was a simpler question and I didn't foresee the complications, sorry again. – Gabriel Mar 10 '14 at 15:47
  • @Gabriel Is "decreases smoothly" meant to mean $f'(c) = 0$ by any chance? – fgp Mar 10 '14 at 15:47

2 Answers2

1

Here's an exponential that is smooth, continuously decreasing, and satisfies the bounds at $f(0)=1$ and $f(c)=0$:

$\frac{e^{-x}-e^{-c}}{1-e^{-c}}$

0

Can you clarify ? Are you looking for a function that matches these conditions or a specific function whose graph has a specific form ?

Otherwise the $f(x)= 1-\frac{x}{c}$ solution might just be enough

T_O
  • 629
  • Hi user, I just clarified above why a linear function is not what I need. I need something that will decrease smoothly like an exponential. I'll try to add a graph to the question. – Gabriel Mar 10 '14 at 15:39
  • $\frac{(x-c)^{2}}{c^2}$ ? – T_O Mar 10 '14 at 15:43
  • 1
    If you are looking for something around exponentials, you can play around the form here :

    link.

    I put a 2 instead of a c so you could see the graph, if you want the graph to be more or less steep, you'll have to play around the constant a in $exp(-a*x)$.

    – T_O Mar 10 '14 at 15:51