I would like to calculate the $δ$ and the $α$ Feigenbaum constants for the Logistic Map:
\begin{equation} x_{n+1}=4μx_n(1-x_n)=f(x_n) \end{equation} as part of an undergraduate assigment of mine. I have managed so far to calculate explicitly the 2-cycle and the value of $\mu$ for which it becomes unstable, leading to the bifurcation of the 4-cycle. My attempt of calculating the $δ$, which is defined as \begin{equation} δ=\lim_{n \to \infty}\frac{μ_{n}-μ_{n+1}}{μ_{n+1}-μ_{n+2}} \end{equation} is given below
f[x_Real, mu_Real, n_Real] := Block[{y = x}, Do[y = 4 mu y (1 - y), {n}]; y]
mu /. FindRoot[f[1/2, mu, 2^2] == 1/2, {mu, 0.9}]
delta[n_] := (mu[n - 1] - mu[n - 2])/(mu[n] - mu[n - 1])
mu[n_] := mu[n] == mu /. FindRoot[f[1/2, mu, 2^n] ==
1/2, {mu, {mu[n - 1] + (mu[n - 1] - mu[n - 2])/delta[n - 1],
mu[n - 1] + (mu[n - 1] - mu[n - 2])/(delta[n - 1] + .01)}},
AccuracyGoal -> 10]
Table[mu[n], {n, 0, 7}]
Table[delta[n], {n, 2, 7}]
I am literally a rookie in the Mathematica software and tbh I have searched online a lot in order to write this piece of code above. Anyway, I am getting an error of the form
$RecursionLimit::reclim: Recursion depth of 1024 exceeded. >>
once I try to calculate the various values of the $μ$-cycles. (for example: mu[3]).
I would really appreciate your assistance. Thanks!
- As you receive help, try to give it too, by answering questions in your area of expertise.
- Take the tour and check the faqs!
- When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign!
– Apr 03 '16 at 17:08mu[n]is recursive, but you didnt define the base casemu[1]anywhere. – AccidentalFourierTransform Apr 03 '16 at 18:36mu[n]includesmu[n-1]. This means that if you ask Mathematica to calculatemu[10], the result will depend onmu[9]which Mathematica doesnt know its value. Therefore, it will computemu[9]to get the value, but this depends onmu[8]which Mathematica doesnt know its value - ad infinitum. If at the begining of your code you includemu[1]=1(for example), then the process ends when the recursion hits the base casemu[1](hope this helps) – AccidentalFourierTransform Apr 03 '16 at 18:57FindRoot[f[1/2, mu, 2^2] == 1/2, {mu, 0.9}]do here, and why's this the right thing to do? (It seems that it is, but I can't see why). – Chris K Apr 04 '16 at 02:25