I'm trying to simulate a certain type of condition with a continuous and twice differentiable function f(x) that has the following shape:
- The limit of f(x) at −∞ is finite but less or equal to zero, i.e.
−∞<limx→−∞f(x)≤0 - There exists a unique point y∈R such that f(x) is decreasing on (−∞,y) and increasing on (y,∞).
- The limit at ∞ is positive or infinity i.e. 0<limx→∞f(x)≤∞.
However I'm struggling to find a good example of such a function that is simple enough to make the point clear. In other words I'm looking for a explicit examples of a function with the properties that I described above.
Answer
Here's one that will work:
f(x)={−e−x2,x<01−2e−x2/2,x≥0.
Here's a plot:
Here's another that might work (inspired by David G. Stork's answer):
f(x)=tanh(x)−e−x2/4.
Plot:
The thing is, I haven't double-checked that this function is monotonically decreasing before some x, and monotonically increasing after.
No comments:
Post a Comment