Monday, June 03, 2024

Minor amusement

During a boring interlude, I wondered what sequences of continuous functions you might get with $f(x)$, $f(f(x))$, $f(f(f(x)))$, etc, and when would the sequence converge? Restrict ourselves to $x \in [0,1]$, and require that the function also stay in that range. Figuring out the convergence is not a tough problem: if the sequence converges to some $f^{\infty}(x)$, there's only one function that works.

The sequence might not converge at all: For $f(x) = 1-x$ the result jumps back and forth between two graphs. I don't see why you couldn't generate longer chains of repeating graphs.

Or it might converge, but not to something continuous. If $f(x) = x^2$, the graphs get flatter and flatter, and $f^{\infty}(x)$ would be $0$ for $x \neq 1$ and $1$ for $x = 1$

If you parameterize the function and play games with the parameters, I'd bet you get chaotic behavior in there somewhere.

I used pari/gp to create the base images and gimp to create the animations. I know, all the cool kids use python.

FWIW, I noticed that the high school math classes used the same graphics calculators over the time all our kids were in school (12 year age range), and marveled that there'd been no improvements over that time. Well, there have been, and the ubiquitous cell phones can easily download an app that will do their algebra factoring etc for them. The math classes don't dare use anything more recent, or the kids would use their shortcuts and not get the hang of algebra themselves.

1 comment:

Rick Samborski said...

If f(x) = 4*c*x*(1-x) where c is a real number and 0 < c < 1, then as c approaches 1 you do indeed get chaos. See the book "Chaos" by James Gleick and its chapter about Mitchell Feigenbaum.