Probability (part 2)

WEBVTT
Kind: captions
Language: en

00:00:00.610 --> 00:00:01.210
Welcome back.

00:00:01.210 --> 00:00:03.410
Whenever I start running out
of time I rush things and I

00:00:03.410 --> 00:00:04.670
most probably confuse you.

00:00:04.670 --> 00:00:08.000
So let me go over that last
example one more time.

00:00:08.000 --> 00:00:12.000
So I said I have a completely
fair coin and I'm going to

00:00:12.000 --> 00:00:14.400
flip it twice, and I want to
know the probability that

00:00:14.400 --> 00:00:16.865
I get heads in both times.

00:00:19.740 --> 00:00:22.150
Well, we already know the
probability that I get heads

00:00:22.150 --> 00:00:27.250
the first time is 1/2.

00:00:27.250 --> 00:00:31.240
There's 1/2 chance I get heads
the first time and there's

00:00:31.240 --> 00:00:34.740
1/2 chance that I get
tails the first time.

00:00:34.740 --> 00:00:38.450
And then I'm going to flip
again, and let's say, in this

00:00:38.450 --> 00:00:41.560
world, there's a 1/2 chance
that we enter into this reality

00:00:41.560 --> 00:00:44.980
where the first flip is heads,
and then in that world I'm

00:00:44.980 --> 00:00:47.190
going to flip a coin again.

00:00:47.190 --> 00:00:51.590
And I know that there's a half
a chance of heads-- this is

00:00:51.590 --> 00:00:55.250
the second flip-- and
1/2 chance of tails.

00:00:55.250 --> 00:00:57.250
And I know in this other
world-- I'll just draw it

00:00:57.250 --> 00:00:59.920
so we can figure out maybe
other probabilities.

00:00:59.920 --> 00:01:01.960
I know that there's 1/2
chance of heads, so this

00:01:01.960 --> 00:01:03.360
is for the second flip.

00:01:03.360 --> 00:01:06.355
And I know that there's
1/2 chance of tails

00:01:06.355 --> 00:01:08.130
on the second flip.

00:01:08.130 --> 00:01:10.260
And just so you know, this is
called a probability tree.

00:01:10.260 --> 00:01:15.430
And in general, it works
excellent if you're not

00:01:15.430 --> 00:01:16.550
dealing with huge numbers.

00:01:16.550 --> 00:01:21.480
If you're not dealing with--
I'm doing 100 trials or the

00:01:21.480 --> 00:01:25.390
probabilities get really messy
or in each trial there's 50

00:01:25.390 --> 00:01:27.050
different circumstances
that can occur.

00:01:30.180 --> 00:01:32.890
In this situation there's two
branches per-- you could say

00:01:32.890 --> 00:01:35.270
per node, so there's not that
many circumstances that

00:01:35.270 --> 00:01:36.880
can occur on each trial.

00:01:36.880 --> 00:01:38.350
And we're not doing that
many trials, so it's

00:01:38.350 --> 00:01:39.120
pretty manageable.

00:01:39.120 --> 00:01:42.110
And in these situations,
the probability tree

00:01:42.110 --> 00:01:44.240
works really well.

00:01:44.240 --> 00:01:46.450
You can never get overwhelmed
with the information then.

00:01:46.450 --> 00:01:48.330
And I'll show you, we'll do
some pretty complicated

00:01:48.330 --> 00:01:49.950
examples using
probability tree.

00:01:49.950 --> 00:01:51.930
There's no reason why I
actually circled that with

00:01:51.930 --> 00:01:53.620
yellow; I just happened
to switch to yellow.

00:01:53.620 --> 00:01:55.420
But anyway, just so you know,
this was the first trial.

00:01:58.220 --> 00:01:59.300
This is the second trial.

00:02:05.400 --> 00:02:08.370
We want to know the probability
of getting here because we got

00:02:08.370 --> 00:02:11.120
heads on the first trial,
heads in the second.

00:02:11.120 --> 00:02:14.330
Well, we know that there was a
1/2 chance of getting there and

00:02:14.330 --> 00:02:18.660
then we know of that 1/2 or you
know, 1/2 the times we got

00:02:18.660 --> 00:02:21.100
here, 1/2 of those times
you would get there.

00:02:21.100 --> 00:02:24.910
So the probability of getting
there is 1/2 times 1/2,

00:02:24.910 --> 00:02:27.880
which is equal to 1/4.

00:02:27.880 --> 00:02:31.930
Another way of thinking about
it is each of these scenarios--

00:02:31.930 --> 00:02:34.980
this is a scenario heads, heads
because you got a heads

00:02:34.980 --> 00:02:36.240
and then a heads.

00:02:36.240 --> 00:02:39.920
This is the scenario
heads, tails.

00:02:39.920 --> 00:02:42.940
This is the scenario
tails, heads.

00:02:42.940 --> 00:02:44.690
You got a tail, then
you got a heads.

00:02:44.690 --> 00:02:47.230
And this is the
scenario tails, tails.

00:02:47.230 --> 00:02:49.780
And all of these are equally
probable scenarios.

00:02:49.780 --> 00:02:53.170
There's no reason why one is
more likely than the other.

00:02:53.170 --> 00:02:56.990
And so we have 4 equally
probable scenarios, so

00:02:56.990 --> 00:02:59.275
the total of equally
probable scenarios is 4.

00:03:05.770 --> 00:03:09.510
How many of these equal
probable scenarios is our

00:03:09.510 --> 00:03:11.610
probability or our event true?

00:03:11.610 --> 00:03:14.300
Well, it's one of
them-- heads heads.

00:03:14.300 --> 00:03:15.160
So it's 1/4.

00:03:15.160 --> 00:03:18.050
So that's another
way of viewing it.

00:03:18.050 --> 00:03:20.710
Another way you could view it
is if we did this trial a

00:03:20.710 --> 00:03:24.910
hundred times, if we did is a
hundred times, 50 of the times

00:03:24.910 --> 00:03:29.150
my first flip will be heads.

00:03:29.150 --> 00:03:35.000
And then of those 50 times 25
of those times-- half of those

00:03:35.000 --> 00:03:38.680
trials where I got 50 the first
time will be heads again.

00:03:38.680 --> 00:03:42.330
And so 25 out of the total 100
trials will end up with heads

00:03:42.330 --> 00:03:44.650
heads, or this is 25% chance.

00:03:44.650 --> 00:03:46.230
I wanted to show you that all
of these are pretty much the

00:03:46.230 --> 00:03:48.870
equivalent, but I want your
brain to kind of connect

00:03:48.870 --> 00:03:51.460
and make sure that it
understands everything.

00:03:51.460 --> 00:03:53.343
So now that we've drawn this
probability tree I don't want

00:03:53.343 --> 00:03:55.685
it to go to waste, so let me
give you another circumstance.

00:04:05.000 --> 00:04:09.020
What's the probability I get
one heads and one tail?

00:04:11.840 --> 00:04:15.430
And notice, I'm not saying that
it has to be in that order.

00:04:15.430 --> 00:04:17.950
You know, it could be tails,
heads or heads, tail.

00:04:17.950 --> 00:04:19.840
Let me write that down.

00:04:19.840 --> 00:04:23.930
This is equal to the
probability of tails, heads

00:04:23.930 --> 00:04:30.990
plus the probability
of heads, tails.

00:04:30.990 --> 00:04:34.300
Or we could write that as-- and
this is kind of with set theory

00:04:34.300 --> 00:04:37.570
notation, but it's good to be
familiar with all of these.

00:04:37.570 --> 00:04:41.980
It's a probability of getting
tail, heads or this U looking

00:04:41.980 --> 00:04:44.050
thing means or in set theory.

00:04:44.050 --> 00:04:47.860
Or the probability of getting
heads, tails, right?

00:04:47.860 --> 00:04:49.830
We can get tails, heads
or heads, tails.

00:04:49.830 --> 00:04:51.380
In either of these we're
getting one heads

00:04:51.380 --> 00:04:52.280
and one tails.

00:04:52.280 --> 00:04:53.920
So what's that probability?

00:04:53.920 --> 00:04:56.370
Well, we can just look at all
of the outcomes and we know

00:04:56.370 --> 00:04:59.020
that there are 4 equally
probable outcomes.

00:04:59.020 --> 00:05:04.240
And then, how many of these is
the event that we want true?

00:05:04.240 --> 00:05:07.880
Well, it's 1, 2.

00:05:07.880 --> 00:05:12.280
So there's a 2/4 or equal 1/4
chance where when we do both of

00:05:12.280 --> 00:05:16.810
these flips we get at least one
heads and at least one tails.

00:05:16.810 --> 00:05:19.260
And I think that's a good time
now that we've drawn this tree

00:05:19.260 --> 00:05:23.070
and we've talked about two
flips in a row, to realize that

00:05:23.070 --> 00:05:24.880
these are mutually
exclusive events.

00:05:24.880 --> 00:05:28.030
The reason why we can multiply
the probability of the first

00:05:28.030 --> 00:05:34.280
event times the probability of
the second event is because the

00:05:34.280 --> 00:05:36.480
probability of getting heads
the second time is completely

00:05:36.480 --> 00:05:39.160
independent of whether I
got heads the first time.

00:05:39.160 --> 00:05:42.340
And that might be obvious to
you, but sometimes it isn't.

00:05:42.340 --> 00:05:47.390
You know, some people feel that
if they got 5 heads in a row

00:05:47.390 --> 00:05:51.360
that they're more likely to get
a tails on the sixth time.

00:05:51.360 --> 00:05:54.450
But what we know from
experience really, is that no,

00:05:54.450 --> 00:05:58.170
it's not like the coin knows
that you got 5 heads in a row

00:05:58.170 --> 00:06:01.820
and then it says, oh boy, I
better give Sal a tails now

00:06:01.820 --> 00:06:04.160
just to kind of make up for
all the 5 heads he got.

00:06:04.160 --> 00:06:07.370
It's equally problems
to get a heads again.

00:06:07.370 --> 00:06:08.600
So that's just something
to keep in mind.

00:06:08.600 --> 00:06:13.370
And it's amazing how just human
beings psychologically-- you

00:06:13.370 --> 00:06:16.250
feel that if you have a
big streak of heads that

00:06:16.250 --> 00:06:18.350
you're due for a tails.

00:06:18.350 --> 00:06:22.660
But your probability of getting
that tails does not increase.

00:06:22.660 --> 00:06:25.830
Although, if you keep doing
it you're probability of

00:06:25.830 --> 00:06:28.301
eventually-- the more times you
do it, the probability of

00:06:28.301 --> 00:06:30.810
getting a tails does increase
and I'll show you that soon.

00:06:33.520 --> 00:06:35.930
That last statement probably
confused you and I probably

00:06:35.930 --> 00:06:38.130
shouldn't have said it.

00:06:38.130 --> 00:06:38.840
Let's do an example.

00:06:38.840 --> 00:06:41.830
Now that we know that in
mutually exclusive events

00:06:41.830 --> 00:06:43.700
you can just multiply
the probabilities.

00:06:43.700 --> 00:06:47.530
So let's say I have a fair coin
and what's the probability

00:06:47.530 --> 00:06:49.540
of getting 5 heads in a row?

00:06:56.560 --> 00:06:59.090
Well, I have a 1/2 chance of
getting heads the first time.

00:06:59.090 --> 00:07:00.230
Then of those, 1/2.

00:07:00.230 --> 00:07:00.990
Then another 1/2.

00:07:00.990 --> 00:07:10.430
So it's 1/2 times 1/2 times
1/2 times 1/2 times 1/2.

00:07:10.430 --> 00:07:14.470
And that equals 1/2
to the fifth power.

00:07:14.470 --> 00:07:16.790
That's equal to 1 over
2 to the fifth power.

00:07:16.790 --> 00:07:20.260
And that's 1/32.

00:07:20.260 --> 00:07:23.280
That's the probability of
getting 5 heads in a row.

00:07:30.200 --> 00:07:33.460
What's the probability of
getting-- let's say I were

00:07:33.460 --> 00:07:39.120
to flip a coin seven times.

00:07:39.120 --> 00:07:46.420
So let's say I flip a coin, out
of seven times, what's the

00:07:46.420 --> 00:07:49.035
probability of not
getting any heads?

00:07:53.700 --> 00:07:55.270
I'm going to switch colors
just for the hell of it.

00:08:00.080 --> 00:08:03.300
Well that might seem a little
bit more convoluted to you,

00:08:03.300 --> 00:08:05.100
but just think about it.

00:08:05.100 --> 00:08:09.050
The probability of out of the
seven flips of not getting

00:08:09.050 --> 00:08:12.760
any heads, that is equal--
what has to be true then?

00:08:12.760 --> 00:08:13.900
We got all tails then.

00:08:13.900 --> 00:08:17.090
That's equal to the probability
of getting 7 tails in a row.

00:08:20.570 --> 00:08:21.510
And what does that equal?

00:08:21.510 --> 00:08:24.900
Well, the tails are equally
likely to the heads.

00:08:24.900 --> 00:08:30.250
So that would be 1/2
to the seventh power.

00:08:30.250 --> 00:08:33.570
That equals-- what is that?

00:08:33.570 --> 00:08:44.060
So it'll be 4 times 132,
so that's equal to 1/128.

00:08:44.060 --> 00:08:48.600
And a fun experiment to do is
maybe in your classroom or if

00:08:48.600 --> 00:08:54.460
you have a large group of
people together, maybe 128 or

00:08:54.460 --> 00:08:56.610
some large number of people
and you make everyone flip

00:08:56.610 --> 00:08:59.470
a coin multiple times.

00:08:59.470 --> 00:09:03.710
By the end of 5 or 6 or 7
flips, there will probably be--

00:09:03.710 --> 00:09:05.660
and later on we'll actually
figure out the probability

00:09:05.660 --> 00:09:07.750
that there is someone
who has a streak.

00:09:07.750 --> 00:09:09.860
But there will probably be
someone who has a very long

00:09:09.860 --> 00:09:11.410
streak of heads or tails.

00:09:11.410 --> 00:09:14.510
And that person will probably
think that there's something

00:09:14.510 --> 00:09:18.140
magical about what is going on
in their life at that moment.

00:09:18.140 --> 00:09:21.610
And it's important to realize
if you have a large room, if

00:09:21.610 --> 00:09:25.730
you have a room of 500 people,
someone's going to be getting--

00:09:25.730 --> 00:09:27.670
there's a likelihood and we
haven't figured that out yet,

00:09:27.670 --> 00:09:31.520
but just given that you have a
1 in 128 chance of getting 7

00:09:31.520 --> 00:09:33.670
heads or 7 tails in a row.

00:09:33.670 --> 00:09:36.100
Someone's going to get if you
have 500 people flipping coins.

00:09:36.100 --> 00:09:39.030
But that person, they just view
their own reality, they think

00:09:39.030 --> 00:09:41.080
that today is their lucky day.

00:09:41.080 --> 00:09:42.820
And they think that they're on
some type of streak and that

00:09:42.820 --> 00:09:43.440
they should go to Vegas.

00:09:43.440 --> 00:09:46.920
But that's just something that
you should think about because

00:09:46.920 --> 00:09:49.280
probability can often
play with our brains.

00:09:49.280 --> 00:09:51.240
But anyway, I have 10
seconds left, so I will

00:09:51.240 --> 00:09:53.240
see you in the next video.


Probability (part 1)

WEBVTT
Kind: captions
Language: en

00:00:00.810 --> 00:00:03.390
Good morning or evening or
whatever it is where you are,

00:00:03.390 --> 00:00:05.340
wherever you're happening
to watch this movie.

00:00:05.340 --> 00:00:08.810
Anyway, I've been requested to
do a playlist on probability,

00:00:08.810 --> 00:00:12.630
and I think that's an excellent
idea, so I will start doing

00:00:12.630 --> 00:00:14.670
a playlist on probability.

00:00:14.670 --> 00:00:18.110
So let's do a playlist
on probability.

00:00:18.110 --> 00:00:22.070
It's a good place to
start probability.

00:00:22.070 --> 00:00:24.870
I don't do videos on spelling.

00:00:24.870 --> 00:00:26.100
Probability: so what is it?

00:00:26.100 --> 00:00:27.870
And I think all of us
have kind of a sense of

00:00:27.870 --> 00:00:29.560
it, very informally.

00:00:29.560 --> 00:00:32.260
And as far as I can tell there
actually isn't a formal

00:00:32.260 --> 00:00:34.920
definition of what
a probability is.

00:00:34.920 --> 00:00:38.670
There are several almost
formal competing definitions.

00:00:38.670 --> 00:00:41.370
So just in our everyday life,
you know if the weather man

00:00:41.370 --> 00:00:48.810
says there's a 50% percent
chance of rain the next

00:00:48.810 --> 00:00:51.490
day, he's essentially
giving a probability.

00:00:51.490 --> 00:00:54.650
He's saying that-- well,
there's a couple of ways

00:00:54.650 --> 00:00:58.800
that you could interpret
the 50% probability.

00:00:58.800 --> 00:01:04.130
It could be that if 100% was
that he is sure there's rain

00:01:04.130 --> 00:01:08.000
tomorrow and 0% is that he is
not sure that there's is rain

00:01:08.000 --> 00:01:10.970
tomorrow, that 50% kind of
means well, he's kind of

00:01:10.970 --> 00:01:12.680
neutral between those
two possibilities.

00:01:12.680 --> 00:01:18.330
So one definition could be
how strongly you believe.

00:01:22.240 --> 00:01:25.150
Actually, there's a whole
school of probability where

00:01:25.150 --> 00:01:27.510
they view probability like
this, and it's called the

00:01:27.510 --> 00:01:30.080
Baysian, and we'll
go into that more.

00:01:30.080 --> 00:01:32.060
Actually, when we do easy
problems, all of these things

00:01:32.060 --> 00:01:33.330
kind of are the same thing.

00:01:33.330 --> 00:01:37.140
But later on we'll see
what the difference is.

00:01:37.140 --> 00:01:39.390
Another way of interpreting
this and this is kind of the

00:01:39.390 --> 00:01:44.360
frequentist school of thought,
is if I were to have the data

00:01:44.360 --> 00:01:47.200
that this-- or if the weather
man had this data that he has

00:01:47.200 --> 00:01:51.240
right now as far as where the
clouds are and what the

00:01:51.240 --> 00:01:55.910
barometer reads and where the
moon is and all of the data.

00:01:55.910 --> 00:01:59.240
Given all of the data that he
has, when he has that same

00:01:59.240 --> 00:02:05.290
exact data hundred times,
fifty times or 50% of those

00:02:05.290 --> 00:02:07.240
times there will be rain.

00:02:07.240 --> 00:02:11.230
So you can almost view it as,
given the data that he has, if

00:02:11.230 --> 00:02:13.570
you had that data a hundred
times or if you were able to

00:02:13.570 --> 00:02:15.860
run this experiment a hundred
times-- although that's very

00:02:15.860 --> 00:02:19.820
unlikely that you would have
that exact same number

00:02:19.820 --> 00:02:20.760
of data points.

00:02:20.760 --> 00:02:23.200
You know, whether Mars is
in the right place and the

00:02:23.200 --> 00:02:24.610
sun is flaring and all.

00:02:24.610 --> 00:02:27.840
It's very unlikely you have
those exact same-- you know,

00:02:27.840 --> 00:02:28.650
the butterfly effect.

00:02:28.650 --> 00:02:31.500
One butterfly can effect the
wind patterns across the ocean.

00:02:31.500 --> 00:02:35.120
So it's very unlikely that you
could perform that experiment a

00:02:35.120 --> 00:02:38.130
hundred times, but what the
weather man could be saying is

00:02:38.130 --> 00:02:42.430
well, if I did have data
identical to this, a hundred

00:02:42.430 --> 00:02:46.410
times, 50 of those times or
50% of the time we would

00:02:46.410 --> 00:02:48.700
have rain the next day.

00:02:48.700 --> 00:03:01.010
That's 50% of experiments with
same-- I guess you could say

00:03:01.010 --> 00:03:05.650
measurable initial conditions--
I'm kind of doing this on the

00:03:05.650 --> 00:03:07.920
fly so don't take
this as gospel.

00:03:07.920 --> 00:03:09.670
But it I think it'll
give you the sense.

00:03:09.670 --> 00:03:14.700
With same initial conditions,
would result in rain.

00:03:18.120 --> 00:03:22.360
They're almost the same thing,
but we'll see later that this

00:03:22.360 --> 00:03:25.700
frequentist-- I tend to view
the world kind of like this,

00:03:25.700 --> 00:03:27.310
but there are a lot of
circumstances where you

00:03:27.310 --> 00:03:30.940
really-- it's hard to say that
you could perform that same

00:03:30.940 --> 00:03:33.490
exact experiment over again.

00:03:33.490 --> 00:03:37.470
For example, if someone said in
2003 there's a 50% chance or

00:03:37.470 --> 00:03:40.660
there's an 80% chance that
Saddam Hussein has weapons of

00:03:40.660 --> 00:03:43.970
mass destruction, that I think
would-- and that would

00:03:43.970 --> 00:03:44.520
be a probability.

00:03:44.520 --> 00:03:47.770
You know, you'd have these CIA
analysts who aren't being

00:03:47.770 --> 00:03:52.790
influenced by their bosses
saying hey, after all the data

00:03:52.790 --> 00:03:57.590
we see, we can't be sure, but
we think there's an 80% chance.

00:03:57.590 --> 00:03:59.650
They would be in
this camp, right?

00:03:59.650 --> 00:04:01.870
Because you really couldn't
perform that experiment

00:04:01.870 --> 00:04:02.610
a hundred times.

00:04:02.610 --> 00:04:05.870
There haven't been a hundred
times or a thousand times or a

00:04:05.870 --> 00:04:08.430
large number of times where you
had that exact same set of

00:04:08.430 --> 00:04:11.330
circumstances where you a guy
with the big mustache in the

00:04:11.330 --> 00:04:14.710
Middle East kind of giving
the run around for

00:04:14.710 --> 00:04:15.660
weapons inspectors.

00:04:15.660 --> 00:04:17.790
Anyway, so let's move on.

00:04:17.790 --> 00:04:19.770
This is very subtle, but it
gives you the difference

00:04:19.770 --> 00:04:21.110
between these two things.

00:04:21.110 --> 00:04:24.090
It's quite subtle, but I think
it gives you nice frame work

00:04:24.090 --> 00:04:27.060
for what probability is.

00:04:27.060 --> 00:04:30.450
So let's just do a
little bit of notation.

00:04:30.450 --> 00:04:32.940
I actually looked it up on
Wikipedia and they had one

00:04:32.940 --> 00:04:34.320
definition-- maybe it
wasn't Wikipedia, it was

00:04:34.320 --> 00:04:36.290
maybe another website.

00:04:36.290 --> 00:04:38.210
And actually, I think you
do see this definition of

00:04:38.210 --> 00:04:41.490
lot where they say the
probability-- sometimes it's

00:04:41.490 --> 00:04:44.090
written as probability of a.

00:04:44.090 --> 00:04:46.430
Sometimes it's just
written as P of a.

00:04:46.430 --> 00:04:54.480
So the probability of a
occurring is equal to the

00:04:54.480 --> 00:05:06.810
events in which a is true
over total number of events.

00:05:06.810 --> 00:05:10.130
And this, for the most part,
can be a good definition, but

00:05:10.130 --> 00:05:11.630
I'll show you one place where
I think it's a little

00:05:11.630 --> 00:05:13.450
bit more squirmy.

00:05:13.450 --> 00:05:17.270
So if I told you that I'm
going to flip a coin and--

00:05:17.270 --> 00:05:17.990
actually, even better.

00:05:17.990 --> 00:05:19.930
Let's say, let's roll a dice.

00:05:19.930 --> 00:05:23.640
And let's say I say the
probability-- I'm going

00:05:23.640 --> 00:05:25.730
straight to more
difficult things.

00:05:25.730 --> 00:05:30.670
So say the probability
of an even number.

00:05:30.670 --> 00:05:33.040
Well, let's use this
definition that they gave.

00:05:33.040 --> 00:05:35.630
Well, what's the probability
that this event is true?

00:05:35.630 --> 00:05:37.290
Well, let's see, what are all
the numbers I could get?

00:05:37.290 --> 00:05:40.110
I could get a 1, 2, 3, 4, 5, 6.

00:05:40.110 --> 00:05:44.030
This is just a normal die, it's
not one of those Dungeons

00:05:44.030 --> 00:05:45.800
and Dragon's dice.

00:05:45.800 --> 00:05:49.850
So what are the number of
events where we get an even

00:05:49.850 --> 00:05:52.640
number, where this is
true, where even is true?

00:05:52.640 --> 00:05:54.390
Let's see.

00:05:54.390 --> 00:05:56.490
2, 4, 6.

00:05:56.490 --> 00:06:00.250
Those are all the situations
where we get even as true.

00:06:00.250 --> 00:06:03.070
So there are 3 where
even is true.

00:06:03.070 --> 00:06:05.110
And then, what is the
total number of events?

00:06:05.110 --> 00:06:07.860
Well, we could get 1 of 6
numbers, so there are 6 total.

00:06:07.860 --> 00:06:09.440
And that equals 1/2.

00:06:09.440 --> 00:06:11.300
And that also
equals 50%, right?

00:06:11.300 --> 00:06:14.770
We know how to convert
fractions to percentages.

00:06:14.770 --> 00:06:17.970
And this is right, this
is completely right.

00:06:17.970 --> 00:06:21.700
But the only time where you can
really apply this and most of

00:06:21.700 --> 00:06:24.980
what you'll do in school and
things you can apply this, but

00:06:24.980 --> 00:06:27.760
this assumes that all of the
events are equally

00:06:27.760 --> 00:06:29.640
likely to occur.

00:06:29.640 --> 00:06:33.400
You could have had a dice or
a die-- I forgot how to say

00:06:33.400 --> 00:06:36.280
the plural or the singular.

00:06:36.280 --> 00:06:40.410
You could have that situation
where maybe the six-sided is

00:06:40.410 --> 00:06:41.340
weighted a little bit more.

00:06:41.340 --> 00:06:43.220
You know, someone's handed
it down so it's more likely

00:06:43.220 --> 00:06:44.340
to have a 3 or something.

00:06:44.340 --> 00:06:47.780
And in that case, you wouldn't
be able to use this definition.

00:06:47.780 --> 00:06:49.520
So I'm going to modify
this definition, although

00:06:49.520 --> 00:06:51.830
I don't know if it's
traditionally modified.

00:06:51.830 --> 00:06:56.620
This is one possible, events
in which a is true divided

00:06:56.620 --> 00:07:00.210
by-- well, let's say,
equally probable.

00:07:00.210 --> 00:07:06.090
Equally probable events in
which a is true divided by

00:07:06.090 --> 00:07:11.580
equally probable total events.

00:07:11.580 --> 00:07:15.300
So in order for this to hold
true each of these six

00:07:15.300 --> 00:07:18.260
circumstances have to have
exact equal chance

00:07:18.260 --> 00:07:19.110
of occurring.

00:07:19.110 --> 00:07:21.370
And we're going to do maybe
in this video, actually

00:07:21.370 --> 00:07:23.250
probably not in this, I
only have 3 minutes left.

00:07:23.250 --> 00:07:26.830
But in this series I'll show
you situations where you we'll

00:07:26.830 --> 00:07:32.160
have an unfair dice or die
or we'll have a set of

00:07:32.160 --> 00:07:35.180
circumstances where all of--
each of the total number events

00:07:35.180 --> 00:07:36.410
they're not equally probable.

00:07:36.410 --> 00:07:37.790
So that's why I want you
become a little bit

00:07:37.790 --> 00:07:41.900
weary of this situation.

00:07:41.900 --> 00:07:45.800
So with that said, let's do a
couple of probability problems

00:07:45.800 --> 00:07:49.520
that maybe give you a little
bit more intuition for--

00:07:49.520 --> 00:07:52.460
whoops-- for what's going on
here in the world

00:07:52.460 --> 00:07:54.900
of probability.

00:07:54.900 --> 00:07:57.070
So if I'm flipping a dice and
I said, well, what's the

00:07:57.070 --> 00:07:59.620
probability of heads?

00:07:59.620 --> 00:08:00.300
That's pretty easy.

00:08:00.300 --> 00:08:02.080
We could use that definition
and it's a completely

00:08:02.080 --> 00:08:03.560
fair dice.

00:08:03.560 --> 00:08:06.330
We could use that definition
and say, well, what are the

00:08:06.330 --> 00:08:07.800
total number of events where
I could get heads

00:08:07.800 --> 00:08:08.680
or tails, right?

00:08:08.680 --> 00:08:10.190
So there's 2 total events.

00:08:10.190 --> 00:08:11.490
And the probability the
getting heads, that's

00:08:11.490 --> 00:08:12.105
one of the events.

00:08:12.105 --> 00:08:14.210
So there's a 1/2 probability.

00:08:14.210 --> 00:08:16.260
The way I like to think of it
so we don't have to use that

00:08:16.260 --> 00:08:21.970
previous definition is, if I
were to conduct this experiment

00:08:21.970 --> 00:08:26.260
a hundred times, what
percentage of those times am

00:08:26.260 --> 00:08:28.410
I likely to get heads?

00:08:28.410 --> 00:08:31.340
And then I would say, well,
there's 50% of the time

00:08:31.340 --> 00:08:32.290
I would get heads.

00:08:32.290 --> 00:08:35.020
And the reason why, you know, I
could make a symmetry argument

00:08:35.020 --> 00:08:38.650
that it's just as likely to go
on heads as it is to tails.

00:08:38.650 --> 00:08:41.330
There's no reason why I
would expect 51 heads or

00:08:41.330 --> 00:08:43.224
49 nine tails, although
that could happen.

00:08:43.224 --> 00:08:44.720
But there's no reason
I could expect it.

00:08:44.720 --> 00:08:46.580
Heads and tails are
equally likely.

00:08:46.580 --> 00:08:49.670
They're just different words
for different sides of a

00:08:49.670 --> 00:08:51.970
coin that's equally likely
to fall on either side.

00:08:51.970 --> 00:08:58.050
Anyway, let's say I'm going
to now flip a coin twice.

00:08:58.050 --> 00:08:58.790
And it's the same coin.

00:08:58.790 --> 00:09:00.040
So I'm going to flip it, and
then I'm going to pick it up,

00:09:00.040 --> 00:09:01.050
and I'm going to flip it again.

00:09:01.050 --> 00:09:04.960
And so what's the probability
that I get-- I'll

00:09:04.960 --> 00:09:06.970
call it heads, heads.

00:09:06.970 --> 00:09:09.950
So that's the probability that
I get heads on the first flip

00:09:09.950 --> 00:09:12.550
and then heads on
the second flip.

00:09:12.550 --> 00:09:13.870
Well, look at it this way.

00:09:13.870 --> 00:09:18.010
If on the first flip we already
know that we have a 5% chance

00:09:18.010 --> 00:09:21.210
or 1/2 chance on the
first flip, right?

00:09:21.210 --> 00:09:25.300
So let's think of it of the
frequentist philosophy.

00:09:25.300 --> 00:09:29.840
So if I were to do this a
hundred times, 50 of the

00:09:29.840 --> 00:09:31.690
times I would get heads.

00:09:31.690 --> 00:09:33.340
Let's call that on
the first flip.

00:09:33.340 --> 00:09:35.790
Then of course, 50 of the
times I would get tails

00:09:35.790 --> 00:09:37.970
on the first flip, right?

00:09:37.970 --> 00:09:40.010
Now we're at this state of the
universe and now we do the

00:09:40.010 --> 00:09:42.480
experiment over again.

00:09:42.480 --> 00:09:49.880
So of these 50 times, what
percentage of the times is

00:09:49.880 --> 00:09:54.320
the next flip going
to be heads again?

00:09:54.320 --> 00:09:57.850
Well, we could say it's going
to be another 50% chance, or

00:09:57.850 --> 00:10:01.780
you could say, well, in 50
tries the first one was heads,

00:10:01.780 --> 00:10:06.510
and then of those 50, 50%
are going to be heads again.

00:10:06.510 --> 00:10:08.270
So we get 25%.

00:10:08.270 --> 00:10:10.080
I just multiplied
these two numbers.

00:10:10.080 --> 00:10:13.910
And of course, to get heads and
then tails would be 25% chance.

00:10:13.910 --> 00:10:18.230
Heads Heads, heads tails,
and then this is tails

00:10:18.230 --> 00:10:20.546
heads, tails heads.

00:10:20.546 --> 00:10:21.540
I'm getting confused.

00:10:21.540 --> 00:10:23.360
Tail heads is 25%.

00:10:23.360 --> 00:10:25.710
And then tails tails is 25%.

00:10:25.710 --> 00:10:27.365
Anyway, I'm rushing it
because I'm 25 seconds over.

00:10:27.365 --> 00:10:29.660
I'll continue this
in the next video.


Polynomial approximations of functions (part 5)

WEBVTT
Kind: captions
Language: en

00:00:00.710 --> 00:00:01.400
Welcome back.

00:00:01.400 --> 00:00:04.330
Well, in the last video we
took the Maclaurin series for

00:00:04.330 --> 00:00:06.650
cosine of x, the Maclaurin
series representation.

00:00:06.650 --> 00:00:09.660
So I guess we might as well
do the same for sine of x.

00:00:09.660 --> 00:00:14.270
And I'm sounding very
nonchalant, but I have a reason

00:00:14.270 --> 00:00:16.520
behind why I'm doing this, and
you'll see in a few videos from

00:00:16.520 --> 00:00:20.760
now, when we come up with
the grand conclusion.

00:00:20.760 --> 00:00:23.540
So anyway, let's
just set up f of x.

00:00:23.540 --> 00:00:25.660
And you might just want to do
this yourself instead of

00:00:25.660 --> 00:00:30.100
watching me do it, because it
should be pretty

00:00:30.100 --> 00:00:33.870
self-explanatory now that you
saw cosine of x.

00:00:33.870 --> 00:00:35.340
And then you could
check your work.

00:00:35.340 --> 00:00:37.290
You can pause right now, and
then you can check to see

00:00:37.290 --> 00:00:38.260
that we got the same answer.

00:00:38.260 --> 00:00:39.670
You'll probably be right
and I probably made

00:00:39.670 --> 00:00:40.980
a careless mistake.

00:00:40.980 --> 00:00:42.650
So f of x is equal
to sine of x.

00:00:42.650 --> 00:00:43.710
First of all, let's just
figure out all of the

00:00:43.710 --> 00:00:45.610
derivatives of sine of x.

00:00:45.610 --> 00:00:47.640
We can already guess that it
probably cycles similar to

00:00:47.640 --> 00:00:50.350
cosine of x, with
slight variation.

00:00:50.350 --> 00:00:53.340
So what's the derivative
of sine of x?

00:00:53.340 --> 00:00:56.220
Well, that's just cosine of x.

00:00:56.220 --> 00:00:58.670
What's the second derivative?

00:00:58.670 --> 00:01:00.160
I'm just going to stop
putting parentheses

00:01:00.160 --> 00:01:02.778
around these numbers.

00:01:02.778 --> 00:01:05.490
The second derivative, well,
that's just derivative of that.

00:01:05.490 --> 00:01:08.770
It's minus sine of x.

00:01:08.770 --> 00:01:11.430
The third derivative of x.

00:01:11.430 --> 00:01:12.930
Well, I guess I'll put the
parentheses so you don't think

00:01:12.930 --> 00:01:15.250
it's f to the third times x.

00:01:15.250 --> 00:01:17.090
The third derivative, well,
that's just going to be the

00:01:17.090 --> 00:01:18.620
minus cosine, rightu0008?

00:01:18.620 --> 00:01:21.570
Because the derivative of sine
is cosine, but then we have

00:01:21.570 --> 00:01:23.700
that minus sine there.

00:01:23.700 --> 00:01:27.440
And the fourth derivative.

00:01:27.440 --> 00:01:30.640
The derivative of cosine is
minus sine, but we have a minus

00:01:30.640 --> 00:01:32.620
there, so we get back to sine.

00:01:32.620 --> 00:01:34.670
And then the cycle continues.

00:01:34.670 --> 00:01:40.100
So the fifth derivative is just
going to be cosine of x, or

00:01:40.100 --> 00:01:42.610
just the derivative
of the sine of x.

00:01:42.610 --> 00:01:45.120
And then the cycle
continues, right?

00:01:45.120 --> 00:01:45.550
All right.

00:01:45.550 --> 00:01:47.740
So we know the derivatives,
and we can just keep going.

00:01:47.740 --> 00:01:50.700
So let's evaluate the
derivatives of our function

00:01:50.700 --> 00:01:54.360
of sine of x at x equals 0.

00:01:54.360 --> 00:01:55.095
f of 0.

00:01:57.610 --> 00:01:58.790
Well, that's sine of zero.

00:01:58.790 --> 00:01:59.740
What's sine of 0?

00:01:59.740 --> 00:02:02.630
Well, sine of 0 is 0.

00:02:02.630 --> 00:02:08.390
f prime of 0 is equal
to cosine of 0.

00:02:08.390 --> 00:02:09.150
That's equal to 1.

00:02:12.160 --> 00:02:16.380
The second derivative at 0,
that's minus sine of 0.

00:02:16.380 --> 00:02:17.440
Well, sine of 0 is still 0.

00:02:17.440 --> 00:02:18.230
So that's 0.

00:02:18.230 --> 00:02:20.505
You can see it's a very similar
pattern to what we saw in the

00:02:20.505 --> 00:02:23.390
Maclaurin series
for cosine of x.

00:02:23.390 --> 00:02:28.040
And then the third
derivative evaluated at 0.

00:02:28.040 --> 00:02:29.120
That's cosine of 0 is 1.

00:02:29.120 --> 00:02:31.410
But we have a minus sine,
so that's minus 1.

00:02:31.410 --> 00:02:32.210
This you already know.

00:02:32.210 --> 00:02:35.490
The fourth derivative is 0.

00:02:35.490 --> 00:02:36.660
Sine of 0 is 0.

00:02:36.660 --> 00:02:39.470
And then it starts
to cycle again.

00:02:39.470 --> 00:02:42.410
The fifth derivative,
0 equal to 1.

00:02:42.410 --> 00:02:45.540
So we start with 0, then
positive 1, then 0, then minus

00:02:45.540 --> 00:02:46.800
1, then 0, then positive 1.

00:02:46.800 --> 00:02:47.980
Every other number is a 0.

00:02:47.980 --> 00:02:50.090
Every other, I guess you could
say, coefficient in the

00:02:50.090 --> 00:02:52.500
Maclaurin series is a 0.

00:02:52.500 --> 00:02:55.000
The coefficient when you don't
include the factorial term.

00:02:55.000 --> 00:02:57.660
And then the ones in between
oscillate between positive

00:02:57.660 --> 00:02:59.790
1 and negative 1.

00:02:59.790 --> 00:03:02.990
So what would be the Maclaurin
series for sine of x?

00:03:02.990 --> 00:03:05.900
The Maclaurin series
representation?

00:03:05.900 --> 00:03:08.850
So we could say that sine of x
-- And remember, I haven't

00:03:08.850 --> 00:03:12.170
proven to you that the
Maclaurin series representation

00:03:12.170 --> 00:03:17.020
of sine of x or cosine of x or
e to the x really is equal to

00:03:17.020 --> 00:03:19.270
those functions over
the entire domain.

00:03:19.270 --> 00:03:20.480
I might do that later.

00:03:20.480 --> 00:03:23.510
Frankly, I've been thinking
about the proof myself.

00:03:23.510 --> 00:03:26.580
It hasn't been completely
intuitive how to do that proof.

00:03:26.580 --> 00:03:28.680
Although if you test them
out, it does seem to

00:03:28.680 --> 00:03:30.500
make a lot of sense.

00:03:30.500 --> 00:03:32.190
But you shouldn't just
take my word for it.

00:03:32.190 --> 00:03:33.870
I'm going to look up the
proof and I will prove

00:03:33.870 --> 00:03:35.240
it to you, eventually.

00:03:35.240 --> 00:03:37.650
But for now, you just have to
take it as a bit of a leap of

00:03:37.650 --> 00:03:40.410
faith that the Maclaurin series
representations just don't

00:03:40.410 --> 00:03:42.840
approximate those functions
around 0, that when you take

00:03:42.840 --> 00:03:47.770
the infinite series, it
actually equals the function.

00:03:47.770 --> 00:03:48.770
So sine of x.

00:03:48.770 --> 00:03:52.490
The Maclaurin series
representation is going to be

00:03:52.490 --> 00:04:01.510
equal to -- well, f of 0,
that's 0 plus f of -- so the

00:04:01.510 --> 00:04:08.340
first derivative, it's going to
be 1 times x to the 1 over 1

00:04:08.340 --> 00:04:09.620
factorial, which is just 1.

00:04:09.620 --> 00:04:11.680
This is just 1.

00:04:11.680 --> 00:04:16.540
And then we have -- this is
just plus 0 -- and then we have

00:04:16.540 --> 00:04:21.250
minus -- and now this is the
third derivative -- so, minus 1

00:04:21.250 --> 00:04:26.530
times x to the third
over 3 factorial.

00:04:26.530 --> 00:04:28.150
And then you have a 0.

00:04:28.150 --> 00:04:29.440
Then we have a plus 1.

00:04:29.440 --> 00:04:31.640
And this is now the fifth
derivative, so x to the

00:04:31.640 --> 00:04:34.430
fifth over five factorial.

00:04:34.430 --> 00:04:36.770
And we'll just keep going, but
I think you see the pattern

00:04:36.770 --> 00:04:39.080
as we write and rewrite it.

00:04:39.080 --> 00:04:46.530
Sine of x is equal to 0, so we
get x to the first, so that's

00:04:46.530 --> 00:04:57.850
just x minus x to the third
over 3 factorial plus x to

00:04:57.850 --> 00:05:01.330
the fifth over 5 factorial.

00:05:01.330 --> 00:05:02.650
And then you can
imagine the pattern.

00:05:02.650 --> 00:05:05.320
We'd go minus -- we're just
taking the odd numbers -- x to

00:05:05.320 --> 00:05:11.140
the seventh over 7 factorial
plus x to the ninth over 9

00:05:11.140 --> 00:05:16.930
factorial minus x to the
eleventh over 11 factorial,

00:05:16.930 --> 00:05:20.220
and we'll just keep going.

00:05:20.220 --> 00:05:26.500
And so we'll just keep
oscillating in sine -- that's

00:05:26.500 --> 00:05:29.360
a bit of a pun -- and we use
all of the odd exponents.

00:05:29.360 --> 00:05:33.272
So if I were to write that in
sigma notation, and sigma

00:05:33.272 --> 00:05:36.080
notation often is
the hard part.

00:05:36.080 --> 00:05:41.360
Well once again, the first
term, when the term is 0 --

00:05:41.360 --> 00:05:43.990
this is the first term, right
-- we get a positive sine.

00:05:47.730 --> 00:05:48.710
Because we're going to
oscillate in sine, we're

00:05:48.710 --> 00:05:50.430
probably going to take
negative 1 to some power.

00:05:50.430 --> 00:05:56.180
It'll be negative 1
to the n plus 1.

00:05:56.180 --> 00:05:58.780
So let's see if that works.

00:05:58.780 --> 00:06:03.760
If this is the first term,
this will be a -- no,

00:06:03.760 --> 00:06:04.670
no, no, that won't work.

00:06:04.670 --> 00:06:08.030
It'll be to the 2n plus 1.

00:06:08.030 --> 00:06:09.810
Actually, I think I should
have done that in the

00:06:09.810 --> 00:06:10.980
previous video, too.

00:06:10.980 --> 00:06:13.190
I think it should have been
negative 1 to the 2n,

00:06:13.190 --> 00:06:15.090
not negative 1 to the n.

00:06:15.090 --> 00:06:16.420
I'm sorry for that mistake.

00:06:16.420 --> 00:06:30.090
So it's negative 1 to the 2n
plus 1 times x to the 2n.

00:06:30.090 --> 00:06:32.010
Oh, no, no, sorry, I was
right in the previous video.

00:06:32.010 --> 00:06:35.000
See, I'm confusing
myself, because I don't

00:06:35.000 --> 00:06:37.815
count the 0 terms.

00:06:37.815 --> 00:06:41.000
It would probably help me to
write the sigma down first.

00:06:41.000 --> 00:06:45.800
So this is equal to -- as you
can see I do all of this in

00:06:45.800 --> 00:06:52.010
real time -- infinity
from n is equal to 0.

00:06:52.010 --> 00:06:55.490
And so, the first term is
positive, so it'll be

00:06:55.490 --> 00:06:57.100
negative 1 to the n, right?

00:06:57.100 --> 00:07:01.690
Because negative 1 to the
0 power is 1, right?

00:07:01.690 --> 00:07:03.660
So that's positive and then the
second term is negative, then

00:07:03.660 --> 00:07:07.080
positive, negative, right?

00:07:07.080 --> 00:07:14.620
And so, the zeroth term is x,
so it has to be x to the --

00:07:14.620 --> 00:07:18.480
let me see -- 2n plus 1.

00:07:18.480 --> 00:07:19.080
Does that work?

00:07:19.080 --> 00:07:21.300
Right, because the first
term would then be 3.

00:07:21.300 --> 00:07:31.120
Right. x to the 2n plus 1
over 2n plus 1 factorial.

00:07:31.120 --> 00:07:34.050
It's almost easier when you
just write it out like that.

00:07:34.050 --> 00:07:35.205
Well, that's pretty
interesting.

00:07:35.205 --> 00:07:37.180
But what's even more
interesting is if you see the

00:07:37.180 --> 00:07:41.830
similarity between the
Maclaurin series representation

00:07:41.830 --> 00:07:44.590
for sine of x, and then the
representation we figured

00:07:44.590 --> 00:07:48.650
out for cosine of x in
the previous video.

00:07:48.650 --> 00:07:55.780
We figured out that cosine of x
is equal to 1 minus x squared

00:07:55.780 --> 00:08:03.930
over 2 factorial plus x to the
fourth over 4 factorial minus x

00:08:03.930 --> 00:08:12.310
to the sixth over six factorial
plus x to the eighth

00:08:12.310 --> 00:08:13.790
over 8 factorial.

00:08:13.790 --> 00:08:17.030
So they're almost the
opposite, right?

00:08:17.030 --> 00:08:18.430
They almost complement
each other.

00:08:18.430 --> 00:08:22.410
The cosine, these are all of
the even exponents, right?

00:08:22.410 --> 00:08:23.870
And even factorials.

00:08:23.870 --> 00:08:27.590
And sine is all of the odd
exponents, because this

00:08:27.590 --> 00:08:29.350
is x to the 0, right?

00:08:29.350 --> 00:08:30.640
So that's why you get 1 here.

00:08:30.640 --> 00:08:33.540
And in sine, it's all of the
odd exponents and all of the

00:08:33.540 --> 00:08:35.660
odd factorials in
the denominator.

00:08:35.660 --> 00:08:40.080
So that by itself, I
think, is pretty neat.

00:08:40.080 --> 00:08:45.240
What is especially neat, just
another fodder for thought, is

00:08:45.240 --> 00:08:48.410
that we know from trigonometry
that sine is just a shifted

00:08:48.410 --> 00:08:50.870
cosine function or that cosine
is just a shifted

00:08:50.870 --> 00:08:52.040
sine function.

00:08:52.040 --> 00:08:56.310
But what's neat is by shifting
it by pi over 2 -- which is all

00:08:56.310 --> 00:08:58.560
they are, right, if you were to
graph it, they're just shifted

00:08:58.560 --> 00:09:01.980
90 degrees to the left or the
right of each other -- you can

00:09:01.980 --> 00:09:04.490
actually represent them
differently by essentially

00:09:04.490 --> 00:09:13.160
picking the odd or even terms
of this factorial polynomial

00:09:13.160 --> 00:09:14.600
series, whatever you
want to call it.

00:09:14.600 --> 00:09:15.440
But anyway.

00:09:15.440 --> 00:09:16.900
Doesn't matter if you didn't
understand what I said at

00:09:16.900 --> 00:09:20.600
the end, as long as you
appreciate how cool this is.

00:09:20.600 --> 00:09:23.030
I will see you in
the next video.


Polynomial approximation of functions (part 7)

WEBVTT
Kind: captions
Language: en

00:00:00.930 --> 00:00:01.560
Welcome back.

00:00:01.560 --> 00:00:02.860
So let's continue
where we left off.

00:00:02.860 --> 00:00:07.120
So we had this intuition that i
must have something to do with

00:00:07.120 --> 00:00:08.220
these sign changes, right?

00:00:08.220 --> 00:00:11.330
The pattern of the sign changes
of i are very similar to the

00:00:11.330 --> 00:00:14.340
pattern of the sign changes in
the Maclaurin representation of

00:00:14.340 --> 00:00:16.020
cosine of x plus sine of x.

00:00:16.020 --> 00:00:18.680
And then we also saw that the
i's, whether they're positive

00:00:18.680 --> 00:00:22.720
i's or negative i's,
correspond to the sine terms.

00:00:22.720 --> 00:00:24.310
So let's do a
little experiment.

00:00:24.310 --> 00:00:26.050
And it's not an experiment
because I know where this

00:00:26.050 --> 00:00:29.440
leads to, but it could
have been an experiment.

00:00:29.440 --> 00:00:31.622
What is e to the i x?

00:00:37.190 --> 00:00:39.860
Well, raising anything to the
i power really isn't defined.

00:00:39.860 --> 00:00:43.520
I mean, i, itself, was
created by a definition.

00:00:43.520 --> 00:00:47.300
We said, "i squared is equal to
negative 1 by definition." So

00:00:47.300 --> 00:00:48.490
i is a bit of a definition.

00:00:48.490 --> 00:00:51.590
So if we haven't defined what
something to the i power is

00:00:51.590 --> 00:00:56.910
yet, we really don't know
what to do with it.

00:00:56.910 --> 00:01:00.370
But let's just say that
we can treat i just

00:01:00.370 --> 00:01:01.820
like any other number.

00:01:01.820 --> 00:01:04.840
And we do know what happens
with i when you put

00:01:04.840 --> 00:01:05.740
it into a polynomial.

00:01:05.740 --> 00:01:07.370
That's one thing we do know.

00:01:07.370 --> 00:01:10.400
In fact, that's one of the
reasons why i was defined in

00:01:10.400 --> 00:01:13.810
first place was so that people
could take roots of all

00:01:13.810 --> 00:01:16.800
polynomials, even ones that
didn't have real roots.

00:01:16.800 --> 00:01:19.170
So what happens if we
take e to the i x?

00:01:19.170 --> 00:01:21.970
Well, I don't know what that is
but we know we could put that

00:01:21.970 --> 00:01:24.030
into the Maclaurin
representation of e to the x

00:01:24.030 --> 00:01:26.490
and actually, since you're
taking my leap of faith, that

00:01:26.490 --> 00:01:30.050
that is equal to e of x and all
of its derivatives are equal to

00:01:30.050 --> 00:01:32.870
e to the x's derivatives at x
equals 0, it's not

00:01:32.870 --> 00:01:33.730
that hard to imagine.

00:01:33.730 --> 00:01:35.490
And actually, you could plot
the graph of this and you'll

00:01:35.490 --> 00:01:38.000
see that they're identical.

00:01:38.000 --> 00:01:40.420
So if we take the Maclaurin
representation of this,

00:01:40.420 --> 00:01:44.060
everywhere we see an x we just
replace it with an i x, right?

00:01:44.060 --> 00:01:56.430
So that will be 1 plus i x plus
-- let me just write it -- plus

00:01:56.430 --> 00:02:01.460
i squared x squared
over 2 factorial.

00:02:01.460 --> 00:02:10.110
Oops. i squared x squared plus
i to the third x to the third

00:02:10.110 --> 00:02:18.760
over 3 factorial plus i to the
fourth x to the fourth over 4

00:02:18.760 --> 00:02:25.280
factorial plus i to the fifth x
to the fifth over 5 factorial.

00:02:25.280 --> 00:02:26.500
I don't have to keep going.

00:02:26.500 --> 00:02:28.120
Plus, and it just
keeps going, right?

00:02:28.120 --> 00:02:31.130
So what happens when
you simplify that?

00:02:31.130 --> 00:02:38.520
So that equals 1 plus i
x -- What's i squared?

00:02:38.520 --> 00:02:42.960
That's negative 1, right?
-- minus x squared

00:02:42.960 --> 00:02:45.410
over 2 factorial.

00:02:45.410 --> 00:02:46.250
What's i to the third?

00:02:46.250 --> 00:02:47.160
That's minus i.

00:02:47.160 --> 00:02:55.490
So it's minus i x to the
third over 3 factorial

00:02:55.490 --> 00:02:57.310
plus i to the fourth.

00:02:57.310 --> 00:02:58.140
So what's i to the fourth?

00:02:58.140 --> 00:02:58.870
That's just 1 again.

00:02:58.870 --> 00:03:05.910
So we get plus x to the
fourth over 4 factorial.

00:03:05.910 --> 00:03:07.990
And then we have --
what's i to the fifth?

00:03:07.990 --> 00:03:14.330
Plus i times x to the
fifth over 5 factorial.

00:03:14.330 --> 00:03:16.270
It just keeps going.

00:03:16.270 --> 00:03:17.740
We have something
interesting here.

00:03:17.740 --> 00:03:21.000
Now, all of a sudden, we have
something extremely similar to

00:03:21.000 --> 00:03:26.670
this except for only
one difference.

00:03:26.670 --> 00:03:28.790
Compare that to e to the i x.

00:03:33.000 --> 00:03:35.740
The dots on my i's
always get merged.

00:03:35.740 --> 00:03:38.970
Compare these 2 things
that I'm circling.

00:03:38.970 --> 00:03:40.710
What's the difference?

00:03:40.710 --> 00:03:41.870
Let's see the 1, 1.

00:03:41.870 --> 00:03:44.710
Well, here, I have an
x, I have an i x here.

00:03:44.710 --> 00:03:47.410
Then minus x squared
over 2 fact -- so these

00:03:47.410 --> 00:03:48.830
terms are the same.

00:03:48.830 --> 00:03:53.330
Then on the x to the third, the
signs are right but have an i.

00:03:53.330 --> 00:03:55.850
And then, x to the fourth over
4 factorial -- that's identical

00:03:55.850 --> 00:03:59.850
-- but then on x to the
fifth, I have an i.

00:03:59.850 --> 00:04:04.360
So the only difference between
this and this is on the terms

00:04:04.360 --> 00:04:07.290
that involve sin of x, right?

00:04:07.290 --> 00:04:10.030
So what are the terms
that involve sin of x?

00:04:10.030 --> 00:04:15.690
This term corresponds
to that term, right?

00:04:15.690 --> 00:04:20.140
This term corresponds
to that term.

00:04:20.140 --> 00:04:22.430
These are the terms that
correspond to sin of x

00:04:22.430 --> 00:04:24.720
in this representation.

00:04:24.720 --> 00:04:27.070
That term corresponds
to that term.

00:04:27.070 --> 00:04:29.750
And the only difference is --
so this has all of the terms

00:04:29.750 --> 00:04:33.330
that the sin of x would have
but they all have an i in

00:04:33.330 --> 00:04:33.880
front of them, right?

00:04:33.880 --> 00:04:35.060
Even the sign is right.

00:04:35.060 --> 00:04:36.150
This is negative,
that's negative.

00:04:36.150 --> 00:04:38.600
But this just has an
i in front of it.

00:04:38.600 --> 00:04:42.210
So it turns out, that you
could rewrite this, right?

00:04:42.210 --> 00:04:44.080
You could rewrite
this representation.

00:04:44.080 --> 00:04:45.160
Well, it doesn't turn out.

00:04:45.160 --> 00:04:46.360
It's pretty obvious
you could rewrite it.

00:04:46.360 --> 00:04:53.170
Let me clear this
just so we get a --

00:04:53.170 --> 00:04:55.952
So we could actually
rewrite that e to the i x.

00:05:01.280 --> 00:05:05.600
And we could write it -- we
could separate out the

00:05:05.600 --> 00:05:08.500
imaginary terms and we could
separate out the real terms.

00:05:08.500 --> 00:05:10.240
What were the real terms?

00:05:10.240 --> 00:05:19.020
Well, the real terms were 1
minus x squared over 2

00:05:19.020 --> 00:05:27.390
factorial plus x to the fourth
over 4 factorial minus x to the

00:05:27.390 --> 00:05:29.070
sixth over 6 factorial.

00:05:29.070 --> 00:05:31.190
And it just kept going
to infinity, right?

00:05:31.190 --> 00:05:32.210
Those were the real terms.

00:05:35.020 --> 00:05:37.670
That's to infinity dot dot dot.

00:05:37.670 --> 00:05:40.590
This pen tool looks
like minus signs.

00:05:40.590 --> 00:05:41.280
I don't want to do that.

00:05:45.840 --> 00:05:47.760
Oh, I can't undo it.

00:05:47.760 --> 00:05:49.335
So this is just dot dot dot.

00:05:52.320 --> 00:05:56.030
So those are the real
terms, essentially.

00:05:56.030 --> 00:06:01.310
And then, the imaginary terms
-- it was plus -- well, all of

00:06:01.310 --> 00:06:02.810
these terms are going to
have i on them, right?

00:06:02.810 --> 00:06:04.980
So let me just take the i out.

00:06:04.980 --> 00:06:10.910
So, plus i times -- and we
figured out that those terms

00:06:10.910 --> 00:06:14.535
were x minus -- well, I don't
want to give it away too fast

00:06:14.535 --> 00:06:18.740
-- x to the third
over 3 factorial.

00:06:18.740 --> 00:06:25.070
Plus x to the fifth over 5
factorial minus x to the

00:06:25.070 --> 00:06:29.170
seventh over 7 factorial and
it just kept going on, on,

00:06:29.170 --> 00:06:31.600
and on to infinity, right?

00:06:31.600 --> 00:06:36.600
Well isn't this the Maclaurin
representation of cosine of x?

00:06:36.600 --> 00:06:40.810
And similarly, isn't this the
Maclaurin representation

00:06:40.810 --> 00:06:42.890
of sin of x?

00:06:42.890 --> 00:06:43.610
Well yeah, sure.

00:06:43.610 --> 00:06:46.640
And you probably realized it in
the previous screen where I

00:06:46.640 --> 00:06:49.370
showed that all of the
imaginary terms corresponded

00:06:49.370 --> 00:06:51.060
to the sin of x terms.

00:06:51.060 --> 00:06:53.600
And all the real ones,
likewise, were the cosine of x

00:06:53.600 --> 00:06:57.480
when we we compared it to sin
of x plus cosine of x.

00:06:57.480 --> 00:07:02.895
So if you believe me, that the
Maclaurin representation of e

00:07:02.895 --> 00:07:06.160
to the x is equal to e to the x
and the Maclaurin

00:07:06.160 --> 00:07:08.700
representation of cosine and
sin of x are equal to those

00:07:08.700 --> 00:07:13.080
functions, then all of a
sudden, we come up with this

00:07:13.080 --> 00:07:21.400
bizarre and amazing and
mystical idea that e to the i x

00:07:21.400 --> 00:07:28.880
is equal to cosin of x plus i
times the sin of x.

00:07:28.880 --> 00:07:32.160
And this is called
Euler's formula.

00:07:32.160 --> 00:07:33.660
And actually e
stands for Euler.

00:07:33.660 --> 00:07:34.890
That's where it comes from.

00:07:34.890 --> 00:07:36.930
Euler starts with an E.

00:07:36.930 --> 00:07:38.520
E U L E R.

00:07:38.520 --> 00:07:40.480
But this is amazing.

00:07:40.480 --> 00:07:43.640
Not only have we found a
relationship between this

00:07:43.640 --> 00:07:48.980
bizarre, mystical, magical
number, e, and these

00:07:48.980 --> 00:07:52.290
trigonometric functions that we
defined as a ratio of the sides

00:07:52.290 --> 00:07:55.210
of right triangles, but now
we're involving this other

00:07:55.210 --> 00:07:58.670
mystical, magical number that
we invented just so that all of

00:07:58.670 --> 00:08:02.210
our polynomials would have some
root, whether or not

00:08:02.210 --> 00:08:03.040
they're real or not.

00:08:03.040 --> 00:08:07.240
We have this number, i, all
of a sudden showing up.

00:08:07.240 --> 00:08:09.340
This by itself is amazing.

00:08:09.340 --> 00:08:12.890
But now we can take it one
step further and this

00:08:12.890 --> 00:08:14.540
should blow your mind.

00:08:14.540 --> 00:08:17.850
If it doesn't, then
you have no emotion.

00:08:17.850 --> 00:08:19.600
I will just judge you.

00:08:19.600 --> 00:08:24.680
So if we take this and,
essentially, we're taking it

00:08:24.680 --> 00:08:27.530
that when you take something to
the i power, that you can just

00:08:27.530 --> 00:08:29.170
substitute it into this
Maclaurin repres -- but I

00:08:29.170 --> 00:08:30.350
won't go into the details.

00:08:30.350 --> 00:08:32.770
But I think you can say
that this is a pretty

00:08:32.770 --> 00:08:34.980
reasonable proposition.

00:08:34.980 --> 00:08:39.140
But what happens if we take
something to the pi power?

00:08:39.140 --> 00:08:41.620
If e to the i pi power?

00:08:41.620 --> 00:08:43.310
Before, we didn't have any
way of saying, "Well,

00:08:43.310 --> 00:08:43.930
what does that mean?

00:08:43.930 --> 00:08:45.910
Taking something to the i pi
power?" But now we do because

00:08:45.910 --> 00:08:47.730
we're saying that these
2 sides of this are

00:08:47.730 --> 00:08:48.490
equal to each other.

00:08:48.490 --> 00:08:50.550
So what happens?

00:08:50.550 --> 00:08:54.360
Let me do this in a bold color
because it deserves to be bold.

00:08:54.360 --> 00:09:00.410
e to the i pi is equal to well,
where x is pi, is equal to

00:09:00.410 --> 00:09:07.110
cosine of pi plus i sin of pi.

00:09:07.110 --> 00:09:08.940
Well what's cosine of pi?

00:09:08.940 --> 00:09:10.960
This is equal to negative 1.

00:09:10.960 --> 00:09:14.090
And sin of pi, well
that's just equal to 0.

00:09:14.090 --> 00:09:22.140
We get e to the i pi is
equal to negative 1.

00:09:22.140 --> 00:09:23.690
This is amazing.

00:09:23.690 --> 00:09:31.810
Or you could also write e to
the i pi plus 1 is equal to 0.

00:09:31.810 --> 00:09:33.520
Once again, amazing.

00:09:33.520 --> 00:09:38.100
Either of these should make you
question your take on reality

00:09:38.100 --> 00:09:40.565
because we have the number pi,
which is a ratio of a

00:09:40.565 --> 00:09:42.260
circumference of a
circle to its diameter.

00:09:42.260 --> 00:09:47.120
We have the number, e, that
comes from a continuous

00:09:47.120 --> 00:09:48.030
compound interest.

00:09:48.030 --> 00:09:51.750
And then we have the number, i,
which you can say the square

00:09:51.750 --> 00:09:54.040
root of negative 1 or it
squared is negative 1.

00:09:54.040 --> 00:09:55.530
And they all come together.

00:09:55.530 --> 00:09:58.390
This formula right here
involves all the fundamental

00:09:58.390 --> 00:10:01.370
numbers in mathematics but
they come from completely

00:10:01.370 --> 00:10:02.640
different directions.

00:10:02.640 --> 00:10:04.190
Completely different
directions.

00:10:04.190 --> 00:10:07.190
And although we can prove this
and we can say this is true,

00:10:07.190 --> 00:10:10.210
I'll tell you no one -- no one
-- probably in the history

00:10:10.210 --> 00:10:13.210
of mankind, fully
understands why this is.

00:10:13.210 --> 00:10:16.830
This is just a glimpse on some
type of order in the universe.


Polynomial approximation of functions (part 6)

WEBVTT
Kind: captions
Language: en

00:00:00.000 --> 00:00:02.320
Well let's review a little
bit everything that

00:00:02.320 --> 00:00:03.740
we've covered so far.

00:00:03.740 --> 00:00:05.970
So what was the Maclaurin
Series representation

00:00:05.970 --> 00:00:07.540
of e to the x?

00:00:07.540 --> 00:00:09.900
And once again, you'll have to
take my word for it, that the

00:00:09.900 --> 00:00:12.930
Maclaurin Series representation
really does equal, when you

00:00:12.930 --> 00:00:16.040
take the infinite series, it
really does equal e to the x.

00:00:16.040 --> 00:00:17.700
I mentioned in a previous
video that I was thinking

00:00:17.700 --> 00:00:18.710
about the proof.

00:00:18.710 --> 00:00:21.390
And I finally gave up because I
couldn't think of the proof.

00:00:21.390 --> 00:00:23.710
And then I looked it up and I
realized why I couldn't think

00:00:23.710 --> 00:00:25.740
of the proof, it's
quite involved.

00:00:25.740 --> 00:00:27.540
But I will do it eventually.

00:00:27.540 --> 00:00:30.080
Probably after I cover a lot of
other things just because it's

00:00:30.080 --> 00:00:33.680
not something that you really
have to know to succeed well in

00:00:33.680 --> 00:00:36.890
calculus, or appreciate
what we're about to do.

00:00:36.890 --> 00:00:37.415
But I will do it.

00:00:37.415 --> 00:00:38.540
It'll probably take
five or six minutes.

00:00:38.540 --> 00:00:40.410
Anyway back to where we were.

00:00:40.410 --> 00:00:43.250
So the Maclaurin Series
repetition of e to the x, and

00:00:43.250 --> 00:00:51.510
it actually does equal e to the
x, is 1 plus x, plus x squared

00:00:51.510 --> 00:00:57.040
over 2 factorial, plus x to the
third over 3 factorial.

00:00:57.040 --> 00:00:58.870
I'm going to do a bunch of
terms and you'll see why.

00:00:58.870 --> 00:01:04.940
And x to the fourth over 4
factorial, plus x to the fifth,

00:01:04.940 --> 00:01:12.280
over 5 factorial, plus x to the
sixth, over 6 factorial, plus

00:01:12.280 --> 00:01:17.500
x to the seventh over 7
factorial, plus x to the

00:01:17.500 --> 00:01:20.540
eighth over 8 factorial.

00:01:20.540 --> 00:01:25.600
And it just keeps going on
and on to infinity, right?

00:01:25.600 --> 00:01:27.730
Only when we take the infinite
series does it exactly

00:01:27.730 --> 00:01:29.450
equal e to the x.

00:01:29.450 --> 00:01:31.010
Fair enough.

00:01:31.010 --> 00:01:33.510
Well what was the Maclaurin
Series representation

00:01:33.510 --> 00:01:34.340
of cosine of x?

00:01:40.880 --> 00:01:43.530
Well that equaled -- and I'm
going to space them out in a

00:01:43.530 --> 00:01:49.610
certain way, and I think you'll
see why -- it equalled 1 plus x

00:01:49.610 --> 00:01:54.680
squared over -- oh no, sorry, 1
minus, this is a minus sign,

00:01:54.680 --> 00:01:56.850
let me erase that because I
want to make this as

00:01:56.850 --> 00:01:58.790
neat as possible.

00:01:58.790 --> 00:02:05.760
Equal to 1 minus x squared over
2 factorial, right, we learned

00:02:05.760 --> 00:02:11.600
that two videos ago, plus x
to the fourth over for 4

00:02:11.600 --> 00:02:17.400
factorial, minus x to the
sixth over 6 factorial.

00:02:17.400 --> 00:02:19.770
I think you might already know
know where I'm going with this.

00:02:19.770 --> 00:02:26.090
Plus x to the eighth over 8
factorial, and it just kept

00:02:26.090 --> 00:02:28.470
going, the next digit would
be a minus out here.

00:02:28.470 --> 00:02:29.890
And it goes to infinity, right?

00:02:29.890 --> 00:02:31.790
For that pattern, you
know the pattern.

00:02:31.790 --> 00:02:33.100
And what is sine of x?

00:02:33.100 --> 00:02:36.840
What's the Maclaurin Series
representation for sine of x?

00:02:36.840 --> 00:02:47.830
Well, sine of x, it equals x
minus x to the third over 3

00:02:47.830 --> 00:02:57.550
factorial, plus x to the fifth
over 5 factorial, minus x to

00:02:57.550 --> 00:03:01.960
the seventh over 7 factorial,
and it just keeps going.

00:03:01.960 --> 00:03:03.270
You'd have an x to
the ninth out here.

00:03:03.270 --> 00:03:05.050
But it goes on for
infinity, right?

00:03:05.050 --> 00:03:08.430
These all go on for infinity,
but you know the pattern.

00:03:08.430 --> 00:03:13.280
So let's just pause here
because this is, I think if you

00:03:13.280 --> 00:03:15.510
understand what's going on, one
of the few things in life that

00:03:15.510 --> 00:03:16.880
will truly give you chills.

00:03:16.880 --> 00:03:21.630
It'll truly make you believe
that there is a order to the

00:03:21.630 --> 00:03:25.410
universe that we as
human beings can only

00:03:25.410 --> 00:03:26.600
catch a glimpse of.

00:03:26.600 --> 00:03:28.960
We have limited minds.

00:03:28.960 --> 00:03:32.410
But we are on the verge, we're
scraping the surface, but

00:03:32.410 --> 00:03:33.390
there's something amazing here.

00:03:33.390 --> 00:03:36.250
Cosine of x and sine of x.

00:03:36.250 --> 00:03:41.520
Each of their Maclaurin Series
representations, or if you were

00:03:41.520 --> 00:03:44.980
essentially to write them as
polynomials, each of them looks

00:03:44.980 --> 00:03:47.490
like it's almost like part
of e to the x, right?

00:03:47.490 --> 00:03:48.960
It's almost every other digit.

00:03:48.960 --> 00:03:51.000
And they would be the
same except for a

00:03:51.000 --> 00:03:52.950
couple of sign changes.

00:03:52.950 --> 00:03:54.600
Let me make that clear.

00:03:54.600 --> 00:03:56.440
So what if I were to define
the function cosine

00:03:56.440 --> 00:03:57.575
of x plus sine of x?

00:04:05.800 --> 00:04:06.760
What would that equal?

00:04:06.760 --> 00:04:09.740
Or what would it's Maclaurin
Series representation

00:04:09.740 --> 00:04:11.230
of that be?

00:04:11.230 --> 00:04:13.300
Well, and then we know
that it's also equal.

00:04:13.300 --> 00:04:15.030
But it's essentially
adding these two rows.

00:04:15.030 --> 00:04:23.270
So it would be 1 plus x, minus
squared over 2 factorial,

00:04:23.270 --> 00:04:32.200
minus x to the third over 3
factorial, plus x to the fourth

00:04:32.200 --> 00:04:39.450
over 4 factorial, plus x to the
fifth over 5 factorial, minus x

00:04:39.450 --> 00:04:46.020
to the sixth over 6 factorial,
minus x to the seventh over 7

00:04:46.020 --> 00:04:50.290
factorial, plus x to the
eight over 8 factorial.

00:04:50.290 --> 00:04:51.720
And it just keeps going, right?

00:04:51.720 --> 00:04:54.890
The next one would be a plus,
it goes on to infinity.

00:04:54.890 --> 00:04:58.220
Now I think it should be clear
to you that something, that the

00:04:58.220 --> 00:05:00.940
goose bumps should be
emerging on your arm.

00:05:00.940 --> 00:05:03.290
Because look at this,
and look at e to the x.

00:05:03.290 --> 00:05:04.160
What's the difference?

00:05:04.160 --> 00:05:05.940
Well, just a couple of negative
signs here and there.

00:05:09.590 --> 00:05:13.500
Let me do it in a
slightly brighter color.

00:05:13.500 --> 00:05:17.750
So the only difference between
this function and this function

00:05:17.750 --> 00:05:20.760
are these negative signs.

00:05:20.760 --> 00:05:27.090
And I've seen this before, I've
learned this before, people for

00:05:27.090 --> 00:05:29.740
hundreds of years
have known this.

00:05:29.740 --> 00:05:30.980
But I'll tell you something.

00:05:30.980 --> 00:05:33.970
No one, even though they can
prove it mathematically, no one

00:05:33.970 --> 00:05:35.780
really understands why this is.

00:05:35.780 --> 00:05:39.880
Why we take these trigonometric
functions that appear, you

00:05:39.880 --> 00:05:42.890
know, when we take the ratios
of the sides of a right

00:05:42.890 --> 00:05:46.040
triangle, or the unit circle
definition, and you know it's

00:05:46.040 --> 00:05:50.420
useful for, you know, triangle
measure, that's trigonometry.

00:05:50.420 --> 00:05:53.990
That's where we came up with
this cosine and sine functions.

00:05:53.990 --> 00:05:57.160
And it's related to the
circle and all the rest.

00:05:57.160 --> 00:06:01.110
That when you add these two
fundamental functions together

00:06:01.110 --> 00:06:02.200
from trigonometry, right?

00:06:02.200 --> 00:06:04.360
Because tangent is really
just the ratio of

00:06:04.360 --> 00:06:05.070
the sine to cosine.

00:06:05.070 --> 00:06:06.950
So these are really what
trigonometry, this is the

00:06:06.950 --> 00:06:07.590
basis of trigonometry.

00:06:07.590 --> 00:06:12.350
When you add their polynomial
representations together, it's

00:06:12.350 --> 00:06:16.320
almost exactly, except for
these negative signs, the

00:06:16.320 --> 00:06:18.580
polynomial representation
of e to the x.

00:06:18.580 --> 00:06:20.850
And the number e, and first
of all, this is an exponent,

00:06:20.850 --> 00:06:22.310
these are no exponents here.

00:06:22.310 --> 00:06:27.980
And e is just completely
unrelated, or at least one

00:06:27.980 --> 00:06:30.410
would think from trigonometry.

00:06:30.410 --> 00:06:33.760
Right, e is, we got e from
compound interest, you'll

00:06:33.760 --> 00:06:36.800
see that it's related to
exponential growth, exponential

00:06:36.800 --> 00:06:40.440
decay, when you have continuous
exponential growth and decay,

00:06:40.440 --> 00:06:41.930
continuous compound interest.

00:06:41.930 --> 00:06:46.620
If this number that is in a
completely unrelated field of,

00:06:46.620 --> 00:06:48.870
not just mathematics, but
really the universe, right?

00:06:48.870 --> 00:06:53.620
Continuous interest vs.
the ratios of the sides

00:06:53.620 --> 00:06:55.210
of right triangles.

00:06:55.210 --> 00:07:00.280
So this should already be
getting you thinking.

00:07:00.280 --> 00:07:03.300
But what would be even more
amazing is if we could somehow

00:07:03.300 --> 00:07:07.880
work with these to make them
a little bit more equal.

00:07:07.880 --> 00:07:10.170
Well, the only thing that's
different are these

00:07:10.170 --> 00:07:11.750
negative signs, right?

00:07:11.750 --> 00:07:13.920
So do we know anything else
in mathematics, in our

00:07:13.920 --> 00:07:16.400
mathematical tool kit,
that has this pattern?

00:07:16.400 --> 00:07:18.690
Where it goes positive
positive, negative negative,

00:07:18.690 --> 00:07:20.480
positive positive,
negative negative?

00:07:20.480 --> 00:07:23.220
It has this essentially
the cycle of four.

00:07:23.220 --> 00:07:27.430
Well you might be thinking, and
this will even give you larger

00:07:27.430 --> 00:07:31.990
goose bumps, or make your
current ones bigger, the number

00:07:31.990 --> 00:07:35.870
i, or the imaginary unit i.

00:07:35.870 --> 00:07:37.390
So what are the powers of i?

00:07:37.390 --> 00:07:38.370
This is a little review.

00:07:38.370 --> 00:07:41.050
If this is completely
unfamiliar to you, you should

00:07:41.050 --> 00:07:44.460
re-watch the imaginary
numbers video.

00:07:44.460 --> 00:07:46.120
So what are the powers of i?

00:07:46.120 --> 00:07:53.400
Well i to the zero is 1, i to
the first is i, i squared is

00:07:53.400 --> 00:08:00.550
negative 1, i to the third
power, that's negative 1

00:08:00.550 --> 00:08:02.570
times i, so it's negative i.

00:08:05.330 --> 00:08:09.990
i to the fourth power is i
times negative i, so the

00:08:09.990 --> 00:08:12.180
i's become negative 1 and
then you have a negative

00:08:12.180 --> 00:08:13.770
there, so it becomes 1.

00:08:13.770 --> 00:08:17.720
And the pattern repeats itself.
i to the fifth is i, i to

00:08:17.720 --> 00:08:19.050
the sixth is negative 1.

00:08:19.050 --> 00:08:21.040
We learned this before,
but it's just a review.

00:08:21.040 --> 00:08:25.460
i to the seventh is negative
i, i to the eighth

00:08:25.460 --> 00:08:28.840
then becomes 1 again.

00:08:28.840 --> 00:08:32.690
So there you have it,
this is amazing.

00:08:32.690 --> 00:08:36.796
i has that property where the
second two in the cycle of

00:08:36.796 --> 00:08:37.670
four are negative, right?

00:08:37.670 --> 00:08:40.100
We have a negative number here.

00:08:40.100 --> 00:08:41.950
This is not necessarily a
negative number, it's a

00:08:41.950 --> 00:08:44.090
negative imaginary number, but
we have that negative sign, so

00:08:44.090 --> 00:08:46.300
it looks pretty similar, right?

00:08:46.300 --> 00:08:48.430
Then we have two positives,
then we have a negative

00:08:48.430 --> 00:08:50.610
and a negative.

00:08:50.610 --> 00:08:53.390
And something else is
interesting going on here.

00:08:53.390 --> 00:08:57.040
Wherever we see the imaginary
number, whenever we see an i

00:08:57.040 --> 00:09:02.000
or a negative i, which terms
do they correspond to?

00:09:02.000 --> 00:09:05.470
Well they correspond to the
terms of sine of x, right?

00:09:05.470 --> 00:09:08.070
It corresponds to that term,
negative i corresponds

00:09:08.070 --> 00:09:09.800
to that term.

00:09:09.800 --> 00:09:13.020
i corresponds to that term,
negative i corresponds

00:09:13.020 --> 00:09:14.950
to that term.

00:09:14.950 --> 00:09:20.550
So we have something, it
seems a little bit even

00:09:20.550 --> 00:09:21.910
more of a pattern.

00:09:21.910 --> 00:09:26.260
But anyway, I just realized I
only have -- I have to say I'm

00:09:26.260 --> 00:09:28.320
normally pretty smooth in these
videos, but when I start

00:09:28.320 --> 00:09:31.820
talking about what I'm talking
about right now, my brain

00:09:31.820 --> 00:09:32.750
starts to go in circles.

00:09:32.750 --> 00:09:37.250
Because this is, I've actually
even heard, you know, what

00:09:37.250 --> 00:09:41.300
we're what we're about to touch
on, as proof of the

00:09:41.300 --> 00:09:42.420
existence of God.

00:09:42.420 --> 00:09:45.150
And really, that's not that
much of an exaggeration.

00:09:45.150 --> 00:09:49.100
It is definitely proof of the
existence of some hidden order

00:09:49.100 --> 00:09:51.770
of the universe that we can
only catch a glimpse of.

00:09:51.770 --> 00:09:53.520
And maybe you can
call that God.

00:09:53.520 --> 00:09:55.500
But anyway, I don't want to get
metaphysical on you, but I will

00:09:55.500 --> 00:09:57.910
see you in the next video.


Polynomial approximation of functions (part 4)

WEBVTT
Kind: captions
Language: en

00:00:00.820 --> 00:00:05.770
We in the last video we took
the Macloren series of

00:00:05.770 --> 00:00:07.840
representation of e to the x.

00:00:07.840 --> 00:00:11.650
Now let's do it with a couple
of other functions and we'll

00:00:11.650 --> 00:00:15.880
see in a few videos it all fits
together like a giant puzzle.

00:00:15.880 --> 00:00:17.720
Let's do cosine of x.

00:00:17.720 --> 00:00:25.690
Let's set f of x, f of x
is equal to cosine of x.

00:00:25.690 --> 00:00:27.000
What's f prime of x?

00:00:27.000 --> 00:00:30.290
What's the first derivative
of cosine of x?

00:00:30.290 --> 00:00:34.230
Well that just equals
minus sine of x.

00:00:34.230 --> 00:00:35.550
Minus sine of x.

00:00:35.550 --> 00:00:36.300
What's the second derivative?

00:00:39.020 --> 00:00:42.410
Well that's just minus times
derivative of sine of x.

00:00:42.410 --> 00:00:44.170
So the derivative of sine
of x is cosine x, it's

00:00:44.170 --> 00:00:47.590
minus cosine of x.

00:00:47.590 --> 00:00:49.980
And what's the
third derivative?

00:00:49.980 --> 00:00:54.150
f 3 of x.

00:00:54.150 --> 00:00:56.500
The derivative of cosine x is
minus sine of x, we already

00:00:56.500 --> 00:00:58.585
have a minus here so it
becomes positive sine of x.

00:01:02.200 --> 00:01:04.980
What's f 4 of x?

00:01:04.980 --> 00:01:08.140
The fourth derivative of x?

00:01:08.140 --> 00:01:11.430
It equals cosine of x again.

00:01:11.430 --> 00:01:15.110
As we keep taking derivatives
we'll keep repeating and the

00:01:15.110 --> 00:01:16.540
pattern will go on, right?

00:01:16.540 --> 00:01:21.460
The fifth derivative of x, the
fifth derivative of this

00:01:21.460 --> 00:01:24.990
function, the fourth is the
same as a function, so the

00:01:24.990 --> 00:01:27.010
fifth is going to be the same
as the first derivative.

00:01:27.010 --> 00:01:29.480
cosine of x is sine of x.

00:01:29.480 --> 00:01:31.230
Hopefully you see the pattern.

00:01:31.230 --> 00:01:33.950
We're going to do the Macloren
representation, which is a

00:01:33.950 --> 00:01:37.600
specific example of the Taylor
series where we figure out the

00:01:37.600 --> 00:01:40.100
values of the derivatives
at x is equal to zero.

00:01:40.100 --> 00:01:41.990
So let's do that right now.

00:01:41.990 --> 00:01:44.080
So f of zero, let me do
it in to another color

00:01:44.080 --> 00:01:47.210
to fend off monotony.

00:01:47.210 --> 00:01:48.060
f of zero.

00:01:48.060 --> 00:01:49.720
What's cosine of zero?

00:01:49.720 --> 00:01:53.410
Cosine of zero is 1.

00:01:53.410 --> 00:01:58.240
f prime of zero is equal to
sine of-- well not minus sine

00:01:58.240 --> 00:01:59.780
of zero, but what sine of zero?

00:01:59.780 --> 00:02:02.230
Sine of zero is zero,
so minus zero is still

00:02:02.230 --> 00:02:04.850
zero, so this is zero.

00:02:04.850 --> 00:02:08.970
f prime prime of zero.

00:02:08.970 --> 00:02:10.630
Cosine of zero we
already know is one.

00:02:10.630 --> 00:02:14.310
We have a negative sine here,
so it becomes a minus one.

00:02:14.310 --> 00:02:17.440
The third derivative at
x is equal to zero.

00:02:17.440 --> 00:02:19.306
Sine of zero is zero.

00:02:19.306 --> 00:02:19.720
So this is zero.

00:02:19.720 --> 00:02:22.490
I think you might start to
see a pattern emerging.

00:02:22.490 --> 00:02:25.470
The fourth derivative at zero.

00:02:25.470 --> 00:02:28.840
Cosine of zero is equal to 1.

00:02:28.840 --> 00:02:32.390
And then the fifth derivative,
this is hard to read but you

00:02:32.390 --> 00:02:36.170
get the point is
just zero again.

00:02:36.170 --> 00:02:38.930
So what's the pattern as
we take the derivatives?

00:02:38.930 --> 00:02:42.710
1, zero, minus 1,
zero, 1, zero.

00:02:42.710 --> 00:02:45.550
So it alternates
between zero and 1.

00:02:45.550 --> 00:02:48.950
So 1, zero, minus 1, zero,
positive, zero, negative,

00:02:48.950 --> 00:02:50.340
zero, positive.

00:02:50.340 --> 00:02:53.840
So every other number is zero
and in between them we

00:02:53.840 --> 00:02:57.010
alternate between a positive
1 and a negative 1.

00:02:57.010 --> 00:02:59.500
So now let's use that
information to figure

00:02:59.500 --> 00:03:02.720
out them the Macloren
series representation.

00:03:02.720 --> 00:03:07.160
So we proved, hopefully, we
didn't prove it definitely

00:03:07.160 --> 00:03:10.370
converges over the entire
domain of the function.

00:03:10.370 --> 00:03:11.740
You have to take
my word for it.

00:03:11.740 --> 00:03:13.840
We'll experiment a little bit
with a graphing calculator

00:03:13.840 --> 00:03:15.260
in a few videos.

00:03:15.260 --> 00:03:17.870
We said that this
representation-- and it should

00:03:17.870 --> 00:03:20.690
make intuitive sense, because
when you take the infinite

00:03:20.690 --> 00:03:23.720
Macloren series, when you take
that infinite sum, you're

00:03:23.720 --> 00:03:27.510
essentially creating a function
where that function is equal to

00:03:27.510 --> 00:03:30.240
your original function at
the point you chose.

00:03:30.240 --> 00:03:33.200
In the case of a Macloren we're
picking x equals zero, and it

00:03:33.200 --> 00:03:35.270
equals every derivative
of this function.

00:03:37.770 --> 00:03:40.090
Just intuitively it seems, well
if a function equals something

00:03:40.090 --> 00:03:44.490
at a point and every one of its
derivatives is also equal to

00:03:44.490 --> 00:03:46.070
the function at that point,
maybe those functions are

00:03:46.070 --> 00:03:47.530
equal to each other.

00:03:47.530 --> 00:03:51.150
I haven't proven
that to you yet.

00:03:51.150 --> 00:03:54.800
We know that the representation
is a sum from n is equal to

00:03:54.800 --> 00:04:04.330
zero to infinity of the nth
derivative evaluated at zero.

00:04:04.330 --> 00:04:06.790
A Macloren series is a specific
case of a Taylor series.

00:04:06.790 --> 00:04:08.760
We actually haven't done
anything with Taylor series, I

00:04:08.760 --> 00:04:10.380
was hoping to get there later.

00:04:10.380 --> 00:04:11.980
But the Macloren series is a
really cool one because it's

00:04:11.980 --> 00:04:14.770
going to show us all these
relationships between e and

00:04:14.770 --> 00:04:18.990
cosine and sine and eventually
i and pi and you will

00:04:18.990 --> 00:04:20.120
find it exciting.

00:04:20.120 --> 00:04:26.390
The Macloren is that times x
to the n over n factorial.

00:04:26.390 --> 00:04:27.630
That's what we said it was.

00:04:27.630 --> 00:04:31.250
So if this is our f of x, f
of x is cosine of x, what

00:04:31.250 --> 00:04:33.360
does this turn into?

00:04:33.360 --> 00:04:45.256
Well, f of x is equal to, it
equals f of zero times x to

00:04:45.256 --> 00:04:48.610
the zero over zero factorial,
that's just one, right?

00:04:48.610 --> 00:04:51.510
Plus, now we're at n equals 1.

00:04:51.510 --> 00:04:54.010
It's the first
derivative at zero.

00:04:54.010 --> 00:04:56.740
f prime of zero, well
that's just equal to zero.

00:04:56.740 --> 00:04:58.350
And who cares what that--
that would be x to the

00:04:58.350 --> 00:05:01.230
first over 1, right?

00:05:01.230 --> 00:05:03.480
Now we're at the
second derivative.

00:05:03.480 --> 00:05:06.970
The second derivative
at zero is minus 1.

00:05:06.970 --> 00:05:14.570
Minus 1 times x squared
over 2 factorial plus the

00:05:14.570 --> 00:05:16.450
third derivative at zero.

00:05:16.450 --> 00:05:20.340
The third derivative at zero
we figured out was zero.

00:05:20.340 --> 00:05:21.590
Zero who cares what that is.

00:05:21.590 --> 00:05:26.890
It would have been x to the
third over 3 factorial.

00:05:26.890 --> 00:05:29.800
And then what's the
fourth derivative?

00:05:29.800 --> 00:05:35.430
The fourth derivative at
zero is just equal to 1.

00:05:35.430 --> 00:05:39.200
So we have times 1 and then
we're at x to the fourth

00:05:39.200 --> 00:05:42.570
over 4 factorial.

00:05:42.570 --> 00:05:44.460
Let me see if I can write
this a little bit neater.

00:05:44.460 --> 00:05:47.370
The next one, the fifth
derivative at zero times x to

00:05:47.370 --> 00:05:49.230
the fifth over 5 factorial.

00:05:49.230 --> 00:05:50.230
We'll keep going.

00:05:50.230 --> 00:05:52.980
Let me write this, clean this
up and hopefully the pattern

00:05:52.980 --> 00:05:55.530
merges if it hasn't
emerged already.

00:05:55.530 --> 00:06:00.740
f of x is equal to cosine of x
is equal to-- let met get rid

00:06:00.740 --> 00:06:06.850
of the zeros-- 1 and then we
have minus x squared

00:06:06.850 --> 00:06:11.350
over 2 factorial.

00:06:11.350 --> 00:06:12.860
This term, this goes away.

00:06:12.860 --> 00:06:13.800
This is a zero term.

00:06:13.800 --> 00:06:15.680
And the next one is a positive.

00:06:15.680 --> 00:06:21.330
Plus x to the fourth
over 4 factorial.

00:06:21.330 --> 00:06:22.620
And the fifth term goes away.

00:06:22.620 --> 00:06:23.600
But then the cycle continues.

00:06:23.600 --> 00:06:25.160
The next one is
going to be minus.

00:06:25.160 --> 00:06:27.000
Because we had minus 1 plus 1.

00:06:27.000 --> 00:06:31.380
It's going to be minus x to
the sixth over 6 factorial.

00:06:31.380 --> 00:06:32.420
You could take the
sixth derivative.

00:06:32.420 --> 00:06:36.070
You'll see that the derivative
of minus sine of x is minus

00:06:36.070 --> 00:06:38.880
cosine of x, that's where
we get the minus 1 from.

00:06:38.880 --> 00:06:40.500
And they we're
going to go plus.

00:06:40.500 --> 00:06:45.160
So we're just taking all the
even terms. x to the eighth

00:06:45.160 --> 00:06:53.460
over 8 factorial minus x to
the 10th over 10 factorial.

00:06:53.460 --> 00:06:57.360
We could just keep going
on and on and on.

00:06:57.360 --> 00:07:02.265
And so we have a situation
where we can rewrite cosine of

00:07:02.265 --> 00:07:10.260
x is equal to the sum, if you
believe that this Macloren

00:07:10.260 --> 00:07:14.200
series actually does converge
to cosine of x over the entire

00:07:14.200 --> 00:07:17.940
domain of x, that's kind of
an assumption we're making.

00:07:17.940 --> 00:07:20.790
Hopefully one day we will have
the tools set to actually

00:07:20.790 --> 00:07:23.130
prove that as well.

00:07:23.130 --> 00:07:26.300
From n is equal to zero.

00:07:26.300 --> 00:07:27.070
So what's happening?

00:07:27.070 --> 00:07:29.600
We're taking all of
the even powers.

00:07:29.600 --> 00:07:38.160
So we could say x to the 2n,
that ensures that no matter

00:07:38.160 --> 00:07:40.160
what value of n I put in
here I get an even numbers.

00:07:40.160 --> 00:07:41.620
So we'll go to the zeroth
power then the second

00:07:41.620 --> 00:07:46.810
power, over 2n factorial.

00:07:46.810 --> 00:07:50.360
So that takes care of going
from 1 to x squared over 2,

00:07:50.360 --> 00:07:53.580
to x to the fourth over
4 factorial, 6 over 6

00:07:53.580 --> 00:07:54.490
factorial, et cetera.

00:07:54.490 --> 00:07:56.830
But now we have to make it
switched signs like that.

00:07:56.830 --> 00:07:59.420
Well let's just multiply
it negative 1.

00:07:59.420 --> 00:08:00.160
Let's see what we can do.

00:08:00.160 --> 00:08:07.160
Negative 1 to the-- so we want
the first term to be positive,

00:08:07.160 --> 00:08:09.390
the second term to be negative.

00:08:09.390 --> 00:08:15.300
So we could say times
minus 1 to the n plus 1.

00:08:15.300 --> 00:08:16.060
Let's see if that works.

00:08:16.060 --> 00:08:25.760
When m is zero what's
negative 1 to the n plus 1?

00:08:25.760 --> 00:08:28.860
zero, it would be minus 1.

00:08:28.860 --> 00:08:39.870
And then when it's 1-- When
it's zero-- no, no it's just

00:08:39.870 --> 00:08:42.890
going to be negative
1 to the n.

00:08:42.890 --> 00:08:46.520
Because when it's zero,
negative 1 to zero is 1.

00:08:46.520 --> 00:08:48.555
When it's 1, negative 1.

00:08:51.390 --> 00:08:53.350
So this will work out.

00:08:53.350 --> 00:08:55.680
Negative 1 to the n is cosine.

00:08:55.680 --> 00:08:56.620
You could try it out.

00:08:56.620 --> 00:08:59.210
This is the n is equal to zero.

00:08:59.210 --> 00:09:00.890
We need to switch colors.

00:09:00.890 --> 00:09:04.310
That's n is equal to zero and
here we get x to the zero over

00:09:04.310 --> 00:09:05.850
zero factorial, which is 1.

00:09:05.850 --> 00:09:10.100
We have negative 1 to the zero
is 1, so that becomes 1.

00:09:10.100 --> 00:09:14.510
When n is equal to 1, this
becomes x squared over 2

00:09:14.510 --> 00:09:17.920
factorial, we have negative 1
to the 1 power, so that's

00:09:17.920 --> 00:09:19.270
where you get the negative 1.

00:09:19.270 --> 00:09:22.850
And then when n is equal to
2, the negative 1 squared

00:09:22.850 --> 00:09:23.830
becomes positive again.

00:09:23.830 --> 00:09:26.220
So the negative 1 is
what provides the

00:09:26.220 --> 00:09:28.160
alternating numbers.

00:09:28.160 --> 00:09:29.210
So pretty neat.

00:09:29.210 --> 00:09:33.130
We just figured out another
way to represent cosine of x.

00:09:33.130 --> 00:09:36.320
And it might be looking a
little bit interesting to you

00:09:36.320 --> 00:09:43.490
that this representation kind
of resembles part of the

00:09:43.490 --> 00:09:45.420
representation of e to the x.

00:09:45.420 --> 00:09:47.690
What's the difference between
this and the e to the x? e to

00:09:47.690 --> 00:09:50.270
the x had the odd exponent
terms and it didn't

00:09:50.270 --> 00:09:50.990
switch signs.

00:09:50.990 --> 00:09:53.610
But other than that, they're
pretty much the same.

00:09:53.610 --> 00:09:55.750
So in the next video we'll
do sine of x and then we'll

00:09:55.750 --> 00:09:56.745
try to put it all together.

00:09:56.745 --> 00:09:58.600
I'll see you soon.


Polynomial approximation of functions (part 2)

WEBVTT
Kind: captions
Language: en

00:00:00.670 --> 00:00:03.190
So where we left off in the
last video, we kept trying to

00:00:03.190 --> 00:00:07.900
approximate this purple f
of x with a polynomial.

00:00:07.900 --> 00:00:11.510
And we at first said we'll just
make the polynomial a constant

00:00:11.510 --> 00:00:16.190
and set it -- it's just going
to intersect f of 0

00:00:16.190 --> 00:00:17.880
at x is equal to 0.

00:00:17.880 --> 00:00:20.940
So that's a first -- you can
kind of all think of it as a

00:00:20.940 --> 00:00:23.590
0 of order approximation
of the function.

00:00:23.590 --> 00:00:26.230
Then we said, oh, what if not
only do they intersect at x is

00:00:26.230 --> 00:00:28.920
equal to 0, but let's say that
their slope is the same as x is

00:00:28.920 --> 00:00:31.140
equal to 0, and that's
that approximation?

00:00:31.140 --> 00:00:32.470
And that's about as good as
you're going to do with a

00:00:32.470 --> 00:00:35.020
line, especially as
you get close to 0.

00:00:35.020 --> 00:00:36.820
And we said, OK, that's good,
but what if their second

00:00:36.820 --> 00:00:37.650
derivative is the same?

00:00:37.650 --> 00:00:40.380
And that's where we ended
up with -- we added

00:00:40.380 --> 00:00:41.690
this term here.

00:00:41.690 --> 00:00:44.360
And I hinted that we'll just
keep doing this process.

00:00:50.360 --> 00:00:52.880
And so you could imagine, if I
want the third derivative to be

00:00:52.880 --> 00:00:58.910
the same, I could add another
term right here, plus, where I

00:00:58.910 --> 00:01:03.310
know what the value of f of
x's third derivative is at 0.

00:01:03.310 --> 00:01:07.860
So I'll write that as f to
the third derivative at

00:01:07.860 --> 00:01:12.130
0 times x to the third.

00:01:12.130 --> 00:01:14.280
Now what do you think is
going to be down here?

00:01:14.280 --> 00:01:15.490
What's going to be
he denominator?

00:01:15.490 --> 00:01:22.690
You might be tempted to say
that we'll put a 3 down here.

00:01:22.690 --> 00:01:25.000
But it turns out you're going
to put a 3 times a 2, which

00:01:25.000 --> 00:01:28.910
is a 6, or 3 factorial.

00:01:28.910 --> 00:01:31.700
Now why is that?

00:01:31.700 --> 00:01:33.560
Let me just take a little
departure here and I think

00:01:33.560 --> 00:01:36.700
you'll start to understand
why you put a 6 down here.

00:01:36.700 --> 00:01:38.510
Why this isn't a 3
and you put a 6.

00:01:38.510 --> 00:01:41.370
Here you put a 2, but 2 is
also 2 factorial, right?

00:01:41.370 --> 00:01:44.000
2 factorial is 2
times 1, right?

00:01:44.000 --> 00:01:45.480
Hopefully you remember what
factorial -- actually, let

00:01:45.480 --> 00:01:48.140
me tell you what factorial
is just in case.

00:01:48.140 --> 00:01:52.610
10 factorial is equal to 10
times 9 times 8 times 7, dah,

00:01:52.610 --> 00:01:54.510
dah, dah, dah, times 2 times 1.

00:01:54.510 --> 00:01:57.870
So you're multiplying all of
the numbers up to that number.

00:01:57.870 --> 00:02:01.380
4 factorial -- and the numbers
get big very, very fast -- is

00:02:01.380 --> 00:02:04.670
4 times 3 times 2 times 1.

00:02:04.670 --> 00:02:06.960
2 factorial is equal
to 2 times 1.

00:02:06.960 --> 00:02:09.060
1 factorial is equal to 1.

00:02:09.060 --> 00:02:11.290
Now this is kind of
a weird definition.

00:02:11.290 --> 00:02:12.820
It comes out of combinatorics.

00:02:12.820 --> 00:02:16.100
Actually it works for what
we're doing is, well, 0

00:02:16.100 --> 00:02:17.850
factorial is also equal to 1.

00:02:17.850 --> 00:02:19.470
I know that might be a
little un-intuitive.

00:02:19.470 --> 00:02:20.700
This is just a definition.

00:02:20.700 --> 00:02:23.280
It's like saying that i squared
is equal to negative 1.

00:02:23.280 --> 00:02:28.450
It is a definition that it
makes formulas be more

00:02:28.450 --> 00:02:30.720
general, I guess is a
simple way to put it.

00:02:30.720 --> 00:02:32.790
But let me erase all of this
because that was just a

00:02:32.790 --> 00:02:34.580
divergence just because I
realized I was going to use

00:02:34.580 --> 00:02:37.100
factorial, so you should
know what a factorial is.

00:02:37.100 --> 00:02:38.825
But I think that's a fairly
straightforward concept.

00:02:41.850 --> 00:02:43.820
So going back to
what we were doing.

00:02:43.820 --> 00:02:49.030
I was asking you why do I put
a 6 down here instead of a

00:02:49.030 --> 00:02:50.810
3, like we put a 2 here?

00:02:50.810 --> 00:02:52.840
Well, let's just take
this term alone and take

00:02:52.840 --> 00:02:55.770
its third derivative.

00:02:55.770 --> 00:03:02.840
So if I have the term and it's
f, the third derivative at 0, x

00:03:02.840 --> 00:03:07.280
to the third over -- and
let me just write 6 as

00:03:07.280 --> 00:03:11.240
3 times 2 or 2 times 3.

00:03:11.240 --> 00:03:12.210
That'll make it a
little more clear.

00:03:12.210 --> 00:03:15.500
What's the first
derivative here?

00:03:15.500 --> 00:03:18.010
What happens when I take
the derivative once?

00:03:18.010 --> 00:03:20.080
Well, I'm going to multiply the
whole thing by the 6 exponent

00:03:20.080 --> 00:03:22.230
and decrement the
exponent, right?

00:03:22.230 --> 00:03:25.660
So I'm going to multiply the
whole thing times 3 times f,

00:03:25.660 --> 00:03:30.660
the third derivative, x
squared over 2 times 3.

00:03:30.660 --> 00:03:33.600
So that first time I did
it, this 3 and this

00:03:33.600 --> 00:03:35.100
3 cancel out, right?

00:03:35.100 --> 00:03:36.850
That red's looking a
little bit too demonic.

00:03:36.850 --> 00:03:39.630
Let me pick another color.

00:03:39.630 --> 00:03:41.150
And then when I take the
second derivative what

00:03:41.150 --> 00:03:43.110
am I going to get?

00:03:43.110 --> 00:03:46.390
Well, the 3's gone, now I just
have a 2 in the denominator, so

00:03:46.390 --> 00:03:52.760
I multiply the whole thing by 2
times f prime prime prime of 0

00:03:52.760 --> 00:03:55.830
times, and I decrement the
exponent, x to the 1 over 2.

00:03:55.830 --> 00:03:57.390
Well, now the 2's
cancel out, right?

00:03:57.390 --> 00:03:59.580
So the reason why you're
putting a factorial there is

00:03:59.580 --> 00:04:01.645
every time you take a
derivative you're decrementing

00:04:01.645 --> 00:04:04.360
the exponent 1, and multiplying
the whole expression

00:04:04.360 --> 00:04:05.010
by the exponent.

00:04:05.010 --> 00:04:08.460
So if you're going to take n
derivative, you're essentially

00:04:08.460 --> 00:04:14.070
going to be multiplying this
expression times n factorial.

00:04:14.070 --> 00:04:16.130
So you don't want an n
factorial out here.

00:04:16.130 --> 00:04:18.560
You put an n factorial
at the bottom.

00:04:18.560 --> 00:04:19.380
Hopefully that makes sense.

00:04:19.380 --> 00:04:23.300
Play around with it yourself
and it should start to make

00:04:23.300 --> 00:04:25.290
a little bit more sense.

00:04:25.290 --> 00:04:28.970
So in general, if we just
kept doing this process

00:04:28.970 --> 00:04:31.350
forever, what would the
function look like?

00:04:36.200 --> 00:04:39.580
The reason why I'm covering
this is because going this way

00:04:39.580 --> 00:04:42.390
we're going to be able to prove
what I think is the most

00:04:42.390 --> 00:04:47.090
mind-bending concept
in mathematics.

00:04:47.090 --> 00:04:51.590
And it will make you love
mathematics, hopefully.

00:04:51.590 --> 00:04:53.490
Some people actually --
well, I won't go into the

00:04:53.490 --> 00:04:55.570
spiritual aspects of it.

00:04:55.570 --> 00:04:57.990
So what would be this, if I
just kept saying that I'm

00:04:57.990 --> 00:05:01.710
just going to keep taking
derivatives and adding them to

00:05:01.710 --> 00:05:02.730
this term, this polynomial?

00:05:02.730 --> 00:05:11.290
Well, the polynomial would
become p of x is equal to f

00:05:11.290 --> 00:05:18.440
of 0 plus f prime of 0 x.

00:05:18.440 --> 00:05:21.010
And let's just divide it by 1
factorial, just to make it

00:05:21.010 --> 00:05:22.640
clear that that's a
1 factorial, right?

00:05:22.640 --> 00:05:24.690
And that's an x
to the 1, right?

00:05:24.690 --> 00:05:26.060
That's just this term,
but I just wrote it a

00:05:26.060 --> 00:05:28.980
little differently.

00:05:28.980 --> 00:05:32.250
This term right here, this
is f of 0 times x to the 0.

00:05:32.250 --> 00:05:33.650
I know that's really
messy, but hopefully you

00:05:33.650 --> 00:05:35.270
see what I'm saying.

00:05:35.270 --> 00:05:37.640
And that's over 0
factorial, right?

00:05:37.640 --> 00:05:40.920
0 factorial is 1, x to the 0
is 1, so it's just f of 0.

00:05:40.920 --> 00:05:46.740
And then plus the second
derivative at 0 times x squared

00:05:46.740 --> 00:05:51.570
over 2 factorial plus --
and we just keep adding.

00:05:51.570 --> 00:06:00.170
The third derivative at x is
equal to 0 of x to the third

00:06:00.170 --> 00:06:03.970
over 3 factorial, and
we just keep going on.

00:06:03.970 --> 00:06:06.430
So we could do
this to infinity.

00:06:06.430 --> 00:06:08.810
And actually we will do
it, and this is called

00:06:08.810 --> 00:06:11.240
the Maclaurin Series.

00:06:11.240 --> 00:06:14.570
So if we just wanted to
approximate this as hard as we

00:06:14.570 --> 00:06:18.410
can, essentially take the
infinite derivatives of it, we

00:06:18.410 --> 00:06:19.090
get the Maclaurin Series.

00:06:19.090 --> 00:06:24.340
So we are going to define
this polynomial p of x.

00:06:24.340 --> 00:06:29.120
It's going to be the infinite
series, the infinite sum.

00:06:29.120 --> 00:06:32.260
Let's start with n is equal
to 0, and we're going

00:06:32.260 --> 00:06:33.415
to go to infinity.

00:06:36.450 --> 00:06:39.580
What is each term?

00:06:39.580 --> 00:06:43.180
It's going to be f of -- well
it's going to be f, the nth

00:06:43.180 --> 00:06:57.220
derivative of f evaluated at
0 times x to the n

00:06:57.220 --> 00:07:00.950
over n factorial.

00:07:00.950 --> 00:07:03.260
This is the Maclaurin Series.

00:07:03.260 --> 00:07:07.730
We're later learn that the
Maclaurin Series is a specific

00:07:07.730 --> 00:07:12.070
example of the Taylor Series,
which is a specific example

00:07:12.070 --> 00:07:15.150
of a power series.

00:07:15.150 --> 00:07:17.140
But anyway, this might seem
very complicated to you.

00:07:17.140 --> 00:07:18.350
I have all the sigma notation.

00:07:18.350 --> 00:07:20.830
Just remember, this is
essentially just that and I

00:07:20.830 --> 00:07:22.240
just keep going to infinity.

00:07:22.240 --> 00:07:24.030
And if you play around with
it it should make sense.

00:07:24.030 --> 00:07:26.580
But I think this will become a
lot more concrete when I do

00:07:26.580 --> 00:07:29.200
this with a specific f of x.

00:07:29.200 --> 00:07:33.230
This is where it gets cool.

00:07:33.230 --> 00:07:36.910
In case you don't think
it's already cool.

00:07:36.910 --> 00:07:41.470
So let's pick f of x to be,
to me, the most amazing

00:07:41.470 --> 00:07:43.010
function of them all.

00:07:43.010 --> 00:07:47.420
If I ever built a shrine or
a church or something or

00:07:47.420 --> 00:07:51.100
skyscraper, I would somehow
make this function show up all

00:07:51.100 --> 00:07:55.220
over the place, and then years
from now people would be awed

00:07:55.220 --> 00:07:56.960
by the mysticism of it all.

00:07:56.960 --> 00:08:00.280
But anyway, let's try to
approximate e to the x

00:08:00.280 --> 00:08:02.690
with a Maclaurin Series.

00:08:02.690 --> 00:08:05.120
You know that sigma thing,
that's hard to memorize.

00:08:05.120 --> 00:08:08.020
Just remember you want all the
derivatives to be the same.

00:08:08.020 --> 00:08:10.590
So let's make the
approximation of this.

00:08:13.960 --> 00:08:14.795
Actually, I won't prove it.

00:08:14.795 --> 00:08:16.820
It's out of the scope of
what we're doing right now.

00:08:16.820 --> 00:08:19.030
But the approximation, even
when it's centered at 0,

00:08:19.030 --> 00:08:22.660
actually equals the function
when you take the infinite sum.

00:08:22.660 --> 00:08:24.470
But let's just see
what it looks like.

00:08:24.470 --> 00:08:26.890
Because this is pretty cool.

00:08:26.890 --> 00:08:28.940
Before we start building the
polynomial, let's just figure

00:08:28.940 --> 00:08:29.550
out a couple of things.

00:08:29.550 --> 00:08:35.590
So what is f prime of x?

00:08:35.590 --> 00:08:37.470
That's also e to the x, right?

00:08:37.470 --> 00:08:40.540
What's f prime prime of x?

00:08:40.540 --> 00:08:42.170
Well that also
equals e to the x.

00:08:42.170 --> 00:08:45.140
We have learned and actually
recently did a proof that

00:08:45.140 --> 00:08:47.050
the derivative of e to
the x is e to the x.

00:08:47.050 --> 00:08:48.720
But that also needs a second
derivative and the third and

00:08:48.720 --> 00:08:50.946
the fourth and the nth
derivative of e to the x

00:08:50.946 --> 00:08:52.600
is equal to e to the x.

00:08:52.600 --> 00:08:56.040
I could take an arbitrary
number of derivatives of e

00:08:56.040 --> 00:08:59.700
to the x and it equals e to
the x, which is amazing.

00:08:59.700 --> 00:09:04.300
The rate of change of the
function at any point is

00:09:04.300 --> 00:09:05.360
equal to the function.

00:09:05.360 --> 00:09:07.360
The rate of change of the rate
of change of the function at

00:09:07.360 --> 00:09:08.660
any point is equal
to the function.

00:09:08.660 --> 00:09:12.570
I mean that's -- I want to just
go some place and ponder it,

00:09:12.570 --> 00:09:14.400
but I'm too busy making videos.

00:09:14.400 --> 00:09:16.320
But anyway, back to
what we were doing.

00:09:16.320 --> 00:09:20.040
So what is f of 0?

00:09:20.040 --> 00:09:25.230
f of 0 is equal to e to the 0,
which is equal to 1, right?

00:09:25.230 --> 00:09:28.390
Well that's also going
to be f prime of 0.

00:09:28.390 --> 00:09:31.560
That's also e to the 0,
which is equal to 1.

00:09:31.560 --> 00:09:37.350
So all of the derivatives, the
nth derivative at 0 is going to

00:09:37.350 --> 00:09:41.522
equal 1 for this specific case
of f of x, for e to the x.

00:09:41.522 --> 00:09:43.990
And this is why
this is so cool.

00:09:43.990 --> 00:09:47.130
But actually, it actually
gets even more amazing.

00:09:50.450 --> 00:09:54.240
So, you hopefully realize
that f of 0 and all of

00:09:54.240 --> 00:09:57.320
its derivatives at
0 are equal to 1.

00:09:57.320 --> 00:10:00.530
So now we can do the powers
of the Maclaurin Series

00:10:00.530 --> 00:10:01.530
in the next video.

00:10:01.530 --> 00:10:03.032
See you soon.