

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The fixed point iteration method for the logistic function using maple 6. The author investigates the behavior of the function for various parameter values and initial points, discarding the first few iterates and plotting subsequent ones. The document also includes problems for further exploration.
Typology: Assignments
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Bent E. Petersen Filename: 351u2002_logistic.mws
> restart;
We will investigate the fixed point iteration for the logistic function
> f:=(x,c)->cx(1-x);** f :=( x c , )→ c x ( 1 − x )
Here c is a parameter which satisfies 0 <= c <= 4. For these values of c we have 0 <= f(x,c) <= 1 for each x satisfying 0 <= x <= 1, that is, as a function of x, f(x,c) maps the interval [0,1] into itself. Thus by the Intermediate Value Theorem (IVT) f(x,c) is guaranteed to have a fixed point in [0,1]. This fact is not particularly useful here though since the origin is an obvious fixed point, and the IVT doesn’t give us any additional fixed points.
It is not difficult to see that f(x,c) is a contraction map for 0 <= c < 1. In this case we have a unique fixed point and the fixed point iterations will converge very rapidly to the unique fixed point, no matter what initial "guess" we start with. For other values of c it is not clear how the fixed point iterates will behave.
Our goal here is to plot some iterates for various values of c and attempt to describe what we observe. Even in the case of convergence to a fixed point, the first few iterates may depend heavily on the initial point and so may be all over the place. Therefore we discard the first M0 iterates and plot only subsequent iterates.
Here are the values of the parameter c that we will work with. We omit 0 because it is not interesting.:
> N0:=30; # N0 values of c N0 := 30 > Cvals:=[seq(4k/N0, k=1..N0)];*
Cvals
Here are the initial points. We omit 0 because it is a fixed point and so it’s not very exciting.
> M0:=16; # M0 values of x M0 := 16 > Inits:=[seq(k/M0, k=1..M0)];
Inits := 161 , 18 , 163 , 14 , 165 , 38 , 167 , 12 , 169 , 58 , 1116 , 34 , 1316 , 78 , 1516 , 1
> Q0:=3; # Number of iterates to discard Q0 := 3 > R0:=25; # R0 is number of iterates to plot R0 := 25
We loop over the parameter values, c, and the initial points, x0, and for each initial point x0 we do Q0+R0 iterates and discard the first Q0+1 iterates (including x0). The remaining iterates are saved in a list of M0R0N0 points.
**> L:=[]: # list of all points
prec:=6: # precision for k from 1 to nops(Cvals) do c:=evalf(Cvals[k],prec): for j from 1 to nops(Inits) do x0:=evalf(Inits[j],prec): for h from 1 to Q0 do x0:=evalf(f(x0,c),prec): od: for h from 1 to R0 do x0:=evalf(f(x0,c),prec): # compute new point L:=[op(L),[c,x0]]: # push on L od: od: od:**
Let’s plot the points in the list L Here’t the number of points we will be plotting:
> nops(L); M0R0N0;** 12000 12000 > PLOT(POINTS(op(L)),SYMBOL(DIAMOND,12));