I need a mathematical function for $y=f(x)$ such that $f(0)=25$ and decreases gradually to $f(100)=0$. Ideally, the function should look something like below, decreasing gradually for lower values of $x(<30)$ but faster for higher values of $x$.
Approximate plot values:
$$
\begin{array}{c|cccccccccc}
x&0&5&10&20&30&50&60&70&90&100\\\hline
y&25&24&22&18&15&10&8&5&2&0
\end{array}
$$
Edit : For my requirements I believe an inverted parabolic function would be a better fit than for a choice of negative exponent ( with $y$ sign reversed)
Thanks in advance.
Using following code in MATLAB,
you can find an expression of the form $a\cdot\exp(b\cdot x)$ that fits best through your given points. The above code snippet results in
The plot below shows the curve.
Extending upon this, you can also find an expression as a sum of two exponentials of the form $a\cdot\exp(b\cdot x) + c\cdot\exp(d\cdot x)$ by replacing
with
The result is
and
This plot fits through most of your points.
According to this, you can use the following commands to find polynomial functions:
f = fit(x', y', 'poly2')which results in
and
f = fit(x', y', 'poly3')which results in
and