In [2]:
# importamos bibliotecas cómputo de matrices
import numpy as np

# importamos bibliotecas para plotear
import matplotlib
import matplotlib.pyplot as plt

# para desplegar los plots en el notebook
%matplotlib inline

In [87]:
# acá lambda=3.65 que es un lugar crítico en la frontera del Caos!
# pero: probad 3.1 y 3.3
def f(x):
    return 3.58*(1-x)*x

x = np.arange(0,1,0.01)

for t in range(2,len(x)-1):
    x[t+1] = f(x[t])
    
figura = plt.plot(  x )
#fig1 = plt.plot([x[t] for t in range(999)], [x[t+1] for t in range(999)])
# fig2 = plt.plot(f(x), f(f(x)))



In [19]:
def f(x):
    if 0 <= x and x<=0.5:
        return 2 * x
    elif 0.5 <= x and x <= 1:
        return 2 - (2 * x)
    
x = np.arange(0,1,0.001)
figura = plt.plot(x, [f(y) for y in x])
figura = plt.plot(x, x)



In [29]:
figura = plt.plot(x, x)
figura = plt.plot(x, [f(y) for y in x])
figura = plt.plot(x, [f(f(y)) for y in x])
figura = plt.plot(x, [f(f(f(y))) for y in x])
figura = plt.plot(x, [f(f(f(f(y)))) for y in x])
figura = plt.plot(x, [f(f(f(f(f(y))))) for y in x])



In [ ]:
fig = plt.plot()

Cuasiperiodicidad

con b = 1 / pi


In [40]:
def f(x, b):
    return (x + b)%1
y = np.arange(0,1,0.01)
x = [0.4,]
x1 = [0.4,]
b = 1/np.pi

for t in range(len(y)-1):
    x.append(f(x[t], b))
    x1.append(f(f(x[t], b), b))
fig = plt.plot(y,y, color="orange")
fig = plt.plot(y,x)
fig = plt.plot(y, x1)


con b = sqrt(2)


In [42]:
x = [0.4,]
x1 = [0.4,]
b = np.sqrt(2)

for t in range(len(y)-1):
    x.append(f(x[t], b))
    x1.append(f(f(x[t], b), b))
fig = plt.plot(y,y, color="orange")
fig = plt.plot(y,x)
fig = plt.plot(y, x1)


Out[42]:
2.718281828459045

con b=e


In [44]:
x = [0.4,]
x1 = [0.4,]
b = np.e

for t in range(len(y)-1):
    x.append(f(x[t], b))
    x1.append(f(f(x[t], b), b))
fig = plt.plot(y,y, color="orange")
fig = plt.plot(y,x)
fig = plt.plot(y, x1)


población de moscas


In [75]:
def f(x):
    r=0.25
    K=15
    if x < K:
        return 0.01 * (x**2)
    elif x >= K:
        return 0.01*(K**2)*np.exp(-r*(x-K))

        
x = [9,]
for t in range(30):
    x.append(f(x[t]))
fig=plt.plot(x)