In [1]:
T(x) = r*x*(1.0 - x)


Out[1]:
T (generic function with 1 method)

In [2]:
r = 3.8286


Out[2]:
3.8286

In [3]:
f(x) = T(T(x)) - x


Out[3]:
f (generic function with 1 method)

In [4]:
a = 0.1


Out[4]:
0.1

In [5]:
for i = 1:20
    a = i/10
    include("newton.jl")
end


0.0
0.36937203219741077
0.36937203219741077
0.36937203219741077
0.8918200484587038
0.0
0.7388079193438855
0.7388079193438855
0.8918200484587038
0.8918200484587038
0.8918200484587038
0.8918200484587038
0.8918200484587038
0.8918200484587038
0.8918200484587038
0.8918200484587038
0.8918200484587038
0.8918200484587038
0.8918200484587038
0.8918200484587038

In [ ]: