I have this problem. Googling 2 hours with no answers found, but propably searching wrong words - im really not not a math guy but need this for a plugin I write:
A price for a product is 150 OR below and the fee is 50% = 75
A Price for a product is 3000 OR Above and the fee is 10% ( and staying there ) = 300
The fee in % between 151 - 2999 should decrease in a smooth curve (50% to 10%)
How do I get the % for example 1400 ?
Thanks for any help / Jonas
Ok, if the smooth curve between 150 and 3000 is a straight line, we could start by finding the actual line $f(x) = ax+b$.
We have the two conditions $f(150) = 0.5$ and $f(3000)=0.1$, so we get the system of equations $$ 150a+b = 0.5\\ 3000a + b = 0.1 $$ which has solutions $a=-0.000140351$ and $b=0.521053$, so the curve is described by $$ f(x) = -0.000140351x + 0.521053 $$
Now to find the fee for any price between 150 and 3000 you just plug it in as $x$. For $1400$ we get $-0.000140351*1400+0.521053=0.3245616$.
Edit: It kinda sounds like the normal curve would fit your preferences pretty well. Just playing around with the numbers , using the function $$ f(x) = 0.1+0.4e^{-(x-150)^2/1000000} $$
for values between $150$ and $3000$, you get this curve:
Changing the number where I chose $1000 000$, you could get a flatter or steeper graph by increasing/decreasing the number.