1

Imagine a curve like a sine wave that is mutated thus: For an increasing $X > 0$, and decreasing $X < 0$ its frequency decreases by the same rate that its amplitude increases. Therefore, as $X$ approaches $0$ (from either direction) its frequency increases infinitely and its amplitude decreases infinitely by the same rate.

Can you help me?

$x\sin(1/x)$ was suggested and it looks really perfect for $x < 0.25:$

enter image description here

However for $x > 1$ it very quickly fails to continue on with the same pattern:

enter image description here

Just to be clear, as I imagine what this curve looks like I see a curve that looks the same no matter if you're zoomed in close to 0 or zoomed out. If you're origin is in the center the curve will look the same on any scale. This is because the amplitude and frequency are changing at the same rate.

MetaStack
  • 298

1 Answers1

4

One such function would be $f(x) = x \cdot \sin(\pi\log_2(x))$, which has zeros at $x = 2^n$, $n\in\mathbb{Z}$ and between two consecutive zeros $2^n$, $2^{n+1}$ reaches an amplitude between $2^n$ and $2^{n+1}$.

This has the right scaling behaviour: "Zooming in" by a factor of $2$ on the graph of the function corresponds to looking at the graph of $2f(\frac{x}{2}) = 2\frac{x}{2} \sin\left(\pi (\log_2(x)-\log_2(2))\right) = x \sin(\pi \log_2(x)) = f(x)$. Hence, the graph does not change if you zoom in or out by a factor of $2$.

Here's the graph of $|x|\cdot\sin(\pi\log_{1.618}(|x|))$ (which is invariant under scaling by a factor of $1.618$ instead of $2$), courtesy of Legit Stack:

Graph of the function

  • @josef-e-greilhuber This is an example of exactly the kind of function I'm looking for, thank you! But I don't understand how to generalize it. For instance: say I wanted to scale the amplitude by a factor of phi so that if a peak occurred at x=1 the next valley would occur at x=1.618 and the next peak would occur at x=2.618 etc... Essentially, how do I generalize this to scale at any desired rate? Also, is it possible to include valid Y values for X < 0? – MetaStack Aug 09 '19 at 17:44
  • 2
    @LegitStack Just take the logarithm with base $\phi$ instead of $2$. And for $x<0$, just take $|x|\sin(\pi \log_\phi(|x|))$, and let $f(0) = 0$. This is defined for all real $x$ and invariant under scaling by a factor of $\phi$. – Josef E. Greilhuber Aug 09 '19 at 17:51
  • Thats absolutely perfect, I found that by toggling the absolute value of the first X I could have a mirror image or I can have the inverse of X > 0. x*sin(pi*log{1.618}(|x|)) – MetaStack Aug 09 '19 at 18:19