0
$\begingroup$

How can I manipulate a logarithmic function to both grow faster as well as slow down faster?

I need to map a set of values to a range of real numbers between $0$ and $1$ (representing percentages by which to manipulate something). I am using this formula for it ($max > 0$, otherwise the formula would be more complicated):

$$f(x) = \frac {\log (1+x)}{\log (1+max)}$$

lowering the base of the log-function in the dividend makes $f(x)$ grow faster, but then $f(max) = 1$ is not true anymore.

What I am trying to accomplish is that smaller values in my set get mapped to higher percentage values, while higher values get only a slightly higher percentage-increase

$\endgroup$
6
  • $\begingroup$ Could you explain, please, why does the lowering of the base of the log-function change $f(max)$? As far as I can see, $\frac{\log_n {(1+max)}}{\log_n {(1+max)}} = 1$ for any $n \in (0; 1) \cup (1; + \infty)$. $\endgroup$ – Yanior Weg Jul 6 '18 at 13:23
  • 1
    $\begingroup$ Use $\frac{1}{x}$ ? $\endgroup$ – percusse Jul 6 '18 at 13:23
  • $\begingroup$ hyperbolic tangent $\endgroup$ – Cato Jul 6 '18 at 13:49
  • $\begingroup$ When you describe a function only qualitatively, it's hard to find. A differential equation cuts down the options considerably. Given some value of the function then fixes it. $\endgroup$ – Allawonder Jul 6 '18 at 13:52
  • $\begingroup$ You can construct such function in a following way: choose any unbounded function $g: [0, +\infty) \rightarrow [0, +\infty)$, such that $g(0) = 0$ and $g(\frac{max}{x} - 1)$ is integrable on $[0, max]$. Then you can define $f(x) = \frac{\int_{[0, x]} g(\frac{max}{t} - 1)d\mu}{\int_{[0, max]} g(\frac{max}{t} - 1)d\mu}$. This function will satisfy the condition "that smaller values in my set get mapped to higher percentage values, while higher values get only a slightly higher percentage-increase", but if you want something more specific, please, do not hesitate to inform us about it. $\endgroup$ – Yanior Weg Jul 6 '18 at 14:09
1
$\begingroup$

You could add increase the additive constant $1$ in both logarithms or, equivalently, multiply both $x$ and $\max$ by some factor.

$\endgroup$
1
  • $\begingroup$ Multiplying worked flawlessly, thank you very much! $\endgroup$ – DBRN Jul 6 '18 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.