1
00:00:09,719 --> 00:00:17,759
So in yesterday's class we looked at box functions
right, and we saw that we could use the whole
2
00:00:17,759 --> 00:00:25,320
set of box functions to represent any given
function right. I was originally planning
3
00:00:25,320 --> 00:00:31,939
to do hat functions today, but firstly maybe
we look at polynomial functions as a means
4
00:00:31,939 --> 00:00:36,690
of generating basis vectors say on a given
interval right, and see what is the problem
5
00:00:36,690 --> 00:00:40,230
with that and then we will go onto hat functions,
is that fine.
6
00:00:40,230 --> 00:00:52,470
So the question is the problem that we had
with box function was that even for a straight
7
00:00:52,470 --> 00:01:00,430
line, if we wanted to approximate the straight
line we got because our function is a constant
8
00:01:00,430 --> 00:01:10,070
on a given interval, we got a representation
which was piecewise constant right, and we
9
00:01:10,070 --> 00:01:14,970
could get as close as we want to the function
that we are trying to represent. But then
10
00:01:14,970 --> 00:01:19,251
as a consequence the jumps that we get the
number of jumps that we get in the function
11
00:01:19,251 --> 00:01:20,510
representation increases right.
12
00:01:20,510 --> 00:01:25,440
So we are trying to ask the question, is not
there a way for us to get something that is
13
00:01:25,440 --> 00:01:33,470
smoother? We have defined the dot product
yesterday as the dot product of f, g as the
14
00:01:33,470 --> 00:01:44,420
integral if the functions are defined on the
interval a b f g dx. We will see what this
15
00:01:44,420 --> 00:01:49,780
means if you just take an interval again says
0 1 or something of that sort, and what it
16
00:01:49,780 --> 00:01:52,280
means to the standard polynomials that we
deal okay.
17
00:01:52,280 --> 00:01:57,960
Let us see whether we can use those to represent
our functions, so consider the functions 2
18
00:01:57,960 --> 00:02:14,780
functions f of x=1 and g of f x=x to start
with okay, are these functions orthogonal
19
00:02:14,780 --> 00:02:20,160
to each other or what is the angle between
these functions does that make sense. So once
20
00:02:20,160 --> 00:02:25,220
you define the dot product once we have defined
the dot product, we can use the definition
21
00:02:25,220 --> 00:02:32,790
of the dot product that we had earlier from
geometry where we said that A dot B is magnitude
22
00:02:32,790 --> 00:02:40,670
A magnitude B cosine of the angle included
angle between them, you can use a similar
23
00:02:40,670 --> 00:02:41,849
idea.
24
00:02:41,849 --> 00:02:52,650
And basically say that cosine of the angle
between 2 functions would be the dot product,
25
00:02:52,650 --> 00:03:08,040
g/norm of f and norm of g right, analogous
to what we did with vectors you could define
26
00:03:08,040 --> 00:03:12,870
a theta in a similar fashion. So the question
that I am asking, so you already use actually
27
00:03:12,870 --> 00:03:17,239
we already used the property that theta is
pi/2 and said that 2 functions are orthogonal,
28
00:03:17,239 --> 00:03:21,620
we have already done that yesterday. The question
that I am asking is it possible for us to
29
00:03:21,620 --> 00:03:27,050
find the angle between the functions f and
g as given there okay.
30
00:03:27,050 --> 00:03:35,580
So what is f dot g? What is the dot product?
Integrals x let us say the functions are defined
31
00:03:35,580 --> 00:03:45,362
on the interval x belongs to the interval
0, 1, we take x from on the interval 0, 1,
32
00:03:45,362 --> 00:03:54,540
the function is defined on the interval 0.
1, so it is 1 times x dx, which gives me x
33
00:03:54,540 --> 00:04:07,770
squared/2 between the limits 0, 1 which 1/2,
is that fine. So clearly they are not orthogonal,
34
00:04:07,770 --> 00:04:22,970
what is magnitude f? Magnitude f is the square
root of integral 0 to 1 dx which is 1.
35
00:04:22,970 --> 00:04:40,979
And what is magnitude g? The norm of g integral
0 to 1 x squared dx square root which gives
36
00:04:40,979 --> 00:04:57,590
me x cube/3 between 0 to 1=1/root of 3, is
that fine okay. And therefore, of course all
37
00:04:57,590 --> 00:05:00,930
of these numbers look familiar, because we
just dealt with something very similar in
38
00:05:00,930 --> 00:05:02,310
the last class.
39
00:05:02,310 --> 00:05:14,710
And therefore, what do we get for cos theta
1/2 root 3, and you can consequently find
40
00:05:14,710 --> 00:05:20,200
theta. So it is just an interesting exercise,
you can consequently find theta, what does
41
00:05:20,200 --> 00:05:32,740
it mean? Is there a mistake so I am sorry
root 3/2, it gives a much better number right,
42
00:05:32,740 --> 00:05:40,509
gives you much better angle okay, right? So
but I am not really interested in finding
43
00:05:40,509 --> 00:05:48,270
theta here right, or I realize that theta
is not pi/2 okay.
44
00:05:48,270 --> 00:05:53,100
And we have already seen earlier that is very
convenient to have these functions or the
45
00:05:53,100 --> 00:05:56,030
basis vectors that we get to be orthogonal
to each other right. We have already seen
46
00:05:56,030 --> 00:06:02,180
that it is convenient to have these vectors
orthogonal to each other. So given this we
47
00:06:02,180 --> 00:06:09,630
will follow the same process that we did earlier
and try to get 2 sets of vectors, 2 vectors
48
00:06:09,630 --> 00:06:15,949
which are perpendicular to each other from
the 1, x, so 1, x are linearly independent,
49
00:06:15,949 --> 00:06:17,600
1 and x are linearly independent.
50
00:06:17,600 --> 00:06:27,410
How do I get 2 vectors so that the angle is
pi/2? So what I do is I repeat what we did
51
00:06:27,410 --> 00:06:40,750
earlier, so if this is A and this is B right,
so from A of course I can get the unit vector
52
00:06:40,750 --> 00:06:53,020
A relay which is a hat right, and I can find
the projection of B on A. How do I find the
53
00:06:53,020 --> 00:07:03,270
projection of B on A? I take B dot a okay,
so B dot a gives me the protection the component
54
00:07:03,270 --> 00:07:09,200
of B that is along a, right B component of
B that is along a.
55
00:07:09,200 --> 00:07:21,020
Let me just give it a subscript B sub a, B
sub a times a hat, what is that? That is a
56
00:07:21,020 --> 00:07:27,830
vector representation of the component of
B along a right, so if I subtract this from
57
00:07:27,830 --> 00:07:41,360
B, B-B sub a a hat and I call that, what shall
I call that? I just call that B prime, what
58
00:07:41,360 --> 00:07:55,680
is B prime? B prime is a vector B with its
projection from a removed from it okay. So
59
00:07:55,680 --> 00:08:06,480
now the question is what is B prime dot a?
B prime dot a is 0, so we have managed to
60
00:08:06,480 --> 00:08:10,180
construct the B prime which is orthogonal
to a.
61
00:08:10,180 --> 00:08:22,210
And from B prime I can get a I will just call
it B hat by dividing by the magnitude of B
62
00:08:22,210 --> 00:08:30,580
okay, so you gave me A B to start with and
I come back with a prime b prime I am sorry
63
00:08:30,580 --> 00:08:37,080
a hat b hat which are unit vectors which are
orthogonal to each other okay. So you have
64
00:08:37,080 --> 00:08:43,449
given me one set of vectors they are now managed
to extract from that a hat b hat which are
65
00:08:43,449 --> 00:08:49,429
orthogonal to each other. So if I had a third
vector C, I could repeat this process.
66
00:08:49,429 --> 00:08:53,850
If I had a third vector C, what I would basically
do is from the third vector I will subtract
67
00:08:53,850 --> 00:08:58,860
out the b hat part, I will subtract out a
hat part and I will be left with something
68
00:08:58,860 --> 00:09:03,540
that is purely C right, if I left with nothing
that means C was linearly dependent on the
69
00:09:03,540 --> 00:09:09,420
other 2, is that fine okay. We will do that
now to the functions, we will do that now
70
00:09:09,420 --> 00:09:12,180
to the vectors 1 and x.
71
00:09:12,180 --> 00:09:30,050
So back here you ask the question what was
f dot g? f dot g was 1/2, so this is this
72
00:09:30,050 --> 00:09:36,319
times 1 so the function that is along that
is the component of f that is along g or g
73
00:09:36,319 --> 00:09:43,769
that is along f is 1/2, if that is g along
f right, and f is a constant. And therefore,
74
00:09:43,769 --> 00:09:52,790
if I subtract out if I repeat the process
B-B prime a B-B dot a if I repeat that process,
75
00:09:52,790 --> 00:10:02,470
what I am going to get is I am going to get
x-1/2 times 1, the basis vector is just the
76
00:10:02,470 --> 00:10:05,459
constant function 1 okay.
77
00:10:05,459 --> 00:10:23,239
And this should be now my new improved g prime,
is that fine okay. So can I make this a unit
78
00:10:23,239 --> 00:10:28,949
vector is it possible for me to make it a
unit vector g prime, how do I make g prime
79
00:10:28,949 --> 00:10:41,399
the unit vector? So what is g prime dotted
with the g prime x-1/2 squared dx on the interval
80
00:10:41,399 --> 00:11:02,360
on which it is defined, which is x-1/2 cube
between 0 and 1, and what is this 1/2 cube+1/2
81
00:11:02,360 --> 00:11:43,470
cube I am sorry which =1/4 is that right I
am sorry by 3, by 3 fine, okay.
82
00:11:43,470 --> 00:11:53,379
And therefore, g hat g if you want to call
it g prime hat if you want to call put a hat
83
00:11:53,379 --> 00:11:58,230
on it just like we did for the other unit
vector or just call it g hat, g hat could
84
00:11:58,230 --> 00:12:09,230
be x-1/2 I have to divide by the magnitude,
the magnitude is 2 times square root 3, are
85
00:12:09,230 --> 00:12:21,720
there any questions, is it fine. So now we
have the vectors 1 2 times square root 3*x-1/2
86
00:12:21,720 --> 00:12:32,059
is
that fine, these are orthonormal magnitudes
87
00:12:32,059 --> 00:12:36,579
are 1 and they are orthogonal to each other
okay.
88
00:12:36,579 --> 00:12:44,570
Let me add a third vector into the mix what
if I added x square, I want to add x square,
89
00:12:44,570 --> 00:12:55,029
so define an h of x which is x squared, if
I define an h of x which is x squared and
90
00:12:55,029 --> 00:13:00,610
this is still on the interval 0, 1.
91
00:13:00,610 --> 00:13:29,309
If I define an h of x which is x squared,
what is g hat dotted with h that is 2 root
92
00:13:29,309 --> 00:13:47,569
3 x-1/2*x square integral from 0 to 1 dx,
is that fine. So what does this integral give
93
00:13:47,569 --> 00:14:02,699
me? This gives me a 2 root 3* that gives me
a x to the 4th/4-x cube/6 between the limits
94
00:14:02,699 --> 00:14:32,209
0 and 1. So 2 root 3 times 1/4-1/6, what does
that give me? 1/2 root 3. So that is the component
95
00:14:32,209 --> 00:14:40,249
of h along g hat, so we repeat this process,
so from h that is x squared I subtract out
96
00:14:40,249 --> 00:14:53,980
this component, so that is 1/2 root 3 times
what is the basis vector 2 root 3*x-1/2.
97
00:14:53,980 --> 00:15:01,319
I am repeating the same process that I did
hear B-B a times a, I am repeating the same
98
00:15:01,319 --> 00:15:20,619
process that I did there which of course gives
me x squared-x+1/2, and there is something
99
00:15:20,619 --> 00:15:31,439
wrong we have to okay that is fine. So what
is the other thing that we have that is x
100
00:15:31,439 --> 00:15:37,749
square-x+1/2 that is fine. So what do we have
now? So we have removed the g hat component
101
00:15:37,749 --> 00:15:41,509
this is has removed the g hat component.
102
00:15:41,509 --> 00:15:51,939
So what I will call this is h prime, now I
want from this I want to get rid of the component
103
00:15:51,939 --> 00:16:10,019
that belongs to the 1 the function 1. So what
is h prime dot f? That is integral 0 to 1
104
00:16:10,019 --> 00:16:26,910
x squared-x+1/2 times dx which gives me x
cube/3-x squared/2+x/2 between the limits
105
00:16:26,910 --> 00:16:36,470
0 and 1.
106
00:16:36,470 --> 00:16:45,579
And that should give me the projection of
h prime on f which is nothing but 1/3-1/2+1/2
107
00:16:45,579 --> 00:17:02,839
which is 1/3, is that fine. And as a consequence,
if I subtract this out from here I am going
108
00:17:02,839 --> 00:17:22,370
to get h double prime which is x squared-x+1/6
okay, if I subtract the 3 from the 1/2 I get
109
00:17:22,370 --> 00:17:36,470
1/6. And I let you verify, you can verify
that h hat in fact is 6 times root of 5 x
110
00:17:36,470 --> 00:17:45,419
squared-x+1/6, and just check that out, find
out what the magnitude is.
111
00:17:45,419 --> 00:18:08,190
“Professor - Student conversation starts”
(()) (17:50) If I am taking the no I think
112
00:18:08,190 --> 00:18:38,279
you are saying g instead of h prime f through
h f, g prime and, whether I take h prime from
113
00:18:38,279 --> 00:18:43,660
there or h it does not matter, you are saying
why did not I just do x squared times 1 whatever
114
00:18:43,660 --> 00:19:02,290
that is fine. The order does not matter, what
you have to basically do is you have to make
115
00:19:02,290 --> 00:19:12,940
sure that if you have a set of vectors that
you are subtracting out this and this from
116
00:19:12,940 --> 00:19:18,460
x that is true.
117
00:19:18,460 --> 00:19:22,350
You could what you are basically saying that
the expression is a lot easier, I did not
118
00:19:22,350 --> 00:19:28,450
have to include that x+1/2 because anyway
it is orthogonal that is true, because the
119
00:19:28,450 --> 00:19:31,220
part that I am subtracting out you have to
understand the point that is making the part
120
00:19:31,220 --> 00:19:36,890
that I have subtracted out here it basically
comes from is already orthogonal to f, so
121
00:19:36,890 --> 00:19:44,500
there is no reason to include that in the
calculation is that fine okay, are there any
122
00:19:44,500 --> 00:19:46,340
questions. “Professor - Student conversation
ends.”
123
00:19:46,340 --> 00:19:54,770
So you can see that now I have I will call
them f hat, g hat, h hat, you can see that
124
00:19:54,770 --> 00:20:01,350
I can actually generate the whole set of these
functions okay. And in fact I can just take
125
00:20:01,350 --> 00:20:11,389
the set 1 x, x squared, x cube, x to the 4
and so on, and I can generate a whole set
126
00:20:11,389 --> 00:20:17,970
of the basis vectors that are orthonormal
orthogonal to each other and the magnitude
127
00:20:17,970 --> 00:20:24,270
is 1 right based on our definition of the
dot product, is that fine okay.
128
00:20:24,270 --> 00:20:33,570
Now why do not we just use this to represent
our functions, right why do not we just use
129
00:20:33,570 --> 00:20:38,370
this to represent our functions, so that is
one question that we have, why bother with
130
00:20:38,370 --> 00:20:43,360
box functions, these are nice and smooth functions,
why not just use these to represent our functions,
131
00:20:43,360 --> 00:20:52,029
is that fine okay. Of course if our function
had a cubic variation and we took only the
132
00:20:52,029 --> 00:20:57,880
first 3 terms right, you are unlikely to pick
up the cubic variation properly, am I making
133
00:20:57,880 --> 00:20:58,880
sense.
134
00:20:58,880 --> 00:21:03,909
You can see want you can go check to see what
kind of an error that you would make as one.
135
00:21:03,909 --> 00:21:10,059
The other problem is just like in Fourier
Series maybe we look at for Fourier Series
136
00:21:10,059 --> 00:21:14,510
a little right now, just I am not sure how
many of you are familiar with Fourier Series,
137
00:21:14,510 --> 00:21:20,240
there is the issue of how do we when we are
hunting remember do not forget why we are
138
00:21:20,240 --> 00:21:24,809
doing this, why we are constructing these
orthonormal functions right.
139
00:21:24,809 --> 00:21:31,580
Just to recollect our governing equations
or differential equations the solutions are
140
00:21:31,580 --> 00:21:36,559
functions, we want to write programs that
will systematically hunt for the solution
141
00:21:36,559 --> 00:21:42,570
which means systematically hunt for the functions.
So we are trying to create a set of functions
142
00:21:42,570 --> 00:21:45,639
which have some structure in them, so that
we can search them in a systematic fashion
143
00:21:45,639 --> 00:21:53,320
okay, so such a set of functions which have
this nice structure, what is the distance
144
00:21:53,320 --> 00:21:56,809
between functions and so on, such as set of
function we will call it as space function
145
00:21:56,809 --> 00:21:58,929
space with space of functions right.
146
00:21:58,929 --> 00:22:04,179
And we are basically trying to construct a
function space that is essentially it okay.
147
00:22:04,179 --> 00:22:11,990
So let us see what happens, let me we will
get back maybe what we will do is we will
148
00:22:11,990 --> 00:22:16,480
do Fourier Series also we go along and then
see what is the issue with, what is the issue
149
00:22:16,480 --> 00:22:21,820
why cannot we why do not we use this right,
and we do use it sometimes. Let us see what
150
00:22:21,820 --> 00:22:31,990
we get? Now one of the points that I want
you to check out you can try this out now.
151
00:22:31,990 --> 00:22:38,799
If I take the same functions 1, x, x squared
and so on, if I take the same set of functions,
152
00:22:38,799 --> 00:22:50,649
but now they are defined on the interval -1
to 1 does anything change? So what happens
153
00:22:50,649 --> 00:23:12,790
to f dot g? Becomes -1 to 1 1 times x dx is
x squared/2 from -1 to+1 right it is 0, they
154
00:23:12,790 --> 00:23:21,120
are orthogonal. So the orthogonality depends
on the interval in which the function is defined,
155
00:23:21,120 --> 00:23:25,789
the dot product is defined over that old interval,
it may be obvious right when you look at it.
156
00:23:25,789 --> 00:23:31,440
But the number of times students make a generic
statement saying sine and cosine are orthogonal
157
00:23:31,440 --> 00:23:35,450
to each other and then integrate on the wrong
interval right it happens it happens to all
158
00:23:35,450 --> 00:23:43,240
of us right, so you have to a bit careful
it is orthogonal from -1 to+1, but not orthogonal
159
00:23:43,240 --> 00:23:55,230
on the interval 0 to 1 okay. I would suggest
that you try to do a few of these on the interval
160
00:23:55,230 --> 00:23:59,179
-1 to+1 just like I have gone through right.
161
00:23:59,179 --> 00:24:03,269
So for on the interval 0, 1 I would suggest
that you try x cube or something like that
162
00:24:03,269 --> 00:24:07,799
sort just to make sure that you are able to
get through on that, and then do this from
163
00:24:07,799 --> 00:24:12,559
-1 to+1 do a few of them okay. If you have
had ordinary differential equations if you
164
00:24:12,559 --> 00:24:16,409
had a course on ordinary differential equations
before pay attention to the functions that
165
00:24:16,409 --> 00:24:21,029
you are getting, and ask yourself have you
seen them before right.
166
00:24:21,029 --> 00:24:24,950
You should get a familiar set of functions
right especially if you have done a course
167
00:24:24,950 --> 00:24:30,080
in ordinary differential equations this interval
-1 to +1 should give you should yield a familiar
168
00:24:30,080 --> 00:24:37,279
set of functions right. Let us look at I am
not going to do Fourier Series in great detail
169
00:24:37,279 --> 00:24:45,299
here, so Fourier Series the functions that
you are looking at out of the form 1 sin,
170
00:24:45,299 --> 00:24:57,400
cosine, sin 2, cosine 2, and so on, we have
functions of this nature okay.
171
00:24:57,400 --> 00:25:04,269
So obvious question from this discussion the
obvious question is, are the functions 1 and
172
00:25:04,269 --> 00:25:08,740
sin orthogonal to each other right, so now
you should always remember you have to ask
173
00:25:08,740 --> 00:25:12,799
the question on what interval are we talking
right, what is the dot product definition
174
00:25:12,799 --> 00:25:17,110
of the dot product? And what is the interval
on which we are talking? So if you say that
175
00:25:17,110 --> 00:25:28,720
on the interval 0 to 1 sin of x dx not 0 right.
On the other hand, if you say on the interval
176
00:25:28,720 --> 00:25:36,820
0 to 2pi sin of x dx you do get 0 fine.
177
00:25:36,820 --> 00:25:43,690
So the functions 1 and sin are indeed orthogonal
on that interval, and of course you can figure
178
00:25:43,690 --> 00:25:49,429
out how to go about normalizing it and so
on. So the point of this discussion is that
179
00:25:49,429 --> 00:25:55,519
the interval the domain on which we are defining
the functions is important right, for our
180
00:25:55,519 --> 00:26:01,860
idea of orthogonality just as it is important
for our idea of the dot product.
181
00:26:01,860 --> 00:26:06,250
And of course when we are actually solving
problems, when we get to the point where we
182
00:26:06,250 --> 00:26:11,490
are actually solving working on fluid mechanics
problems and asking questions and answering
183
00:26:11,490 --> 00:26:17,149
questions in fluid mechanics, you will have
you will know what is the extent of your domain
184
00:26:17,149 --> 00:26:23,509
and therefore, you will know what are A and
B fine. So why do not we just use this? Why
185
00:26:23,509 --> 00:26:31,250
do not we just use 1, x, x squared and so
on? Why not just use Fourier Series right
186
00:26:31,250 --> 00:26:32,250
to fit?
187
00:26:32,250 --> 00:26:38,019
So if I give you a function, if I give you
a graph, if I give you some arbitrary graph
188
00:26:38,019 --> 00:26:43,750
why not just use these polynomials in order
to approximate this function to represent
189
00:26:43,750 --> 00:26:50,129
this function, why do I go through this headache
of trying to find piecewise constant that
190
00:26:50,129 --> 00:27:00,622
will approximate the function okay. The idea
here is that if I have my f hat, g hat, h
191
00:27:00,622 --> 00:27:09,490
hat that I got earlier that I got here. If
I have the f hat, g hat, h hat, I can try
192
00:27:09,490 --> 00:27:17,120
to find a f hat+b g hat+c h hat, I can try
to find the coefficients a, b and c in order
193
00:27:17,120 --> 00:27:19,530
to approximate this function.
194
00:27:19,530 --> 00:27:25,620
And then adjusting these values while I am
hunting for the functions, any change I make
195
00:27:25,620 --> 00:27:34,240
to a will translate the whole graph up down,
any change I make to b will cause the slope
196
00:27:34,240 --> 00:27:40,299
to change, any change I make to c right will
cause the curvature to change everywhere,
197
00:27:40,299 --> 00:27:46,700
keyboard is everywhere right. So if I am now
if I have this complicated function, and I
198
00:27:46,700 --> 00:27:55,350
am trying to fit a curve to it, every time
I adjust 1 coefficient to fit some part that
199
00:27:55,350 --> 00:27:59,820
trouble is going to get spoil somewhere else,
very likely that it will change somewhere
200
00:27:59,820 --> 00:28:00,820
else.
201
00:28:00,820 --> 00:28:09,399
I do not have what is called the property
of locality, I do not have this power where
202
00:28:09,399 --> 00:28:16,299
local changes in coefficients cause only local
changes in the functions, I want to be able
203
00:28:16,299 --> 00:28:21,340
to rise and lower this. Whereas, if you take
this box function, it is possible for me to
204
00:28:21,340 --> 00:28:28,919
take this and lower it there independent of
what is happening elsewhere, I can just change
205
00:28:28,919 --> 00:28:34,990
the level of just at 1 interval right. So
the box functions clearly has this property
206
00:28:34,990 --> 00:28:39,889
of locality I can just change in 1 interval.
207
00:28:39,889 --> 00:28:43,380
I can change the level of that function just
in 1 interval without affecting anything else
208
00:28:43,380 --> 00:28:49,769
that is happening elsewhere okay, so this
property of locality is very important, this
209
00:28:49,769 --> 00:28:58,190
property of locality gives me this freedom
for me to adjust my solution as I go along
210
00:28:58,190 --> 00:29:06,019
okay, in particular without affecting other
parts of my solution that I have already possibly
211
00:29:06,019 --> 00:29:13,100
adjusted to my satisfaction right. Whereas
if I do not have locality, then I change any
212
00:29:13,100 --> 00:29:15,610
changes that I make is a global change right.
213
00:29:15,610 --> 00:29:23,789
So if I say a sin x, if I change a sin x is
going to change in fact If you think about
214
00:29:23,789 --> 00:29:28,090
sin x actually define from -infinity to +infinity,
so you are changing everything from -infinity
215
00:29:28,090 --> 00:29:33,240
to +infinity just by changing this a right
total global change. Whereas, what I would
216
00:29:33,240 --> 00:29:40,480
like to do is I would like to keep it local
fine okay, so for that reason right now I
217
00:29:40,480 --> 00:29:46,649
am going to reject using f hat, g hat, h hat
right having gone through this effort, I basically
218
00:29:46,649 --> 00:29:51,749
says it is nice I know how to do it, but I
am going to reject these functions okay.
219
00:29:51,749 --> 00:29:56,029
You can come back later and see whether it
is possible for us to use them or not, what
220
00:29:56,029 --> 00:30:04,039
we would really like is we would like the
smoothness that these polynomial bring and
221
00:30:04,039 --> 00:30:12,090
the locality that the box functions got, we
would like to have the smoothness that these
222
00:30:12,090 --> 00:30:17,909
polynomials bring with tight to the locality
that the box functions okay. And therefore,
223
00:30:17,909 --> 00:30:29,730
as a consequence now merging these 2 are going
to come up with hat functions okay.
224
00:30:29,730 --> 00:30:43,100
You are going to defend this as follows, what
we realize is if you have so from the yesterday's
225
00:30:43,100 --> 00:31:03,210
class we know it is the support of 2 function
is non-overlapping is not overlapping then
226
00:31:03,210 --> 00:31:15,179
they are orthogonal to each other. There is
a reason why I repeat this, there is a reason
227
00:31:15,179 --> 00:31:20,710
why I write this out and repeat this, so it
has only to do the support right, remember
228
00:31:20,710 --> 00:31:25,289
the support basically means the function is
non 0 and that in that part of the domain
229
00:31:25,289 --> 00:31:26,289
right.
230
00:31:26,289 --> 00:31:28,899
So it has only to do with the support, it
does not actually have to do the function
231
00:31:28,899 --> 00:31:41,370
value. That means that if I have in yesterday
I chose functions f and g in a fashion such
232
00:31:41,370 --> 00:31:48,390
that the support was non-overlapping, this
was f that was g, and yesterday we basically
233
00:31:48,390 --> 00:31:56,559
said that f dot g because the support is non-overlapping
it turned out that f dot g are orthogonal
234
00:31:56,559 --> 00:32:05,489
to each other. The question is does it have
to be a constant there, it could be anything
235
00:32:05,489 --> 00:32:13,940
as long as it is not 0 right, is that fine.
236
00:32:13,940 --> 00:32:18,591
So since this is true, since it is comes from
the support what we will do is we will try
237
00:32:18,591 --> 00:32:23,230
to pick one of those polynomials to do it,
and to keep life easy we are going to pick
238
00:32:23,230 --> 00:32:29,450
the linear, we are going to pick x right,
we are going to be a bit careful here so we
239
00:32:29,450 --> 00:32:31,019
pick x.
240
00:32:31,019 --> 00:32:45,870
So let me see if I can construct these functions
in a systematic fashion, so we have some interval
241
00:32:45,870 --> 00:32:54,789
a, b that we are interested right, and as
we did earlier we are going to break up this
242
00:32:54,789 --> 00:33:06,190
interval into sub intervals. I am going to
look at focus on one particular sub interval
243
00:33:06,190 --> 00:33:15,440
xi, xi+1 okay, so I will zoom in on that particular
interval, so what I am going to do is I am
244
00:33:15,440 --> 00:33:27,419
going to just zoom in on this particular interval
that is xi, xi+1.
245
00:33:27,419 --> 00:33:51,289
And I will define 2 functions here, one is
a function it is basically 0 everywhere, and
246
00:33:51,289 --> 00:34:00,730
at xi it is 0, and it then rises from xi to
xi+1 it goes from 0 to the value 1. I will
247
00:34:00,730 --> 00:34:14,511
name this function N is 1 at i+1, i+1 0, because
I am going to define 2 such functions. The
248
00:34:14,511 --> 00:34:23,250
other function is also 0 everywhere right,
just make the box function, the only difference
249
00:34:23,250 --> 00:34:29,799
is that it drops from 1 to 0 going from xi
to xi+1.
250
00:34:29,799 --> 00:34:38,240
And since this function is 1 at xi, I will
call it Ni, and it is the second function
251
00:34:38,240 --> 00:34:48,850
so Ni1 is that fine, do you understand what
the functions do. The blue one Ni+1 0 is 0
252
00:34:48,850 --> 00:34:55,129
everywhere, so it is going to be 0 from a
to b everywhere except on the interval xi,
253
00:34:55,129 --> 00:35:03,640
xi+1 where it starts at 0 and in a linear
fashion rises to 1. Ni is again 0 everywhere
254
00:35:03,640 --> 00:35:15,180
over the whole interval a, b except at xi,
xi+1 it starts at 1, it goes down to 0 fine.
255
00:35:15,180 --> 00:35:28,030
Now clearly if I have 2 such functions on
2 different intervals, if I have 1 interval
256
00:35:28,030 --> 00:35:33,390
here and I have another interval here, and
if I have 2 such functions on these 2 different
257
00:35:33,390 --> 00:35:42,760
intervals, 1 function here the same blue,
1 function here, 1 function there and 1 function
258
00:35:42,760 --> 00:35:59,450
here, 1 function there. I have 2 such functions
right, this is Ni+1 0, Ni 1, this should be
259
00:35:59,450 --> 00:36:12,329
Nj+1 0, Nj 1 right 2 such functions. These
2 functions are orthogonal to those 2 functions,
260
00:36:12,329 --> 00:36:17,960
each of these functions is orthogonal to each
of those functions.
261
00:36:17,960 --> 00:36:24,390
If I define such functions over all the intervals
xi, xi+1 the any given interval 1 of these
262
00:36:24,390 --> 00:36:28,770
functions will be orthogonal to functions
in the other interval, because intervals are
263
00:36:28,770 --> 00:36:33,000
non-overlapping fine. So we use the fact that
the supports are non-overlapping therefore,
264
00:36:33,000 --> 00:36:41,900
they are orthogonal that is a good part. But
what about the 2 functions to each other,
265
00:36:41,900 --> 00:36:46,390
the 2 functions obviously to each other are
not orthogonal right, they are obviously not
266
00:36:46,390 --> 00:36:47,390
orthogonal.
267
00:36:47,390 --> 00:36:59,579
So what is that dot product? What is Ni 0
and Ni 1, I am sorry Ni+1 dotted with is a
268
00:36:59,579 --> 00:37:16,100
function of x Ni 0 function of x dx the integral
it is 0 everywhere except from xi to xi+1.
269
00:37:16,100 --> 00:37:20,970
What is this integral? So in order to do this,
we have to get a function from we have to
270
00:37:20,970 --> 00:37:31,160
get an algebraic form for Ni and Ni x okay,
I have to get an algebraic form for Ni+1 x
271
00:37:31,160 --> 00:37:56,309
and Ni x okay. So we come back here, what
is Ni+1 is a function of x x-xi/xi+1-xi right,
272
00:37:56,309 --> 00:38:14,710
is a positive slope over the length xi+1-xi
it goes from 0 to 1 right.
273
00:38:14,710 --> 00:38:24,569
So at x =xi it is 0, at x=xi+1 is 1, it is
a linear function so it satisfies right, again
274
00:38:24,569 --> 00:38:28,700
we are hunting even here if you think about
it we are actually hunting for functions right,
275
00:38:28,700 --> 00:38:36,290
I have given you graph when we hunted and
found that function okay. And what is Ni?
276
00:38:36,290 --> 00:38:50,230
So if this is some alpha of x I name it alpha
of x simply because what is Ni 1-alpha of
277
00:38:50,230 --> 00:39:14,010
x okay, are there any questions? Fine. So
what we will do now is we will find out what
278
00:39:14,010 --> 00:39:17,569
is the dot product?
279
00:39:17,569 --> 00:40:01,049
So Ni 1 dotted with Ni+1 0 gives me integral
xi to xi+1 alpha of x times 1-alpha of x dx,
280
00:40:01,049 --> 00:40:27,180
what does this turn out to be? You can just
check this, you can just verify that that
281
00:40:27,180 --> 00:40:43,680
is true, so is that fine okay. So what do
we have now, what we have now is I have defined
282
00:40:43,680 --> 00:40:55,839
a bunch of functions Ni 0 and Ni+1 this depend
of course on the interval, so obviously if
283
00:40:55,839 --> 00:41:14,849
I go to i-1 this is on the interval i+1, if
I go to the interval i-1 to i what will I
284
00:41:14,849 --> 00:41:22,690
get corresponding functions Ni-1 0, Ni 1,
am I making sense.
285
00:41:22,690 --> 00:41:38,559
If I go to intervals i-2, i-1, I will have
the functions Ni-2 0 Ni-1 1, fine on each
286
00:41:38,559 --> 00:41:49,410
of the intervals I will have 2 of these functions.
Whatever you manage to do so far, what can
287
00:41:49,410 --> 00:41:53,140
we do with these 2 functions that we have
defined on the interval, so first let us just
288
00:41:53,140 --> 00:41:59,760
focus on this interval alone, we will just
look at this interval alone. So if I take
289
00:41:59,760 --> 00:42:18,490
a i or a times Ni 1+b times Ni 0 as some function
f of x defined only on xi, xi+1.
290
00:42:18,490 --> 00:42:28,470
What does this give me for any given a, b,
what does the graph of this look like? It
291
00:42:28,470 --> 00:42:35,900
has to be a straight line if the sum of 2
linear elements, and if I were to graph it
292
00:42:35,900 --> 00:42:45,780
if I were to just graph f of x, remember this
is the interval xi, xi+1, if I were to just
293
00:42:45,780 --> 00:43:00,890
graph it at x =xi=Ni is 1, at x =xi+1=Ni+1
is 1 the other one is 0. So this is going
294
00:43:00,890 --> 00:43:12,539
to be a function that goes from a to b in
a linear fashion, so if I change my b value.
295
00:43:12,539 --> 00:43:17,289
If I change the value of b if I were to raise
the value of b from here to some value here,
296
00:43:17,289 --> 00:43:24,740
then I would get a graph that looks like that
right. So I have a linear interpolant, but
297
00:43:24,740 --> 00:43:30,020
I also have locality in the sense that if
I raise this value a, b it affects this interval,
298
00:43:30,020 --> 00:43:40,020
and we will see if it affects anything else,
is that fine okay. So a Ni, b Ni+1 allows
299
00:43:40,020 --> 00:43:45,400
me to give you get a linear interpolant in
the interval xi, xi+1.
300
00:43:45,400 --> 00:44:00,220
So in general, if I had an arbitrary function
f of x, I should be able to write this if
301
00:44:00,220 --> 00:44:10,431
of x as summation i=1 through n, I just write
it as 1 through n, we have to figure out what
302
00:44:10,431 --> 00:44:17,440
happens at the intervals elsewhere towards
the beginning and end, anyway we will go through
303
00:44:17,440 --> 00:44:38,510
we have n intervals i=1 through n. What I
am going to get ai Ni 0+bi Ni+1 1, is that
304
00:44:38,510 --> 00:44:44,380
fine. The intervals are non-overlapping; they
are orthogonal it should be possible for me
305
00:44:44,380 --> 00:44:49,150
to represent any function f of x in this fashion.
306
00:44:49,150 --> 00:44:54,460
On any given interval the ai, bi will give
me the straight line interpolants between
307
00:44:54,460 --> 00:45:20,099
those 2 points okay. Let us take 2 intervals
and see what happens, so this is xi-1, xi,
308
00:45:20,099 --> 00:45:38,220
xi+1 okay, so I have some function and I want
to represent this function using my newly
309
00:45:38,220 --> 00:45:44,079
developed right linear interpolants. So what
I am going to do is I am going to use let
310
00:45:44,079 --> 00:45:54,891
me use some coloured chalk here, on the interval
xi, xi+1 if I take these 2 values to be a
311
00:45:54,891 --> 00:45:59,789
and b, I will get a linear interpolant that
looks like that.
312
00:45:59,789 --> 00:46:09,480
On the interval xi-1, xi what will my a value
be? What is a? a is the value here, and what
313
00:46:09,480 --> 00:46:20,079
is the b? b is going to be what was the a
and the xi, xi+1 interval. So in fact though
314
00:46:20,079 --> 00:46:23,880
it looks like I have 2 coefficients definitely
it is possible, we could come up with the
315
00:46:23,880 --> 00:46:29,579
scheme just like in the box function, if you
are willing to allow discontinuity at this
316
00:46:29,579 --> 00:46:34,710
interval at the edge of this interval at the
interface between the 2, if you willing to
317
00:46:34,710 --> 00:46:37,329
allow discontinuity, then a’s and b’s
can be different.
318
00:46:37,329 --> 00:46:42,230
But if you want the function to be a continuous
function the representation to be accounting
319
00:46:42,230 --> 00:46:48,750
which is where we are going right now, then
the ai corresponding to xi right has to be
320
00:46:48,750 --> 00:47:01,109
the bi corresponding to xi okay. So the a
and b at this point have to be the same, is
321
00:47:01,109 --> 00:47:07,680
that okay everyone okay. So in fact what you
have to do is we have to recombine these,
322
00:47:07,680 --> 00:47:19,980
so you are saying ai, Ni, bi, Ni+1, so maybe
what I should have done here was I could have
323
00:47:19,980 --> 00:47:22,010
made this bi+1 Ni+1 okay.
324
00:47:22,010 --> 00:47:27,890
If I make that bi+1, then what does that do
for me? Then I can actually make that statement
325
00:47:27,890 --> 00:47:49,390
that ai=bi, it allows me to do that. So coefficient
here is the same, and what are the basis vectors
326
00:47:49,390 --> 00:48:00,020
Ni that it multiplies, this coefficient ai
what does it multiply? It multiplies this
327
00:48:00,020 --> 00:48:08,700
is 1 or let me lower let us say this is 1,
it multiplied this function, what is this
328
00:48:08,700 --> 00:48:24,160
function? What was this label? Ni 1 and it
multiplies this function, what was its label?
329
00:48:24,160 --> 00:48:34,490
do I have did I switch it around Ni 0, Ni
1.
330
00:48:34,490 --> 00:48:47,970
I have it write the first time okay fine Ni
0, Ni 1, add it write the first time okay,
331
00:48:47,970 --> 00:48:56,660
there in the integral okay I made a mistake
okay that is fine, you guys should tell me
332
00:48:56,660 --> 00:49:06,050
immediately as soon as you catch it, I flipped
it around everywhere thank you, you should
333
00:49:06,050 --> 00:49:20,809
not let me go through with this, well fortunately
what is going to happen if I am going to get
334
00:49:20,809 --> 00:49:25,369
rid of those superscripts, so okay fine.
335
00:49:25,369 --> 00:49:31,930
Look at the function Ni 0 and Ni 1, Ni 0 and
Ni 1 are non-overlapping I can actually combine
336
00:49:31,930 --> 00:49:37,859
these 2 functions I can add them up, I can
literally add them up since ai and bi are
337
00:49:37,859 --> 00:49:47,900
the same ai=bi the same this summation i=1
through n right, since ai and bi are the same
338
00:49:47,900 --> 00:49:54,460
I have to just shift this, so if I go back
to when this was i-1, i=1 or if you want me
339
00:49:54,460 --> 00:49:57,579
to I can write it out but anyway it is okay.
340
00:49:57,579 --> 00:50:05,490
If I factor out the ai’s since ai and bi
are the same, I am going to get what I have
341
00:50:05,490 --> 00:50:18,680
seen here is I am going to get Ni 0+Ni 1 that
is summation f of x, you can open out the
342
00:50:18,680 --> 00:50:24,230
summation for a few terms and see that this
is true okay. It is actually possible for
343
00:50:24,230 --> 00:50:29,960
me to factor out the ai since ai=bi, it is
actually possible for me to factor out the
344
00:50:29,960 --> 00:50:36,480
ai for Ni 0 and Ni 1 and these can be added,
this actually add, and if you can add them
345
00:50:36,480 --> 00:50:42,040
this is the function that you get okay.
346
00:50:42,040 --> 00:50:52,170
So this is summation i=1 through n ai Ni,
I will rewrite this summation I will rewrite
347
00:50:52,170 --> 00:51:01,970
it at the other end.
348
00:51:01,970 --> 00:51:18,119
So f of x can in fact be written as summation
i=1 through n ai Ni where Ni of x =Ni 0 of
349
00:51:18,119 --> 00:51:34,329
x+Ni 1 of x, is that fine. 0 to N-1 as I said
so we will have to look at what happens through
350
00:51:34,329 --> 00:51:41,170
because there is an issue. So I leave this
we will investigate I just write this just
351
00:51:41,170 --> 00:51:48,450
for right, so we have to really look at what
happens for all these intervals okay. So now
352
00:51:48,450 --> 00:51:55,060
for so the endpoints we look at what happens
at the endpoints, you will have to a bit careful
353
00:51:55,060 --> 00:52:05,000
at endpoints okay right. So what is this function
Ni? What is the graph of the function Ni?
354
00:52:05,000 --> 00:52:25,140
So if I have xi, I have xi-1, I have xi+1,
this is Ni as a function of x, it is 0 from
355
00:52:25,140 --> 00:52:43,980
a to xi-1, it rises to 1 linearly drops to
0 at xi+1 linearly, it is again 0 okay, because
356
00:52:43,980 --> 00:52:55,049
of the shape of the function these functions
are called either hat functions or tent functions.
357
00:52:55,049 --> 00:52:59,750
You can imagine that if you construct functions
like this in 2 dimensions, they look like
358
00:52:59,750 --> 00:53:05,630
the tent they are called tent functions or
hat functions is that fine okay, has any questions
359
00:53:05,630 --> 00:53:14,890
okay. So then we will continue with this in
the next class.