How to formalize "this looks like a sine wave?" I was plotting random functions on Desmos and then I noticed an interesting phenomenon with the function $x^2 \sin(1/x).$ When I zoomed in at the number $1/k$ by a factor of $k^2$, where $-k$ is a large number, I noticed that the graph looked like a sine wave with amplitude $1$ and period $2\pi.$  Is there any way to formalize the idea of "looks like a sine wave?" If so, does it really look like the sine wave that I described?
I thought of taking a limit as $-k \rightarrow \infty,$ but phase differences wreck this plan. I don't see how I can normalize these phase differences.
 A: Here is an explanation connecting the behavior of your function when $x \to 0$ with the behavior of the classical "cardinal sine"
$$\operatorname{sinc}(u):=\frac{\sin(u)}{u}=\frac{1}{u}\sin(u) \tag{1}$$
(in green on the graphics below) when $u=\frac{1}{x} \to \infty$.

This function has at infinity a behavior recalling a classical function
$$u \mapsto e^{-au}\sin(u)$$
with alternating extrema (minima and maxima), in the first case with a decrease in $\frac{1}{u}$ (the so-called "envelope function") whereas, in the second case, the envelope is in $e^{-au}$.

Now the connection with our issue:
Setting $u=\frac{1}{x}$, we have
$$x^2 \sin(\frac{1}{x}) = \frac{1}{u^2} \sin(u) = \frac{1}{u} \operatorname{sinc}(u)  $$
The coordinates of the local maximas and minimas (I will call them "bumps") of function $\operatorname{sinc}$ are:
$$(u=k \pi, (-1)^k \frac{1}{k \pi}),$$
Taking function $g(u)= \frac{1}{u} \operatorname{sinc}(u)$ instead of function $\operatorname{sinc}$, the ordinates of these "bumps" are approximately multiplied by $ \frac{1}{k \pi}$, which means that their coordinates are :
$$(\color{red}{k} \pi, (-1)^k \frac{1}{\color{red}{k^2} \pi^2})$$
We retrieve in this way the fact that you have observed, i.e., up to a $k$ factor on the abscissas and a $k^2$ factor on the ordinates, we find a regularly oscillating "wave" of the kind you have shown on your graphics.

Remark: Another "zooming" graphical representation around $0$ of the same function $f(x)=x^2 \sin(1/x)$ is represented below:

with a double parabola i<envelope (quite normal). The puzzling fact is that the curve of $f$ (in green again) looks to cover all the plane...
This graphical representation can provide a new "handwaving" interpretation of the "multiply abscissas by $k$ and ordinates by $k^2$" which amounts here to a "parabola rectification".
A: Let's see.
Of course, $x\mapsto x^2\cdot\sin(1/x)$ will never be exactly 'like' a sine wave. However, as $x\to 0$, there are some asymptotic relations which hold.
First of all, when looking at the graph, you notice the amplitude is essentially constant. Let's fix a small number $a$ (for you, $a=1/k$). Near $a$, the difference between $x^2$ and $a^2$, if $x=a+h$, is $2ah+h^2$ which, for $a$ and $h$ small, is essentially negligible. Especially since this is being multiplied by a number bounded in $[-1,1]$, so the error can't blow up at all.
Therefore, near $a$, I approximate $x^2\sin(1/x)\approx a^2\sin(1/x)$ with reasonably good accuracy. What do we do about the $1/x$ term?
Again, it is good to examine how this changes. For $x=a+h$, we have: $$\frac{1}{a+h}-\frac{1}{a}=-\frac{h}{a(a+h)}=-\frac{h}{a^2}\cdot\frac{1}{1+h/a}$$
So, when $|h|\ll a$, this difference is essentially $-h/a^2$. So I notice: $$\sin(1/x)\approx\sin\left(\frac{1}{a}-\frac{h}{a^2}\right)$$Now this is looking linear in $h$. Consider the function: $$x\mapsto\sin\left(\frac{1}{a}-\frac{x-a}{a^2}\right)=\sin\left(\frac{2}{a}-\frac{x}{a^2}\right)$$Near $x=a$, this will roughly equal $\sin(1/x)$.
We then approximate the curve with: $$x\mapsto a^2\cdot\sin\left(\frac{2}{a}-\frac{x}{a^2}\right)$$
If you let $a=-0.001$ in your graph, you will notice very good results. It will only get better as $a\to0$.
See the results for $a=-10^{-4}$.
