Keeping the amplitude of a formula constant through a change of frequency

14 Views Asked by At

There is a function $f(x)=\frac{1}{\lfloor x \rfloor}\times x$ where the amplitude changes and goes to zero for large positive values, while the frequency remains the same for the appearance of the individual bars that make up the graph. Basically, I am trying to rearrange this so that the amplitude remains 2 over the entire course of the function, while the frequency must increase as a logical consequence if the angle of the individual bars is to be preserved.

To accomplish this, I have tried multiplying x by a function to change the frequency of $f(x)$. Let's call it $g(x)$. The modified formula is $f(x)=\frac{1}{\lfloor x \times g(x) \rfloor}\times x \times g(x)$. When $g(x)$ is a constant value, only one of the bars aka a particular region of the function is as it should be. This looks like this:
| g(x) | valid range of f(x) | | -------- | --------------------| | 1 | [1; 2] | | 1/2 | [2; 4] | | 1/3 | [4; 7] | | 1/4 | [7; 11] | | 1/5 | [11; 16] |
For this reason, I figured that there is probably a way to round off a function to get the appropriate constant for the current range. Such a function would go through the following points $(2|1) (4|\frac{1}{2}) (7|\frac{1}{3}) (11|\frac{1}{4}) (16|\frac{1}{5})$. As you can see, there is a certain pattern for these points ($x|\frac{1}{n}$), where n is the index of the point and x is the x of the previous point + n. Unfortunately I can not find the corresponding function.