Logarithmic or exponential fitting of a function given two points

47 Views Asked by At

Let $BPM$ stand for beats per minute. Another quantity $x$ is to be calculated from the value of BPM on a logarithmic or exponential scale.

For $BPM = 120$, $x$ should be $0.01$.

For $BPM = 80$, $x$ should be $0.004$.

What is the way to plug this into some formula?

1

There are 1 best solutions below

2
On BEST ANSWER

Indeed, the requirements are rather vague, but I'll just provide a straight-up answer. I'll interpret that the wish is to have a function of the form $$ x = f(BPM) = a\cdot \ln (BPM) +b $$ We know the two conditions, $f(80) = 0.004$ and $f(120)=0.010$. Plugging these in, we get (a bit scary-looking) expressions for $a$ and $b$: $$ a = \frac{0.06}{\ln \frac{3}{2}} \approx 0.014~798 $$ $$ b = \frac{ \frac{\ln 80}{ \ln 120}\cdot 0.010 - 0.004 }{\frac{\ln 80}{ \ln 120} - 1 } \approx -0.060~844 $$ So the function that you wanted is, as I interpret it, $$ x = (0.014~798) \cdot \ln BPM -(0.060~844) $$ Are you happy with this?