# Contraction Mapping Theorem # Here we present an example of the contraction mapping theorem # First we define an operator T acting on a function u(x) > restart; > T := u ->unapply(cos(2*Pi*x)+c*u(2*x),x); # The degreee of contraction is governed by the constant c. We set it to some value < 1 > c:= .5; # Lets apply this to the constant function g(x) = 1 several times. > g:= unapply(sin(2*Pi*x),x); > T(g); > T(%); > T(%); > T(%); # Now we'll define a sequence of functions f[j] = T(f[j-1]). We begin with some choice of f[0] > c:=0.5; > N:= 30; > f[0] := x -> sin(4*Pi*x); > for i from 1 to N do > f[i] := T(f[i-1]): > end do: # Here is one of the functions in the sequence > f[9](x); # Now we plot some of the functions. # > plot([f[2](x),f[3](x),f[5](x),f[8](x)],x=0..1, color=[blue,red,green,magenta,aquamarine]); > plot(f[30](x),x=0..1, color=[blue], thickness=1, axesfont=[Times, Roman, 12], labelfont=[Times,Italic,14]); > plot(f[15](x)-f[14](x),x=0..1); > plot(f[30](x)-f[29](x),x=0..1); > > #