<?xml version="1.0" encoding="UTF-8"?>
<Worksheet><Version major="6" minor="1"/><View-Properties><Zoom percentage="100"/></View-Properties><Styles><Layout alignment="left" bullet="none" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="Normal" rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"/><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" name="Maple Input" opaque="false" size="12"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="Text" opaque="false" size="12" underline="false"/></Styles><Group><Input><Text-field alignment="centred" layout="Normal" style="Text"><Font size="18">Animation of Cobweb Diagrams for the Logistic Map</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">with(plots): with(plottools):</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">anim:=proc(b,x0,N) local k,pg,z1,u,z,lg,F;
F:=(x,b)-&gt;b*x*(1-x);
#Set up the graph of F(x,b) as a background plot: 
pg:=plot([x,F(x,b)],x=0..1,color=black,linestyle=4,title=cat("b= ",convert(b,string)));
#Set up the iteration trajectory as an animation:
u:=x0; z1:=[u,0];
lg[0]:=CURVES([z1]);
for k from 1 to N do
z:=F(u,b); z1:=z1,[u,z],[z,z]; u:=z;
lg[k]:=CURVES([z1])
od;
display([seq(lg[k],k=0..N)],insequence=true);
#Finally display the animation and background together:
display({pg,%})
end:</Text-field></Input><Input><Text-field prompt="&gt; " style="Maple Input"/></Input><Input><Text-field prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">anim(4,.45,100);#Try any other reasonable values of b, x0 and N.</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Text-field/><Text-field/></Worksheet>
