Finding a single function $y=f(x)$ (with the minimum possible parameters) satisfying $7$ properties

144 Views Asked by At

For one experiment with four different samples, the data points of each sample showing a different shape of the curve:


Sample #1:

  • $y$ increases as $x$ increases.

  • the curve has no inflection points.

  • it has an upper bound but has no lower bound.


Sample #2:

  • $y$ increases as $x$ increases.

  • the curve has one inflection point.

  • it has an upper bound as well as a lower bound.

  • $\frac{dy}{dx}$ increases before the inflection point, then decreases after the inflection point (with the same rate).


Sample #3:

  • $y$ increases as $x$ increases.

  • the curve has one inflection point.

  • it has an upper bound as well as a lower bound.

  • $\frac{dy}{dx}$ increases before the inflection point slowly, then will decrease after the inflection point fast.


Sample #4:

  • $y$ increases as $x$ increases.

  • the curve has one inflection point.

  • it has an upper bound as well as a lower bound.

  • $\frac{dy}{dx}$ increases before the inflection point fast, then will decrease after the inflection point slowly.


So for illustration, I made artificial data points (plot only, but no values):


Sample #1:

enter image description here


Sample #2:

enter image description here


Sample #3:

enter image description here


Sample #4:

enter image description here


Now the required is to find a general form of $y=f(x)$ that has a minimum possible number of model parameters, with the properties:

$\text{(P1)}$ $y$ increases as $x$ increases. (This property is common for all four samples illustrated above).

$\text{(P2)}$ $y$ has an upper bound. (This property is common for all four samples illustrated above).

$\text{(P3)}$ Depending upon the value of the model parameters, fitted curve should be fixed automatically to have either $0$ or $1$ inflection point. (Sample #2, Sample #3, and Sample #4 have $1$ inflection point, but Sample #1 has no inflection points). So the model should work in any case.

$\text{(P4)}$ Depending upon the value of the model parameters, fitted curve should be fixed automatically to have or not to have a lower bound.

$\text{(P5)}$ $y=f(x)$ is continuous in the interval $[x_\text{min},x_\text{max}]$.

$\text{(P6)}$ $y=f(x)$ is differentiable in the interval $(x_\text{min},x_\text{max})$.

$\text{(P7)}$ $y=f(x)$ is integrable (using only elementary functions) in the interval $(x_\text{min},x_\text{max})$.


My Attempt ( with failure ) :

A possible model for Sample #1 is

$$y=a-be^{cx},$$

and a possible model for Sample #2 is

$$y=\frac{1}{a-be^{cx}},$$

So I was thinking that a possible model that can be used for any case is to add these together, so we have the model:

$$y=C_1+C_2e^{C_3 x}+\frac{1}{C_4+C_5 e^{C_6 x}}$$

but I failed because this model may have discontinuities because the denominator can be zero, so I resolved this by squaring $C_4$ and $C_5$ so the denominator will never be zero. However, there is still a problem about Sample #3 and Sample #4. Sample #3 grows slowly then it reaches the equilibrium faster, and the opposite for Sample #4 which grows fast then it reaches the equilibrium slowly.


EDIT:

I found a function that fixes itself according to the data points:

$$y=C_1+C_2 e^{C_3e^{C_4x}}$$

This curve is good because it fits any of the four behaviors illustrated above.

However, this does not satisfy property $(\text{P7})$, so I included this as a part of my attempt, also a good reason to include this attempt is to demonstrate how to required function need to be flexible so it can fit my data.


Your help would be appreciated. THANKS!