## Liapunov exponent computation

Liapunov exponent method is one of the clever ways to investigate a certain dynamical system to be chaotic. In this post, I shall try to compute Liapunov exponent of one famous discrete dynamical system, i.e. the logistic map. After this, I shall try to compute the Liapunov exponent of a continuous dynamical system.

Actually, I write this post because I want to know how to numerically compute the Liapunov exponent. I often read a book or a website such as wolfram.alpha that shows the Liapunov exponent but it didn’t explain how to get this numerically. After I am able to post this post, and when I forget how to compute this exponent, I’d know where to look.

Suppose we have an initial condition and a nearby initial point , where is an initial difference between initial points, which by the way will be extremely small. These two nearby points will be iterated by some map. Let be the difference between these two points after n iterations. Consider the following equation

(1) … .

The coefficient is called the Liapunov exponent. We want to compute this coefficient. Note that , where is the given map. Taking logarithm of (1), we get

(2) …

as . The term inside the logarithm can be simplified by using the chain rule: . Thus (2) becomes

(3) … .

When , is defined as the Liapunov exponent. When this exponent is positive, it is a sign of a chaotic attractor.

Let us consider the logistic map that was in my previous post here. Let us fix the parameter value r. Starting at a random initial point, we will iterate the initial point until it reaches the steady state (which will be a fixed point, periodic or aperiodic), say 300 iterates. Now we compute a large number iterates, say 10000 and compute (3) starting from the 301st point. Repeat this procedure for the next r. Then we plot the Liapunov exponent with respect to r. We shall find a figure as follows.

As we can see from the above figure. The map is chaotic in some values of parameter between 3.5 to 4, in which the Liapunov exponent is positive.

The code to produce the above figure is the following

`tic; %to compute how long is the computation`

clear;clc; %clear screem and clear all the previous variables

a = 3:0.001:4; %parameter of the logistic map

N = 300; %number of iterations until it is stable

N1 = 10000; %number of iterations to compute the Liapunov exponent

y = zeros(length(a),1); %declares variable for Liapunov exponents

for i=1:length(a)

x(1) = rand; %random initial conditions%

for j = 2:N

x(j) = a(i)*x(j-1)*(1-x(j-1));

end

sum = 0;

for j = 1:N1

x(N+j) = a(i)*x(N+j-1)*(1-x(N+j-1));

sum = sum + log(abs(a(i)-2*a(i)*x(N+j)));

end

y(i) = sum/10000;

fprintf('%d %d\n',i,length(a));

end

plot(a,0); hold on;

plot(a,y); %plot Liapunov exponent against parameter

toc; %display how long computation is

clear

## Your says