Docstoc

Jason Eckert

Document Sample
Jason Eckert Powered By Docstoc
					    Drawing the Mandelbrot Set



            Jason Eckert



Senior Seminar (Math 4901) (2007-08)

       Advisor: David Roberts

   Second Reader: Byoung Khang

   University of Minnesota, Morris

            Spring 2008
                              Drawing the Mandelbrot Set




                                 1. The Mandelbrot Set

       The Mandelbrot set, which I may refer to as just simply M, comes up when

studying complex quadratic polynomials. First we take a complex number c. We can start

at any c and then square it and add c. We take this value and square it once again and add

c once again, and continue doing the same. That is, we apply the process,

                             c  (c2+c)  (c2+c)2+c  …

to a complex number, c. If this sequence is bounded, then c is part of M.

Definition 1.1) The Mandelbrot Set, M, is the set of complex c-values for which the orbit

of 0 under iteration of the complex quadratic polynomial xn+1 = xn2 + c remains bounded.

                                            Figure 1.




                                            2
                                           Jason Eckert


        Example 1.1

For c = -2, (-22-2) = 0  (02-2) = -2  0.

        We can see that -2 two has a repeating cycle. Therefore, -2 is bounded and is part

of M. We can also do this for all complex numbers.

        Example 1.2

For c = -i, [(-i)2-i] = -1-i  [(-1-i)2 -i ]= i [ (i)2-i] = -1-i

        In this example, we see that –i goes to -1-i and then to i. It then goes back to -1-i.

Therefore –i has a repeating cycle and is bounded. See figure 1 for the graph of M.

        When we calculate M, we get the graph shown above on the complex plane. My

goals are to draw the Mandelbrot set using the techniques described in (1) and (2) and

perhaps one application of this will be to find a close estimate of the area of M. This is a

challenge since the boundary of M is so jagged and spiky with antenna and deep crevices

that meet at a single point. I was not able to calculate an estimate of M since I found that

I did not have the computer power to do so. I was able to come up with some

Mathematica code to that forms a close outline of M.

        My plan is to take the procedures used in two different math papers and combine

them in such a way to come up with a close outline of M. The first paper is by John H.

Ewing and Glenn Schober titled The Area of the Mandelbrot Set. The other is by Robert

L. Devaney called The Mandelbrot Set, The Farey Tree, and the Fibonacci Sequence,

which I will use certain parts of.

                                       2. Outer Rationals

        Ewing and Schober’s paper discovers an upper bound to the area of M. It’s in the

form of an algorithm. It’s made up mostly of an infinite power series in which they




                                                  3
                                     Drawing the Mandelbrot Set


calculated the 240,000 coefficients to get a close estimate. I was able to convert the

paper’s results into Mathematica code to calculate the coefficients and get an estimate of

my own. I was not able to calculate nearly as many coefficients.


         The bm’s are the coefficients we need for the power series. The bm’s are equal to

β0, m+1 for m ≥ 0, and we find the β’s from the following equation:

                        β0, m = 1/2 [β1, m – ( ∑k=1, m-1β0, k* β0, m-k ) - β0, m-1]

The β’s also have the following constraints:

                                         βn, 0 = 1 for all cases

                                   βn, m = 0 for 1≤m≤2n+1-2 and n≥1

Using these constraints, we can calculate our b’s.

         Example 2.1

b0 = β0, 1 = 1/2 (β1, 1 – β0, 0)

(Since the summation doesn’t come into effect with k going from 1 to 0.) We then get:

= 1/2 (0-1) = -1/2. We have our first b.

         Example 2.2

b1 = β0, 2 = 1/2 [β1, 2 – ( ∑k=1 β0, k* β0, 2-k) – β0, 1]

= 1/2 (0 – (β0, 12 )– (-1/2)) = 1/2 (-1/4 + 1/2) = 1/8

         Here are the bm’s and β’s in Mathematica code:

Program 2.1)    beta[n_,m_]:=beta[n,m]=Which
      [m0,1,m1&&m(2^(n+1)-2)&&n1,0,
      n0&&m1,-1/2,m((2^(n+1))-1)&&n0,
      (1/2)*(beta[n+1,m]-Sum[beta[n,k]*beta[n,m-k],
      {k,(2^(n+1))-1,m-(2^(n+1))+1}]-beta[0,m-(2^(n+1))+1])]


Program 2.2)               b[m_]:=b[m]=beta[0,m+1]



                                                     4
        Jason Eckert


         Table 1.

m   b        m*b




             5
                                Drawing the Mandelbrot Set


       The first 50 of our bm’s are located in the Table 1. We can see that there’s a

pattern where b = 0. Zero keeps appearing no matter how big m gets. In (1), it proposes

and proves the pattern is if k and v are any integers satisfying k≥0 and 2v≥k+3 and if

m = (2k+1)2v, then bm = 0. It also proposes some other patterns found in the b’s. Also in

the appendix are our bm’s multiplied by m. We can see all the values don’t fluctuate much

and in (1) it finds that -1<mbm<1. Also in Figure 2, which is Fig. 1 of (1), we see a graph

of mbm against m as well as a frequency distribution graph. If we look at the frequency

distribution graph, it appears to be very close to a bell curve

                                          Figure 2.




                                              6
                                      Jason Eckert


        Below is the Mathematica code for our infinite power series, ψ(z):

Program 2.3)             psi[cut_,z_]:=z+Sum[b[i]/z^i,{i,0,cut}]

        Notice our z variable is a denominator. This makes it different from most power

series. It converges for large values of z and diverges for z <1. Our cut is the number we

choose for how long we want our power series, in which a coefficient, b, is found for

each.

        We can create a graph in Mathematica using the following code:

Program 2.4)   UpBoundM[r_,cut_]:=UpBoundM[r,cut]=
ParametricPlot
[{Re[psi[cut,r Cos[t]+I Sin[t]]],
  Im[psi[cut,r Cos[t]+I Sin[t]]]},{t,0,2 Pi},
AxesFalse,FrameTrue]


                                        Figure 3.

This image is produed by: UpBoundM[1,1000]


             1.0




             0.5




             0.0




            0.5




            1.0


                   2.0      1.5         1.0          0.5        0.0          0.5




                                              7
                               Drawing the Mandelbrot Set


       Above is what appears to be an upper bound of M. I’m able to calculate up to

about 1000 b’s, which is what our cut is. When I looked at different graphs of

UpBoundM for different values of cut and r, they appear to look like saran wrap was

placed around M. So it gets caught on the spikes and antenna of M and doesn’t get into

the crevices, which is the main reason why it appears to be an upper bound. The values at

the far end points of the spikes and antenna nearly match M’s endpoints as we can see in

Table 2. We can find the actual values of M by finding the roots of the polynomials made

up of our function c2 + c, then we can compare them to the what we have in ψ(z). We can

see that the difference between our approximate value and the exact value is within 3

decimal places or more. We also find that our approximate values get closer to the actual

values of M if we take a larger cut.




                                           8
                                        Jason Eckert


        Here are eight different graphs for r equals 1.7 to 1, each differs by .1 and the cut

is 1000:

                                             Figure 4.


  1.0




  0.5




  0.0




 0.5




 1.0

                   2.0        1.5          1.0           0.5        0.0          0.5            1.0

        We can see it appears to wrap around M tighter and tighter as r decreases and gets

closer to one. For r = 1.7, cut hardly matters at all. At r = 1, we see a drastic difference.

If we put in a higher cut, that is if we put in more terms, it gives more accuracy.

        We can also change the cut. It appears that cut doesn’t affect our graph in the

same way as r. The graph doesn’t change as drastically for different values of cut as it

does for different values of r. Here is a graph for two different values of cut at 500 and

2500 and r as 1:




                                              9
                               Drawing the Mandelbrot Set


                                              Figure 5.


  1.0




  0.5




  0.0




  0.5




  1.0


        2.0            1.5              1.0               0.5           0.0             0.5

        We can see that the graph with the 2500 cut is more detailed than the 500 cut

graph, but this is with a difference of 2000. This is a large difference but the graphs don’t

show a drastic change. This is why the power series needs to go to infinite to truly be

correct. In (1) they were able to go out to 240,000 for their cut with a super computer.

We don’t have a super computer so we’ll use 1,000 for our cut.

        The below Mathematica code I created in order to get certain point values and

where t goes from 0 to 1 instead of 0 to 2π. See Table 2 for certain t values.

Program 2.5)           ps[t_]:=psi[1000,N[E^(2 Pi I t)]]




                                              10
                                       Jason Eckert


         An interesting fact about M is that at the t’s with an even denominator we get the

end points of its antenna. With this information we can get the values of these endpoints

according to t. See Table 2. I created a Mathematica code to do so as well:

Program 2.6)    outerpairs =
      Table[{j/2^10,ps[j/2^10]},{j,1,1024}]


                                         Table 2.

     t          ψ(z) C-Value       M’s C-Value          Polynomial      | ψ(z) C-Value –

               (Approximate)          (Exact)                           M’s C-Value|

    1/2          -1.99995                -2                 c-2         0.0000502072

    1/4          -0.228465         -0.228155           c3+2c2+2c+2       0.000057409

                 +1.11514i         +1.115143i

    1/8          0.344354           0.343907          c7+4c6+6c5+6c4     0.000367265

                +0.699991i         +0.700620i         +6c3+4c2+2c+2

    3/8          -1.29628          -1.296355                            0.0000473673

                +0.441935i         +0.441851i

   1/16          0.444652           0.444557           c15+8c14+28c13    0.000870259

                +0.411113i         +0.409933i          +60c12+94c11

   3/16         -0.0168513         -0.0171879          +116c10+114c9     0.000197485

                 +1.03786i         +1.037652i           +94c8+70c7

   5/16          -0.636714         -0.636754          +48c6+32c5+20c4    0.000157359

                +0.684854i         +0.685031i         +10c3+4c2+2c+2

   7/16          -1.77141          -1.771257                             0.000154326

                +0.066321i         +0.066161i




                                              11
                               Drawing the Mandelbrot Set


       This gives us two numbers. First it gives us our outer rational, then it gives us the

complex value of our outer rational on our graph of M. Using a ListPlot and also

PlotJoined, we can get a graph of M. Using the Mathematica code below, we can see

where a certain outerpair is on our UpBoundM graph:

Program 2.7)   point[t_]:=Show[UpBoundM[1,1000],
  Graphics[{PointSize[.014],Point[{Re[ps[t]],Im[ps[t]]}]}]]


       In this graph, the point where t = 1/4 is shown:

                                        Figure 6.


       1.0




       0.5




       0.0




       0.5




       1.0


             2.0         1.5            1.0           0.5          0.0            0.5




                                              12
                                      Jason Eckert




      Here is a Listplot for all of our outerpairs. We can see that it outlines M:

                                            Figure 7.



1.0




0.5




0.0




0.5




1.0


      2.0            1.5              1.0               0.5            0.0           0.5




                                            13
                                    Drawing the Mandelbrot Set


                                        3. Inner Rationals

       By using techniques in (2), we need to find the values for where the crevices are.

These are where pieces of M attach to the main cardioid of M, that is where the smaller

bulbs of M attach to the biggest piece of M. Attached to the main cardioid are bulbs that

touch the cardioid at a single point. We want to be able to find these points and then have

them match up with our outerpairs when we graph it. Here’s a parametrization of the

main cardioid:

                                                Figure 8.

                                                                0.6




                                                                0.4




                                                                0.2




                              0.6      0.4          0.2                    0.2   0.4




                                                               0.2




                                                               0.4




                                                               0.6




       The inner rationals are p/q and for our algorithm, let R denote rotation of the unit

circle through p/q turns in
                                             2πi(p/q)         2πi(t+p/q)
                                      R(e               )=e




                                                        14
                                       Jason Eckert


with p/q of a turn. In (2) it shows how to find the inner rationals of the main cardioid and

how to get the corresponding outer rationals which are all going to have odd

denominators. First, we are able to find the inner rationals of the main cardioid.

       The denominator q determines how long the p/q cycle around the unit circle is

before it starts to repeat. So 1/4 has a cycle of 4 elements since q = 4. We can see this in

the following pictures of the Mandelbrot Set. The numbers shown are the orbit of c in

each bulb, these are our q’s:

       In Figure 9, we can see our inner rationals 1/3, 1/4, 1/5, and so on in the upper

right part of the main cardioid.

                                         Figure 9.

                (Taken from The Fractal Geometry of the Mandelbrot Set)




                                             15
                               Drawing the Mandelbrot Set


       Here’s the upper left part of the main cardioid. We can still see 1/3 as well as 1/2,

2/5, and so on.

                                            Figure 10.




       We can then get these rational numbers in the same terms as our outer rationals,

so we can eventually graph them together. In (2), it explains how to do this using binary.

We will get two outer pairs for each inner pair since one of the outer pairs will match the

point the bulb touches the cardioid and then as t increases the point will travel around the

bulb and land at the same point once again. For example, our inner rational 1/2 has the

two outer rationals 1/3 and 2/3. The outer rationals will always have the same

denominator and a difference of one in the numerator. We can see this in Figure 11.




                                            16
                                          Jason Eckert


                                           Figure 11.

                (From http://www.mi.sanu.ac.yu/vismath/jaynew/fig05.jpg)




        We get the lower outer rational from the inner rational using the method in

Devaney’s paper, which is defined as:

                               I-0 = (0 ,1-p/q] and I-1 = (1-p/q ,1].

Let t be an element of p/q’s orbit of the unit circle. If t falls in the interval I-0, then t is set

equal to zero. Otherwise, if t falls in I-1, then t is set equal to one. This is the lower

partition. We then define s-(p/q) as the itinerary of p/q under its orbit of the unit circle or



                                                17
                                  Drawing the Mandelbrot Set


for all t. The series s-(p/q) is called the lower itinerary of p/q since we will find the lower

outer rationals from this. Refer to Table 2.

        Example 3.1

s-(1/4) = 0001 since I-0 = (0, 3/4] and I-1 = (3/4, 1].

Our cycle is 1/4 -> 1/2 -> 3/4 -> 1. We get this by adding p/q until it repeats.

So 1/4 = 0 since it is in the partition I-0, 1/2 = 0, 3/4 = 0, and 1 = 1 since it is in I-1.

        The upper partition differs from the lower partition only at the endpoints. It’s

defined as:

                                   I+0 = [0 , 1-p/q) and I+1 = [1-p/q,1).

        Then s+(p/q) is our upper itinerary of p/q.

        Example 3.2

s+(1/4) = 0010 since I+0 = [0,3/4) and I+1 = [3/4, 1).

        Our cycle is the same as the lower itinerary, but we get different values for our

last two elements in the cycle.

        The series s-(p/q) and s+(p/q) differ only for their last two digits for q greater than

or equal to 2. This is because they form the endpoints of the two partitions of the cycle.

Knowing this, we can just calculate one of the two itineraries and if it ends in 01, then the

other ends in 10, or vice versa. We can see in Table 3 that 0 does not have two outer

rationals; this is because it is an end point of the unit circle.




                                                 18
                                          Jason Eckert


                                           Table 3.

  inner rat.           s-            s+            1st outer rat.    2nd outer rat.     complex val.

      0                 0            0                    0                  0                  1/4

     1/5              00001        00010               1/31              2/31              0.35676
                                                                                          +0.32858i
     1/4              0001          0010               1/15              2/15              1/4 + i/2

     1/3               001          010                 1/7                  2/7         -1/8 +3i√3/8

     2/5              01001        01010               9/31              10/31            -0.48176
                                                                                          +0.53165i
     1/2               01            10                 1/3                  2/3             -3/4

     2/3               101          110                 5/7                  6/7         -1/8-3 i√3/8

     3/4              1101          1110              13/15              14/15                 1/4-i/2



          Now, we have our upper and lower itineraries in a form with modulus 2. In order

to convert this series of 1’s and 0’s into an outer rational, we add a decimal point to the

front of the series so it is a fraction. We then make it a repeating series. For example,

s-(1/4)    =   0001    becomes   0.0001     and    then       we    repeat    the     series     to      get

0.000100010001…We then interpret this in base 2. This may be hard to do by hand, so I

was also able to create Mathematica code for these.

Program 3.1)            adjustedmod[r_]:=If[IntegerQ[r],1,Mod[r,1]]

Program 3.2)    lower[r_,i_]:=Module[{hold},
      hold=adjustedmod[i r];If[hold1-r,0,1]]

Program 3.3)            lowers[r_]:=Table[lower[r,i],{i,1,500}]

Program 3.4)    upper[r_,i_]:=Module[{hold},hold=Mod[i r,1];
      If[hold<1-r,0,1]]

Program 3.5)            uppers[r_]:=Table[upper[r,i],{i,1,500}]



                                              19
                               Drawing the Mandelbrot Set


       The Mathematica commands lowers and uppers output our lower and upper

itinerary series, respectively, when we input our r, which is our inner rational. Now we

can make a code that just gives us the outer rationals when we input our inner rationals.

Program 3.6)    lowerrat[r_]:=
      Rationalize[N[FromDigits[lowers[r],2]/2^500,50]]

Program 3.7)    upperrat[r_]:=
      Rationalize[N[FromDigits[uppers[r],2]/2^500,50]]


       The Mathematica commands lowerrat and upperrat give us the outer rational

when we input the inner rational. Now we can find them easily.

       We also want to find the complex values corresponding to each inner rational. We

find the complex values by using the following Mathematica code:

Program 3.8)    g[u_]=
      (1/4-(1-Cos[2*Pi*u])^2/4+Sin[2*Pi*u]^2/4)
      +(((1-Cos[2*Pi*u])*Sin[2*Pi*u])/4)2I


       We input our inner rational into g[u] and it gives us the complex value of our

inner rational on M. Now, we put these complex values into pairs with their

corresponding inner rational using the following Mathematica code:

Program 3.9)    lowerpairs=
      Flatten[Table[{lowerrat[p/q],N[g[p/q]]},
      {q,1,40},{p,0,q}],1] //Union;

Program 3.10)   upperpairs=
      Flatten[Table[{upperrat[p/q],N[g[p/q]]},
      {q,1,40},{p,0,q}],1] //Union;


       We can now join our lower and upper pairs together to get one set of inner pairs.

We will get some repeated terms in our lower and upper pairs, so we use the following

Mathematica code:


                                            20
                                     Jason Eckert


Program 3.11)          innerpairs=Union[lowerpairs,upperpairs];

        My goal is to take these innerpairs and join them with the outerpairs to get a

close representation of M. We do so by using the following Mathematica code that

combines the innerpairs and the outerpairs and using ListPlot and PlotJoined, we get a

graph that is close to M.

                                      Figure 12.

This image is produced by:

     ListPlot
[{Re[Transpose[Sort[Join[innerpairs,newouterpairs]]][[2]]],
  Im[Transpose[Sort[Join[innerpairs,newouterpairs]]][[2]]]}
//Transpose,PlotJoinedTrue,AspectRatio.9,AxesFalse,Fram
eTrue]

 1.0




 0.5




 0.0




 0.5




 1.0


       2.0            1.5           1.0             0.5         0.0            0.5




                                          21
                               Drawing the Mandelbrot Set


       We can see that there is an outline of M and the main cardioid of M. The outline

is connected to the main cardiod at a single point creating crevices that weren’t there

before. This gives us a close representation of a graph of M. We could make it even

closer to M if we were able to get our hands on a super computer and take 240,000 terms

for our power series. We’d get even more outer rationals and inner rationals. We may

even be able to get a better estimate of the area of the Mandelbrot set than they did in (1).

We can also try to fill in the crevices on the small circle to the left of the main cardioid

and on the other bulbs to get a closer graph of M.




                                             22
                               Jason Eckert


                               Bibliography

1. John H. Ewing, Glen Schober, The Area of the Mandelbrot Set, Numerische
   Mathematik (1992), pp. 59-72
2. Robert L. Devaney, The Mandelbrot Set, the Farey Tree, and the Fibonacci
   Sequence, The American Mathematical Monthly (1999), pp. 289-302
3. Robert L. Devaney, The Fractal Geometry of the Mandelbrot Set: II How to Add
   and How to Count, Fractals (1995), pp.629-640




                                    23