# The dark side of the Mandelbrot set

today M stands for Mandelbrot set before scene at night let's zoom in what you find is all these amazing pictures here like these little baby Mandelbrot's remember those who need them for later okay now the Mandelbrot set is actually

Just the black bit they want here the halo that you see around it this one here you get when you have a very very close look at the data that you generate when you make up the Mandelbrot set now the inside is completely black the dark

Side of the Mandelbrot set it's actually not that dark when you also have a really really close mathematical look and that's what we're going to do today and when you have a close look what you get to see is for example this guy here

Or even better this guy here the mysterious Buddha brought fractal well I mean you can kind of see where the Buddha comes from pretty obvious there it is okay so it's got to be about the dark side and I thought well maybe today

My audience is going to be tough you know pretty obvious that's interested in the dark side so I'll tell him about the dark side of the Mandelbrot set and well let's see okay so what's the Mandelbrot set well

It looks like a set of points but actually it's a set of numbers okay where the numbers well here are the real numbers so it's zero that's one you know so every point that you see actually corresponds to a number well of course

There's a lot more than the real numbers here for example what's that point up there it's number is that well that's I the square root of -1 complex number and you know everything else that you see here is just complex numbers so for

Example this guy over here is just one over here point five up here so that's one plus 0.5 times I now you may know or may not know complex numbers doesn't matter only thing you really need to know for today is there a beautiful very

Important extension to the real numbers you can add them you can multiply them and that's actually what you need to do to figure out whether one of those complex numbers is inside or outside the Mandelbrot set okay now Darth is really

Interested in figuring out for example whether the number one is inside the Mandelbrot set so what is you have to do well he has to run this scheme here infinitely often so what it does is it takes number one sticks it in there

Where it says number and that gets you a formula here which is x squared plus one now what we do is we initialize by sticking in zero into this formula and that gets us 0 squared plus 1 is equal to 1 now we take what we get out here

And stick it back in again we get 1 squared plus 1 is 2 2 squared plus 1 is 5 5 squared plus 1 is 26 and so on and actually in this case it's pretty obvious that what's going to happen is that the magnitude of the numbers that

We're getting here is going to get bigger and bigger than it's actually going to approach infinity as we kind of push this further and further and whenever that happens you actually figure out that the number that we're

Talking about that one here in the greet green rectangle is outside so magnitude exploring to infinity means outside the Mandelbrot set sorry Duff one's not for you okay well it that's fine

It's fine now how can it not be well somehow the sequence has to be contained in a finite region this is given an example so that minus 1 for example supposed to be inside the Mandelbrot set so we replace

The 1 by a minus 1 and it gives us a new formula x squared minus one we initialize put 0 in 0 squared minus 1 is minus 1 minus 1 squared is 1 minus 1 is 0 back to the beginning and then of course things repeat minus 1 0 to

Infinity it's not going to go anywhere it's going to stay confined all right and now we have to do this for every single number that we see here and see whether it's inside or outside that is a lot of work and actually how I going to

Do this we're gonna do this infinite sequence we can't really do that right I mean you can't make American I can't do this infinitely often what has been shown it has been proven is that well you don't really have to

Wait to the end of times to figure out whether we're going to infinity or not the only thing you need to know is whether a sequence strays at any time outside this yellow circle if it does it explodes to infinity if it doesn't well

You can forget about it and actually the whole Mandelbrot set is contained in this yellow disc it doesn't doesn't go outside Oh das is not so happy because that obviously means well it's actually not

That big our mandibles at our our dark side but anyway let's continue so what we actually do is we we set a bail out value to be able to approximate the Mandelbrot set so we set the bail out value for example to five hundred so we

Iterate every single one of our sequences five hundred times and if by that time the sequence exits the yellow disc we declare what are we looking at at the moment to be outside and otherwise we declare to be inside so we

You know we're actually declaring some points to be inside that are not inside just because it takes them a lot longer to get out outside the the yellow circle but it's fine if you want to play a picture with us crank up the bailout

Value for example to five thousand or fifty thousand okay let's have a look at one of those parts all right so here we go so we start and we want to figure out whether that thing is inside or outside we'd set our payout value to 500 we

Start okay second once here third guys here fourth guys here fifths guys there six guys there seven skies outside perfect we know this point is outside the Mandelbrot set fantastic and now we also know that it took us

Seven steps to get outside so to actually get this halo that you see in all amendable pictures what we do is we color the outside points according to how many steps then it takes them to to get outside the yellow circle here okay

So therefore for example seven so all points corresponding sequins take seven steps to get outside get color was the same color that's how you get the halo now you can't do something else you can actually just plot all those escaping

Paths okay so all those X pacing pass for lots and lots and lots of points outside the Mandelbrot set and that sort of gives you a density plot of points escaping to infinity and when you do that you get these Buddha broad pictures

They will also look different depending on where you set your bail out value so for example that one here corresponds to the bailout value of five hundred if you go for five thousand it looks slightly different if you go for fifty thousand

It looks slightly different and now to get the color picture actually what people have done is they've taken these three pictures and made them into the blue green and red channel of a color picture so this one here really amazing

Now this was actually invented by one of our regular viewers Melinda green it's a amazing fractal but actually hardly anything has been you know investigated here so there's a lot of things that need explaining nobody's

Really looked at this so if your budding mathematician this would be a really really nice object to look at to explain all these features here that you see so far what we've done is well we've we've seen some light happening inside

Here but that illumination was all by basically points outside doing something now what I want to do is really mathematically drill into the into the inside and really show you what's going on not just talk about it but actually

Show you what's what's going on okay here we go we're going to focus on the real numbers because there we can draw pictures and actually it's just kind of parabolas cuz it's gonna be parabolas so let's just go

For an obvious point zero so if we stick this into the formula we just get x squared you can draw that that is and we can iterate not very interested in this case so what we do is we're making a bit more interest by first going outside

Okay so going outside so we go to this point here which is point three the picture how does a picture change what we just raised the parabola by 0.3 okay now we initialize with zero okay outcomes zero point three that's just

This distance here now how do you see in the picture what the next value is going to be where we stick point three inside visually that goes like this go up and we get the next value and we repeat and repeat and

Repeat and repeat and we get all the function values this is a very nice way of visualizing things but there's actually even better one and so for that one we just put in the diagonal here and then just watch watch this so we're

Going from zero okay from zero going up to the parabola horizontal over to the green up to the parabola horizontal over to the green up to the parabola horizontal over to the green and we just keep on going like this and we actually

Get exactly the same sequence of numbers happening but we can kind of see at a glance how they happen right so we can kind of just in our mind see that kind of zigzag between the parabola and the green lines is really really nice now

Your homework is going to be to explain why this works once we've got this picture we can dynamically change it and actually observe what happens to the exact Pass so first let's let's go up okay so first we go up here we go

And you can see we're basically just raising the parabola up here and what does exit path still escapes now let's go the other way to the critical point here that's point two five let's see what happens there

Where we lower in the parabola you can already see what's happening the bottleneck here kind of gets squished together and at some point in time you know we get the parabola meeting the line and so what happens here is that

The whole sequence kind of gets sucked in to this point now Daffy gets really excited at this point tractor beam tractor beam alright now what happens next well we're kind of going through this interval here the next critical

Point which is minus 0.75 lets us go okay so we're going all the way down and you can see tractor beams happening all the way along so things get sucked into this this point in attracting fixed point it's acting fixed point all the

Way along here all the way along here and actually not only along here is this real part of it but it's happening everywhere here inside that main bob discard your main cardioid of the the Mandelbrot set the same sort of behavior

Here things are being sucked into one point at minus 0.75 the parabola intersects the green line at exactly 90 degrees and things start splitting up and one attracting fixed point starts splitting up into two so in this dis

That's coming up here and it's actually perfect disc around minus one the sequence is going to be attracted by two points oscillate between two points let's just see how that works on the way to minus one you see being a track

Between two points at minus one we've got an extreme case happening where we flip between two points we're not only attracted by two points of a flip between two and then well that same behavior you get inside this circle here

So basically two tractor beams kind of taking turn attracting things now we move into next circle here here things are going to start splitting up into four different attracting points for different attracting points there's

Another circle attached to that one and they were getting into eight different attracting things and then as another circle sixty and 32 and so on that continues forever well not forever all the way over here but up to a point I'm

Just going to draw right there and let's just go there and if doubling up doubling up doubling up at that point in time things get chaotic so chaotic and it kind of stay quartic all the way to – to accept they're these islands of order

So let's just go for a while these islands of water correspond to these many Mandelbrot sets that he kind of come across here like on the way we saw kind of one thing where the chaos kind of goes into whoo it's quite something

Nice happening here – something nice happening here Period three and actually when you have a really really really close look at this region kind of zoom in you'll also find that there's a lot of this nice doubling and regularity

Happening whenever you come across one of those little Mandelbrot that's not going to go into detail here let's just keep on going from here to – – and see what happens chaos chaos chaos chaos chaos something

Interesting is about to happen Tom so we're going down here over there up here and then we're exploring to infinity that's what happens at – to beyond – – and so we escaping to infinity from then on really nice

Picture okay so this this statement that the sequence is contained and when its containers in the Mandelbrot set that statements actually hiding a lot of really really nice complicated behavior and that can be summarized nicely in in

A color picture like this so you know we choose one color to designate the region that has like one of those attracting fixed point one tractor beam we have another one where I've got two tractor beams one for tractor beams and then all

Kinds of other stuff here so all these bulbs that you see here have a characteristic behavior like everything in here has for example three tractor beams right so three tractor beams and the points are

Flipping back and forth between three different things just like in the main part of this baby mentor-protege saw before there's other nice behavior here so like three four five two all all the natural numbers counting up here by the

Main bobs that you see here there's the odd numbers going there you can see lots of other stuff in fact there's a lot of nice nice mathematics in here so there's one guy there's another guy in between there's the largest one what's the

Number that corresponds to that phone which is three plus four really nice what about here that guy here that's the largest one between those two guys it's just three plus five is eight and other things that you see here so I come to

You see these antennas here one two three four things coming up we've got a four here here seven things coming out of quite a seven here there are three things coming out with one of three here but I think I'll leave that for another

Video it's already too long okay so at this point Darth is probably pretty disappointed and figured out that well actually there is no real dark side to the Mandelbrot set so in prefer to go and look for for that somewhere else