Вы находитесь на странице: 1из 25

Facultad de Ingeniería y Tecnologías – Universidad Católica del Uruguay

Maestría en Gerencia de la Energía

Science, Religion and the


Limits of Knowledge
Project 4: The "Butterfly Effect" and Intermittency
Álvaro Castro

Professor: Aleksandar Zecevic

2015
Problem 1. Consider the second order system

𝑥1̇ = −3𝑥1 + 4𝑥12 − 0.5𝑥1 𝑥2 − 𝑥13

𝑥2̇ = −2.1𝑥2 + 𝑥1 𝑥2

(a) Solve the equation numerically for initial condition: x0 = [4; 1], using t = 0 : 0.01 : 50.
Repeat this process with initial condition
y0 = x0 + 1e − 4 ∗ [1; 1]
which differs from the previous one at the fourth decimal point. To evaluate the difference
between these two solutions (whose components will be denoted [x1; x2] and [y1; y2],
respectively)
plot x1−y1 as a function of time. Would you say that a small perturbation in the initial
conditions
produces a small change in the solution, or is the change substantial?
(b) Repeat part (a) of the problem using initial condition
y0 = x0 + 1e − 8 ∗ [1; 1]
and plot x1 − y1 as a function of time. Do your results confirm your previous conclusions?
Explain.
Solution:
a) At Sci Notes we must put:

function y=dem2(t, x)
y(1)=-3*x(1)+4*x(1)*x(1)-0.5*x(1)*x(2)-x(1)*x(1)*x(1);
y(2)=-2.1*x(2)+x(1)*x(2);
endfunction

Then, at the workspace we have to write the next commands:

t0=0;
x0=[4;1];
t=0:0.01:50;
y=ode(x0,t0,t,list(dem2));

x1=y(1,:);

x2=y(2,:);

y0=[4;1]+exp(-4)*[1;1];

y=ode(y0,t0,t,list(dem2));

q1=y(1,:);

q2=y(2,:);

plot(t,x1,t,q1)

plot(t,x2,t,q2)
For x1(t) and y1(t) the solutions are:

For x2(t) and y2(t) the solutions are:


To see the difference between x1 and y1 we must input the following command at the
workspace:
plot(t,x1-q1)

plot x1-y1

In this case, the small perturbation produces a small (but bigger) disturbance in the output,
only at the start. I think it is a substantial change.

b) At the workspace we have to write the next commands:

t0=0;
x0=[4;1];
t=0:0.01:50;
y=ode(x0,t0,t,list(dem2));

x1=y(1,:);

x2=y(2,:);

y0=[4;1]+exp(-8)*[1;1];

y=ode(y0,t0,t,list(dem2));

q1=y(1,:);

q2=y(2,:);

plot(t,x1-q1)
The solution is the following:

In this case, a small perturbation in the initial conditions produces a small change in the
solution.
Problem 2. Consider the second order system

𝑥1̇ = 𝑥2

𝑥2̇ = (1 − 𝑥12 )𝑥2 − 𝑥1

(a) Solve the equation numerically for initial condition: x0 = [−1.5; 3.5], using t = 0 : 0.01 : 10.
Repeat this process with initial condition
y0 = x0 + 1e − 4 ∗ [1; 1]
and plot x1 − y1 as a function of time. Would you say that a small perturbation in the initial
conditions produces a small change in the solution?
(b) Repeat part (a) of the problem using initial condition
y0 = x0 + 1e − 8 ∗ [1; 1]
and plot x1 − y1 as a function of time. Do your results confirm your previous conclusions?
Explain.

Solution:
a) At Sci Notes we must put:

function y=dem2(t, x)
y(1)= x(2);
y(2)=(1-x(1)*x(1))*x(2)-x(1);
endfunction

Then, at the workspace we have to write the next commands:

t0=0;
x0=[-1.5;3.5];
t=0:0.01:10;
y=ode(x0,t0,t,list(dem2));

x1=y(1,:);

x2=y(2,:);

y0=[-1.5;3.5]+exp(-4)*[1;1];

y=ode(y0,t0,t,list(dem2));

q1=y(1,:);

q2=y(2,:);

plot(t,x1,t,q1)

plot(t,x2,t,q2)
For x1(t) and y1(t) the solutions are:

For x2(t) and y2(t) the solutions are:


To see the difference between x1 and y1 we must input the following command at the
workspace:

plot(t,x1-q1)

plot x1-y1
I think that this image shows that a small perturbation produces a small but notified
disturbance at the start of the behavior.

b) At the workspace we have to write the next commands:

t0=0;
x0=[-1.5;3.5];
t=0:0.01:10;
y=ode(x0,t0,t,list(dem2));

x1=y(1,:);

x2=y(2,:);

y0=[-1.5;3.5]+exp(-8)*[1;1];

y=ode(y0,t0,t,list(dem2));

q1=y(1,:);

q2=y(2,:);

plot(t,x1-q1)

The solution is the following:


This shows that a smaller perturbation still makes a smaller, yet also clear disturbance at the
start. But I think it is not substantial

Problem 3. Consider the second order system


𝑥1̇ = 𝑥2

𝑥2̇ = (1 − 𝑥12 )𝑥2 − 𝑥1 + 0.5𝑐𝑜𝑠2𝑡

(a) Solve the equation numerically for initial condition: x0 = [−1.5; 3.5], using t = 0 : 0.01 : 50.
Repeat this process with initial condition
y0 = x0 + 1e − 4 ∗ [1; 1]
and plot x1 − y1 as a function of time. Would you say that a small perturbation in the initial
conditions produces a small change in the solution?
(b) Repeat part (a) of the problem using initial condition
y0 = x0 + 1e − 8 ∗ [1; 1]
and plot x1 −y1 as a function of time (use t = 0 : 0.01 : 10 in this case). Do your results confirm
your previous conclusions? Explain.

Solution:
a) At Sci Notes we must put:

function y=dem2(t, x)
y(1)= x(2);
y(2)=(1-x(1)*x(1))*x(2)-x(1)+0.5*cos(2*t);
endfunction

Then, at the workspace we have to write the next commands:

t0=0;
x0=[-1.5;3.5];
t=0:0.01:50;
y=ode(x0,t0,t,list(dem2));

x1=y(1,:);

x2=y(2,:);

y0=[-1.5;3.5]+exp(-4)*[1;1];

y=ode(y0,t0,t,list(dem2));

q1=y(1,:);

q2=y(2,:);

plot(t,x1,t,q1)

plot(t,x2,t,q2)
For x1(t) and y1(t) the solutions are:

For x2(t) and y2(t) the solutions are:


To see the difference between x1 and y1 we must input the following command at the
workspace:

plot(t,x1-q1)

plot x1-y1

With this problem the initial condition shows that a small perturbation produces a more
significant and durable perturbation, yet it is still a small change.

b) At the workspace we have to write the next commands:

t0=0;
x0=[-1.5;3.5];
t=0:0.01:10;
y=ode(x0,t0,t,list(dem2));

x1=y(1,:);

x2=y(2,:);

y0=[-1.5;3.5]+exp(-8)*[1;1];

y=ode(y0,t0,t,list(dem2));

q1=y(1,:);

q2=y(2,:);

plot(t,x1-q1)
The solution is the following:

This shows the same result than the part a) but with smaller impact
Problem 4. Consider the third order system

𝑥1̇ = −10𝑥1 + 10𝑥2

𝑥2̇ = −𝑥1 𝑥3 + 28𝑥1 − 𝑥2

𝑥3̇ = 𝑥1 𝑥2 − 2.5𝑥3

(a) Solve the equation numerically for initial condition: x0 = [1; 1; 1], using t = 0 : 0.01 : 100.
Repeat this process with initial condition
y0 = x0 + 1e − 4 ∗ [1; 1; 1]
and plot x1 − y1 as a function of time. Would you say that a small perturbation in the initial
conditions produces a small change in the solution?
(b) Repeat part (a) of the problem using initial conditions
z0 = x0 + 1e − 8 ∗ [1; 1; 1]
and
w0 = x0 + 1e − 12 ∗ [1; 1; 1]
(we will denote the corresponding solutions by [z1; z2; z3] and [w1;w2;w3], respectively). Plot
x1 −z1 and x1 −w1 as functions of time, and use these graphs to evaluate whether your
previous
conclusions about the system’s sensitivity to initial conditions are still valid.
(c) Based on the results obtained in parts (a) and (b), would you say that this system is
hypersensitive to differences in initial conditions? If not, is it in any way different from the
ones considered in Problems 1-3? Explain.

Solution:
a) At Sci Notes we must put:

function y=dem2(t, x)
y(1)= -10*x(1)+10*x(2);
y(2)=-x(1)*x(3)+28*x(1)-x(2);
y(3)=x(1)*x(2)-2.5*x(3);
endfunction

Then, at the workspace we have to write the next commands:

t0=0;
x0=[1;1;1];
t=0:0.01:100;
y=ode(x0,t0,t,list(dem2));

x1=y(1,:);

x2=y(2,:);

x3=y(3,:);
y0=[1;1;1]+exp(-4)*[1;1;1];

y=ode(y0,t0,t,list(dem2));

q1=y(1,:);

q2=y(2,:);

q3=y(3,:);

To see the difference between x1 and y1 we must input the following command at the
workspace:

plot(t,x1-q1)

plot x1-y1

This shows that this perturbation produce no effect at the beginning but it alters the
behavior after15 seconds.

b) At the workspace:
t0=0;
x0=[1;1;1];
t=0:0.01:100;
y=ode(x0,t0,t,list(dem2));

x1=y(1,:);

x2=y(2,:);

x3=y(3,:);
z0=[1;1;1]+exp(-8)*[1;1;1];

y=ode(z0,t0,t,list(dem2));

z1=y(1,:);

z2=y(2,:);

z3=y(3,:);

w0=[1;1;1]+exp(-12)*[1;1;1];

y=ode(w0,t0,t,list(dem2));

w1=y(1,:);

w2=y(2,:);

w3=y(3,:);

To see the difference between x1 and z1 we must input the following command at the
workspace:

plot(t,x1-z1)

The behavior of the system is approximately the same as in part a)


To see the difference between x1 and w1 we must input the following command at the
workspace:

plot(t,x1-w1)

The behavior of the system is still the same as in part a)

c) Based on the results obtained in parts (a) and (b), I would say that this system is not
hypersensitive to differences in initial conditions. The behavior does not change with the
different initial conditions. Whereas in the above problems at a small initial perturbation
had major changes in this case the opposite happens. The only difference is the delay on
time. Besides that, the behavior is similar with the different initial conditions.
Problem 5. In this problem we will consider the first order discrete system
x(k + 1) = px(k)[1 − x(k)]
in which parameter p is set to equal 3.9 (recall that we already analyzed this system in Project
3).
(a) Solve the equation numerically for initial condition x(0) = 0.5, using k0 = 0 and kvect =
0 : 1 : 250. Repeat this process with initial condition
y0 = 0.5 + 1e − 4
and plot the difference x − y using function
plot(kvect, x − y, kvect, x − y, ‘.’)
Would you say that a small perturbation in the initial conditions produces a small change in the
solution?
(b) Repeat part (a) of the problem using initial condition
z0 = 0.5 + 1e − 8
(following our previous notation, we will denote the corresponding solution by z). Plot the
difference x − z as a function of k. Are your results consistent with your previous conclusions?
(c) Based on the graphs obtained in parts (a) and (b), would you say that hypersensitivity to
initial conditions can occur even in a simple first order discrete system? Does this surprise you?
Explain.

Solution:
a) At Sci Notes:

function y=dem3(t, x, p)
y=p*x*(1-x);
endfunction

Then at the workspace:


x0 = 0.5;
k0 = 0;
p = 3.9;
kvect = 0:1:250;
x=ode('discrete',x0,k0,kvect,list(dem3,p));
y0=0.5+exp(-4);
y=ode('discrete',y0,k0,kvect,list(dem3,p));

plot(kvect, x - y, kvect, x - y, '.')


The plot obtained:

It seems that a small perturbation in the initial conditions produce small changes in the
solution.

b) At the workspace:
x0 = 0.5;
k0 = 0;
p = 3.9;
kvect = 0:1:250;
x=ode('discrete',x0,k0,kvect,list(dem3,p));
z0=0.5+exp(-8);
z=ode('discrete',z0,k0,kvect,list(dem3,p));

plot(kvect, x - z, kvect, x - z, '.')


The plot obtained:

It seems that a small perturbation in the initial conditions produce small changes in the
solution. This shows that perturbation produce variations on the system

c) I am not surprise because of the hypersensitive since this types of systems can vary
depending on the initial conditions.
Problem 6. In this problem we will consider the same system as in Problem 5, and focus on
values of parameter p in the range 3.82 ≤ p ≤ 3.83.

(a) Set p = 3.82, and solve the equation numerically for initial condition is x(0) = 0.5 (with
k0 = 0 and kvect = 0 : 1 : 500). Plot x(k) as a function of k, and use this graph to determine
whether or not the solution displays any form of regularity.
Note: To keep the graph as simple as possible, use the command
plot(kvect, x)
instead of
plot(kvect, x, kvect, x, ‘.’)
(b) Repeat part (a) with p = 3.83, and plot x(k) as a function of k. How does this solution
compare to the one obtained using p = 3.82? Explain.
Note: For a better resolution, set the data bounds for the x -axis to [0 100].
(c) For some value p0 between 3.82 and 3.83, the system makes a transition from random to
orderly dynamic behavior. Find a value of p that is sufficiently close to p0 to produce a graph
of the form shown in Fig. 1. Adjusting the data bounds for the x -axis to [350 500] provides a
closer look at the irregular segment of this solution, which is shown in Fig. 2.
Note: You will need to specify p using at least 5 decimals replicate this plot.
(d) If you were to empirically observe the behavior shown in Fig. 1 over a long period of time
(where k could be interpreted as the number of months, for example), how would you
interpret
it? Would you say that your data conforms to a “law”? If so, how would you explain the
irregularities that occur between k = 410 and k = 430? If not, how would you explain the long
intervals orderly behavior?

Solution:
a) function y=dem3(t, x, p)
y=p*x*(1-x);
endfunction

Then at the workspace:


x0 = 0.5;
k0 = 0;
p = 3.82;
kvect = 0:1: 500;
x=ode('discrete',x0,k0,kvect,list(dem3,p));
plot(kvect, x)
The plot obtained:

I don’t think this shows any type of regularity.

b) At the workspace:
x0 = 0.5;
k0 = 0;
p = 3.83;
kvect = 0:1: 500;
x=ode('discrete',x0,k0,kvect,list(dem3,p));
plot(kvect, x)

The plot obtained


This shows a more regular behavior.
c) p= 3.82842 produces this behavior

At the workspace:
x0 = 0.5;
k0 = 0;
p = 3.82842;
kvect = 0:1: 500;
x=ode('discrete',x0,k0,kvect,list(dem3,p));
plot(kvect, x)
The plot obtained is:

Which is really similar

d) For me, the plot of figure 1 (similar to mine above), shows a regular behavior that can
represented with a natural law, it is repeated on time (it has a period), I could think for
instance in the harvest time, there are times when you can harvest and other where you
don’t.
The behavior that occurs at 410 can represent some nature acts that comes from nowhere
representing unexpected events. Maybe our nature it’s represented by systems like this,
where are close to the regular system but not yet. So every so often this behavior can occur
and its maybe because of this.

This could be represented as the "butterfly effect", the possibility that something as
insignificant as the movement of a butterfly’s wings could ultimately affect global weather
patterns

Вам также может понравиться