Skip to main content

Solving the logistic map for \(r = \pm 2, 4\)

A belated Happy Basanta Panchami to all! Once this blog took off, our interest in discussing new ideas grew exponentially ... or is it really exponential? Let's see.

A few days ago, Gourav Banerjee shared this recursion relation (along with the solution after we got tired of trying) with us. \[x_{n+1} = 2x_n(1-x_n).\] Although this is non-linear and looks intimidating, the solution turns out to be quite elegant. The trick is to rewrite the relation as follows. \[ 1 - 2x_{n+1} = 1 - 4x_n + 4x_{n}^{2} =  (1-2x_n)^2. \]

This already looks much nicer! Taking the logarithm of both sides, \[\log (1-2x_{n+1}) = 2 \log (1-2x_n). \] Set \(b_n = \log(1-2x_n)\) ... whoa! This is a simple geometric progression, with \(b_{n+1} = 2b_n\). Thus, \(b_n = 2^nb_0\) for some initial \(b_0\), which yields \[1-2x_n = (1-2x_0)^{2^n}, \qquad x_n = \frac{1}{2} \left[1-(1-2x_0)^{2^n}\right]. \]

Looks easy, right? This is an example of the more general logistic map, \[x_{n+1} = rx_n(1-x_n).\] It's interesting to note that in general, this cannot be solved in closed form. Wolfram (2002, p. 1098) has postulated that any exact solution must be of the form \[x_n = \frac{1}{2} \left[1-f(r^nf^{-1}(1-2x_0))\right]. \] The only exact solutions known are for \(r=\pm 2\) and \(r=4\). (Wolfram 2002, p. 1098) and R. Germundsson (pers. comm., Apr. 25, 2002) have proved that no other solutions of this form are possible. In fact, this map deciphers the beautiful Bifurcation Diagram when \(\lim\limits_{n \to \infty} x_n\) is plotted against the so-called rate \(r\).  (Technically, the limit of a sequence is unique. But, here in this case of \(x_n\), if it oscillates between two values for sufficiently large \(n\), then we assume two different values of limit also for single \(r.\))

Picture Credit: Veritasium.
What about \(r=4\)?

Let's look at what we're trying to solve. \[ x_{n + 1} = 4x_n(1 - x_n). \] This should remind you of a particular trigonometric identity: the double angle formula for the sine! \[ \sin(2\theta) = 2\sin\theta\cos\theta = 2\sin\theta\sqrt{1 - \sin^2\theta}. \] Thus, put \(x_n = \sin^2(\theta_n)\) in our recurrence relation, giving \[\sin^2\theta_{n + 1} = 4\sin^2\theta_n(1 - \sin^2\theta_n) = \sin^2(2\theta_n).\] Again, we have a solution of the form \(\theta_{n+1} = 2\theta_n\), hence \(\theta_n = 2^n\theta_0\) for some \(\theta_0\). Thus, we have \[ x_n = \sin^2(2^n\theta_0) \] Another way to motivate the same (thanks to Gourav) is by rearranging the recurrence as \[ 1 - 2x_{n + 1} = 2(1 - 2x_n)^2 - 1,\] which bears similarity with the double angle formula \[ \cos(2\theta) = 2\cos^2\theta - 1.\] Substituting \(1 - 2x_n = \cos\theta_n\) will ultimately lead to the same solution. The trigonometric substitutions are admittedly quite a leap; but mathematics is all about finding such patterns and similarities!

What about \(r=-2\)?

Here's Gourav's solution: rewrite \(x_{n + 1} = -2x_n(1 - x_n)\) as \[x_{n + 1} = 2\left(x_n - \frac{1}{2}\right)^2 - \frac{1}{2}, \qquad x_{n + 1} - \frac{1}{2} = 2\left(x_n - \frac{1}{2}\right)^2 - 1.\] Like before, this bears similarity with the double angle formula \(\cos(2\theta) = 2\cos^2\theta - 1\), hence putting \(x_n - 1/2 = \cos\theta_n\) leads to \[\cos\theta_{n + 1} = \cos(2\theta_n), \qquad \theta_n = 2^n\theta_0.\] Thus, \[x_n = \frac{1}{2} + \cos(2^n\theta_0).\] Restoring the value of \(\theta_0\), we finally obtain \[x_n = \frac{1}{2} + \cos\left(2^n\cos^{-1}\left(x_0 - \frac{1}{2}\right)\right).\] To conclude, please share your thoughts on the comment section of our posts to retain our discussion really exponential one!

Some interesting links you may miss:

Comments

Popular posts from this blog

Why am I frequently meeting my crush?

Gourav Banerjee, a 21MS student, goes to the main canteen of IISER Kolkata for dinner at some arbitrarily scheduled time between 8 and 9 pm. He frequently meets an anonymous, beautiful girl in the mess and begins to wonder whether the girl is stalking him or if their meeting is just a coincidence. So he tries to compute the probability of meeting that girl in the mess during dinner time given the following constraints: Both Gourav and the girl go to mess for having dinner at some random time between 8 - 9 pm. Because of the Queue at the mess, both stay in the mess for minimum of 30 min. What do you think? Solution Let $x$ denote the time when Gourav enters the mess and let y denote the time when girl enters the mess. Here we take origin to be the 8 pm mark and a distance of 1 unit represents 1 hour on both $x$ and $y$ axis so all possible coordinates within the unit square $ABCD$ represents an event where Gourav and the girl both visit the canteen. Now the favourable coordinates which

The height of probabilistic interpretation

Girls only love men as tall as 6' and above. Socrates, ca. 2023 It is undeniable that heights strongly influence our daily lives. Be it our heights, or the height of a mountain we scale, or the height of all problems - humans. Mathematics too hasn't been able to escape its clutches, with height functions being useful in several fields, including but not limited to - Diophantine Geometry, Automorphic forms and the Weil-Mordell theorem - something you should have heard before if you attend my talks. If you have attended school (or maybe you are a climate activist) - then try recalling the elementary school days when fractions were introduced. Albeit unknowingly, but we had as children classified fractions into proper and improper - based on whether the denominator was larger than the numerator or vice versa. Well, it seems mathematicians have stuck with this classification - giving us the crux of todays discussion - height of a rational number. Given a rational number $x=\frac mn

Monotonic functions and the first derivative

A couple of days ago, Rohan Didmishe shared this problem with us: show that the function defined by \[ f\colon \mathbb{R} \to \mathbb{R}, \qquad f(x) = \begin{cases} x + x^2\sin(1 / x), &\text{ if }x \neq 0, \\ 0, &\text{ if } x = 0. \end{cases} \] is not monotonic (increasing or decreasing) in any interval $(-\delta, \delta)$ around zero. Graphing this function (say, using Desmos ) shows that it oscllates rapidly, curving up and down with increasing frequency the closer its gets to zero. This is due to the $x^2\sin(1 / x)$ term; the $x$ added in front 'tilts' the curve upwards. The first thing to look at is the derivative of $f$. Using $\lim_{x \to 0} x\sin(1 / x) = 0$ and the chain rule, we can compute \[ f'(x) = \begin{cases} 1 + 2x\sin(1 / x) - \cos(1 / x), &\text{ if }x \neq 0, \\ 1, &\text{ if } x = 0. \end{cases} \] Specifcally, $f'(0) = 1$ which seems to tell us that $f$ is increasing at $0$ ... or doe