In a previous post I’d shown a way to get the Lyapunov exponent from the time series data of any map. In this quick tutorial, I’ll show you a cleaner way to get the Lyapunov exponent for the specific case of the logistic map, and then using a really short script in Mathematica, plot it against r.

First the mathematical analysis that simplifies the expression for the Lyapunov exponent for a map, and particularly the logistic map. This discussion follows this article.

Suppose the initial infinitesimal perturbation is . Then we have, for :

.

But we can write:

where each . So we have:

Therefore,

For the logistic map, .

So we have:

.

We can put the above formula in a short Mathematica script to obtain as a function of and plot it. The following is the code:

\[Lambda][r_] := Module[{f, l},
f[x_] := r x (1 - x);
l[x_] := Log[Abs[r (1 - 2 x)]];
Mean[l[NestList[f, 0.1, 1*^2]]]];
Plot[\[Lambda][r], {r, 0, 4}, PlotStyle -> Thickness[.0001],
AxesLabel -> {"r", "\[Lambda](r)"}]

And the following is the output:

In the line that uses `Nestlist`

, we specify the starting point of the trajectories. However, I noticed that the output does not depend on the starting point.

### Like this:

Like Loading...

*Related*

Pingback: Calculating the Lyapunov Exponent of a Time Series (with python code) | One Life

Hi, very good. But, and of system dynamics, i. e., flow?

LikeLike

Is it l or f ? in the function

LikeLike

if the function is sin(x) then can you draw it graphically its lyaponuv exponent?

LikeLike