I need a differentiable function whose plot is a plateau and the steepness and width can be varied arbitrarily and easily

3,061

Solution 1

$$\frac{1}{(e^{b(x-a)}+1)(e^{b(-x-a)}+1)}$$

The width of the plateau is $2a$, and the steepness increases with $b$. Note that one exponential controls each side, so you can modify each one independently if you like. Note that this is never exactly $0$ outside the plateau or exactly $1$ inside it.

Solution 2

When you want a graph that looks like a smoothed version of the characteristic function of the interval $[0,a]$ then your "Ansatz" is just perfect. Increasing $b\gg1$ controls the steepness of the vertical sides. But if you want to model the radiation intensity during a day, or a year, you have to talk about the inclination angle of the rays, etc.

Share:
3,061
user1611823
Author by

user1611823

Updated on August 01, 2022

Comments

  • user1611823
    user1611823 over 1 year

    I need to model the solar radiation incident on a solar panel. I tried using $$\tanh(b*(x-a))-\tanh(b*x)$$ but it does not give me a lot of flexibility with the characteristics of the curve, namely width of the plateau and its steepness.