Consider the logistic function \(f(x) = rx(1-x)\) where \(0 < r\leq 4\). In the lesson we saw (by looking at a plot of the iterates) that when \(r > 3\) this function has a two-cycle. Now, let’s show it algebraically. Last week we learned that we can solve for the period two points of \(f(x)\) by solving the expression \(f^{[2]}(\bar{x}) = \bar{x}\), however as \(f(x)\) gets more complicated this can leave us with some messy equations to solve. In this question we will work through an easier way to solve for the two-cycle of \(f(x)\).
Let \(\left\{p_1,p_2\right\}\) be the two-cycle of \(f(x)\). In order for this to be a two-cycle we must have that \(f(p_1) = p_2\) and \(f(p_2) = p_1\). Use this fact to write down two expressions relating \(p_1\) and \(p_2\).
Now subtract the two expressions you found in (a) and use the fact that \(p_1\neq p_2\) to simplify the resulting expression. You should end up with an expression which is linear in both \(p_1\) and \(p_2\).
Finally, substitute this expression back into one of the expressions you found in (a) to solve for either \(p_1\) or \(p_2\). Use this result to show that \(f(x)\) only has a (real-valued) two-cycle when \(r>3\).
Solution:
Using \(f(p_1) = p_2\) and \(f(p_2) = p_1\) we have the following two expressions \[\begin{align*} r p_1(1-p_1) &= p_2\\ r p_2(1 - p_2) &= p_1\end{align*}\] which relate \(p_1\) and \(p_2\).
Subtracting the two expressions from (a) gives \[\begin{align*} r p_1 (1-p_1) - rp_2(1-p_2) &= p_2 - p_1\\ r(p_1-p_2) - r(p_1^2 - p_2^2) &= p_2 - p_1\\ r(p_1-p_2) - r(p_1-p_2)(p_1+p_2) &= p_2 - p_1.\end{align*}\] Since \(p_2\neq p_1\) (by the definition of a two-cycle) we can divide both sides by \(p_1-p_2\), resulting in \[\begin{align*} r - r(p_1+p_2) &= -1\\ p_1 + p_2 &= \frac{1+r}{r}\\ p_1 &= \frac{1+r}{r} - p_2.\end{align*}\]
Finally, we substitute our result from (b) back into one of our expressions from (a) to solve for \(p_1\) or \(p_2\). Since \(p_1\) and \(p_2\) are interchangeable in our initial formulation it doesn’t matter which one we solve for. \[\begin{align*} r p_2(1 - p_2) &= \frac{1+r}{r} - p_2\\ rp_2 - rp_2^2 &= \frac{1+r}{r} - p_2\\ rp_2^2 - (r+1)p_2 + \frac{1+r}{r} &= 0.\end{align*}\] Using the quadratic formula we get \[\begin{align*} p_2 &= \frac{r+1}{2r} \pm \frac{\sqrt{(r+1)^2 - 4r\frac{1+r}{r}}}{2r}\\ &= \frac{r+1}{2r} \pm \frac{\sqrt{(r+1)(r-3)}}{2r}.\end{align*}\] Since \(r>0\), this has two distinct (real) solutions when \(r>3\). Thus, we have a two-cycle when \(r>3\).
Consider a circle \(C\) which has radius \(1\). Now consider inscribing \(C\) with a regular polygon \(P_n\) which has \(2^n\) equal sides, as shown in the figure below. The idea is that we can consider the length (\(L_n\)) of the perimeter of \(P_n\) as an approximation for the circumference (\(L=2\pi\)) of the circle \(C\).
Write down an expression for \(L_n\) (the length of the perimeter of \(P_n\)).
CHALLENGE (You will need to be familiar with limits in order to solve this next part.) Show that \(\lim_{n\to\infty} L_n = L = 2\pi\).
Hint: You may work with angles in either degrees or radians (if you are familiar with radians). You will need to use the fact that \(\lim_{x\to 0} \frac{\sin(x)}{x} = 1\) (when \(x\) is in radians) or that \(\lim_{x\to 0} \frac{\sin(x)}{x} = \frac{\pi}{180}\) (when \(x\) is in degrees).
Solution: Working with angles in degrees (solution using radians is very similar):
To start, we need the length of each side of \(P_n\), which is given by \[\begin{align*} 2\cdot \sin\left(\frac{\theta_n}{2}\right) = 2\cdot \sin\left(\frac{360\degree}{2^{n+1}}\right)\end{align*}\] as seen on the following figure.
Since \(P_n\) has \(2^n\) sides, the length of its perimeter is given by \[\begin{align*} L_n &= 2^n\cdot 2\cdot \sin\left(\frac{360\degree}{2^{n+1}}\right)\\ &= 2^{n+1}\cdot \sin\left(\frac{360\degree}{2^{n+1}}\right).\end{align*}\]
\[\begin{align*} L = \lim_{n\to\infty} L_n &= \lim_{n\to\infty} 2^{n+1}\cdot \sin\left(\frac{360\degree}{2^{n+1}}\right)\\ &= \lim_{n\to\infty} \frac{\sin\left(\frac{360\degree}{2^{n+1}}\right)}{\frac{1}{2^{n+1}}}\end{align*}\] Now, let \(x_n = \frac{360\degree}{2^{n+1}}\). As \(n\to\infty\), \(x_n\to 0\). \[\begin{align*} \lim_{n\to\infty} L_n &= \lim_{x_n\to 0} \frac{\sin(x_n)}{\frac{x_n}{360\degree}}\\ &= 360\degree \lim_{x_n\to 0} \frac{\sin(x_n)}{x_n}\\ &= 360\degree \cdot \frac{\pi}{180\degree} \\ &= 2\pi\end{align*}\] which gives the desired result.
Consider the generator \(G\) sketched below:
where \(0<r_1 < 1\),\(0<r_2<1\) and \(1 < r_1+r_2 < 2\).
Starting with the set \(J_0 = [0,1]\), sketch \(J_1 = G(J_0)\) and \(J_2 = G(J_1)\).
What is the length of \(J_1\) (\(L_1\))? Of \(J_2\) (\(L_2\))? In general, can you find an expression for the length of \(J_n = G^n(J_0)\)?
What do you expect to happen to the length of \(J_n\) as \(n\) gets infinitely large (i.e. as the set \(J_n\) approaches the attractor)?
Solution:
\(J_1\) and \(J_2\) are as follows
The length of \(J_1\) is \(L_1 = r_1 + r_2\).
The length of \(J_2\) is \(L_2 = r_1^2 + 2r_1 r_2 + r^2 = (r_1 + r_2)^2\).
In general, \(G\) scales the length of each line segment by a factor of \(r_1 + r_2\) so we can write \(L_n = (r_1+r_2)^n\).
Since \(r_1 + r_2 > 1\), \(\lim_{n\to\infty} L_n = \lim_{n\to\infty} (r_1 + r_2)^n = \infty\). In other words, as \(n\) gets infinitely large, the length of \(J_n\) will approach infinity (meaning that the attractor has infinite length).
Consider the following two function iterated function system (IFS) on \([0,1]\), \[\begin{align*} f_1(x) = \frac{1}{5}x,\quad f_2(x) = \frac{1}{5}x + \frac{4}{5}.\end{align*}\]
Let \(I_0 = [0,1]\) and \(I_1 = F(I_0)\) where \(F\) is the parallel IFS operator composed of the two functions \(f_1\) and \(f_2\). Sketch \(I_1\) on the real number line.
Let \(I_2 = F(I_1)\). Sketch \(I_2\) on the real number line.
Let \(I\) denote the limiting set (or attractor) of this IFS. Use the scaling relation to determine the fractal dimension \(D\) of \(I\).
Hint: \(D\) will be a ratio of two logarithms.
Solution:
\(I_1\) is as follows
\(I_2\) is as follows
Letting \(r = \frac{1}{5}\) we see that \(N(r\epsilon) = 2N(\epsilon)\) (one measuring stick of length one, two of length \(\frac{1}{5}\), four of length \(\frac{1}{25}\), etc...). Putting this into the scaling relation we get \[\begin{align*} N\left(\frac{1}{5}\epsilon\right) = 2N(\epsilon) = N(\epsilon)\left(\frac{1}{5}\right)^{-D}\end{align*}\] which implies \[\begin{align*} 2N(\epsilon) &= N(\epsilon)\left(\frac{1}{5}\right)^D\\ 2 &= 5^D\\ D &= \frac{\log(2)}{\log(5)}\approx 0.43.\end{align*}\]
Show that the function \(f(x) = x^2\) is a contraction mapping on the domain \([0,\frac{1}{4}]\). Determine the contraction factor of \(f\).
Solution: Let \(x,y\in\left[0,\frac{1}{4}\right]\). Then \[\begin{align*} |f(x) - f(y)| &= |x^2 - y^2|\\ &= |x + y||x - y|\\ &\leq \frac{1}{2} |x-y|.\end{align*}\] Therefore \(f\) is a contraction mapping with contraction factor \(\frac{1}{2}\) on the domain \(\left[0,\frac{1}{4}\right]\).
Consider the image of the Sierpinski carpet, \(S\), shown below. The Sierpinski carpet is a self-similar fractal which means that is a union of contracted copies of itself.
Show (by circling them on the figure) that \(S\) is made up of eight contracted copies of itself. What is the contraction factor of these copies?
Determine the similarity dimension of \(S\).
Solution:
We see that there are eight contracted copies of \(S\), as shown on the following figure. We can also see from the figure that each copy of \(S\) is scaled down by \(\frac{1}{3}\), or has a contraction factor of \(\frac{1}{3}\).
Since \(S\) is made up of eight copies of itself, each scaled by a factor of \(\frac{1}{3}\), the similarity dimension of \(S\) is \[\begin{align*} D = \frac{\log(8)}{\log(3)} \approx 1.89.\end{align*}\]
Consider the image of the modified Sierpinski triangle, \(S\), shown below.
Show (by circling them on the figure) that \(S\) is made up of three contracted copies of itself.
Imagine starting with a right triangle, \(S_0\), which has vertices at \((0,0)\), \((1,0)\), and \((0,1)\). Describe (in terms of contraction factors, translations, rotations, etc...) the three map IFS which you could use to construct \(S\) from \(S_0\).
Determine the similarity dimension of \(S\).
CHALLENGE Describe a fourth map which could be added to the IFS you found in (b) so that the attractor of the IFS is a solid triangular region.
Solution:
We can see from the figure below that \(S\) is made up of three contracted copies of itself.
We can see from the figure that \(S\) is made up of three scaled copies of itself, each contracted by a factor of \(\frac{1}{2}\).
The first map simply scales \(S_0\) by \(\frac{1}{2}\), resulting in the triangle in the bottom left corner. The second map scales \(S_0\) by \(\frac{1}{2}\) and translates it to the right by \(\frac{1}{2}\), resulting in the triangle in the bottom right corner. Finally, the third map scales \(S_0\) by \(\frac{1}{2}\) and translates it upwards by \(\frac{1}{2}\) to form the triangle in the top corner.
The similarity dimension of \(S\) is given by \[\begin{align*} D = \frac{\log(3)}{\log(2)} \approx 1.56.\end{align*}\]
If we want the attractor of the IFS to be a solid triangular region, we need to add a fourth map which will fill up the triangular gap in the middle. We can do this by defining a map which scales \(S_0\) by \(\frac{1}{2}\), rotates it by \(180\degree\) and translates it by \(\frac{1}{2}\) up and to the right.