I want to know where in this process I'm going wrong. Perhaps it's not even a valid thing to do...?
Take a well-behaved function such as $f(x)=x \sin 2x$.
I want to turn this into a new function $g$ that, in the limit, becomes a series of $1$s and $0$s.
Step 1: Remove negative domain
$f \rightarrow f^2$
Step 2: Reduce function to range $[0,1]$
$f^2 \rightarrow \frac{2f^2}{f^4+1}$
Step 3: Push function towards $0$ or $1$
Raise to the power of a variable $k \geqslant1$.
$\frac{2f^2}{f^4+1} \rightarrow \biggl(\frac{2f^2}{f^4+1}\biggr)^k$
Here are the results of $k=2$ (blue), $5$ (orange) and $10$ (green):
You can see where this is going :-)
Step 4: Take limit
I suspect that this is where it all goes wrong:
$g(x)=\lim \limits_{k \to \infty}\biggl(\frac{2f^2}{f^4+1}\biggr)^k=\lim \limits_{k \to \infty}\frac{2f^{2k}}{(f^4+1)^k}$
It seems logical to me that, in the limit as described, $g(x)$ outputs nothing but $0$s and $1$s. Therefore, multiplying $g$ with some other function - for example, $g(x)h(x)$ - should produce $0$ for $g(x)=0$, and $h(x)$ for $g(x)=1$.
But for large $k$, $g=O\bigl(\frac{1}{k^2}\bigr)$. So even though no single operation removes $1$ from the domain, the final function is always equal to $0$. Effectively, everything 'collapses' to $0$ at the limit. Do I have this right?
I assume that this has to do with a zero-dimensional 'spike' not being a real mathematical entity; it's a form of singularity.
But, as I said, I'd appreciate knowing exactly what's wrong. And, of course, if it's possible to fix.
Perhaps the only solution is to define a function specifying the $1$s and $0$s, and take it from there?




Your $g(x)$ will be $1$ at all points where $x\sin(x) = \pm 1$ and zero everywhere else. That is $$g(x)=\begin {cases} 1&x\sin(2x)=\pm 1\\0& \text{otherwise} \end {cases}$$ This is because $\lim_{k \to \infty}1^k=1$ but the limit of any number smaller than $1$ when raised to a high power is $0$. This is a fine discontinuous function. The uniform limit of continuous functions is continuous, but this limit is not uniform so the limit function can be discontinuous.