1
00:00:10,090 --> 00:00:21,131
So we have looked at representing that we
can represent functions on to computer. So
2
00:00:21,131 --> 00:00:27,949
today we will look at specifically some mechanisms
by which we do this. What we saw there was
3
00:00:27,949 --> 00:00:35,280
that we can represent functions, but we want
to be able to organize functions the way we
4
00:00:35,280 --> 00:00:40,350
organized vectors which we have seen in the
last class. Today I am going to talk about
5
00:00:40,350 --> 00:00:43,500
Box functions.
6
00:00:43,500 --> 00:00:57,820
It is a special class of functions. I am going
to define 2 functions to start with, one is
7
00:00:57,820 --> 00:01:12,600
a function f is defined on the interval 0,1.
The value of f on the interval 0.50 to 0.5
8
00:01:12,600 --> 00:01:33,849
is 1 and outside that it is 0. I define another
function g it is also on the interval 0,1.
9
00:01:33,849 --> 00:01:42,260
Its value on the interval 0 to 0.5 is 0 and
between 0.5 and 1 it is 1. So this value is
10
00:01:42,260 --> 00:01:53,509
1 function value there is 1. If you consider
a linear combination of these functions if
11
00:01:53,509 --> 00:02:05,929
you look at af plus bg you will see that just
like in the vectors in the case of vectors
12
00:02:05,929 --> 00:02:14,349
if I took another linear combination cf plus
dg an addition of these 2.
13
00:02:14,349 --> 00:02:20,390
And I can add them out it is defined on the
same domain an addition of these 2 will in
14
00:02:20,390 --> 00:02:38,400
fact give me a plus c into f plus b plus d
into g. So we see that just as we did the
15
00:02:38,400 --> 00:02:43,819
other usual letters that you are used to that
we have something that looks like a summation
16
00:02:43,819 --> 00:02:50,950
and we are able to do the vector algebra and
set it up in a systematic fashion once we
17
00:02:50,950 --> 00:02:57,319
define the dot product what we need to do
is for functions we want to be able to define
18
00:02:57,319 --> 00:03:01,900
a dot product. I will define the dot product
as follows.
19
00:03:01,900 --> 00:03:15,590
I will define it on for these 2 specific functions
0 to 1 as f into g into dx. I use the notation
20
00:03:15,590 --> 00:03:23,650
f, g right, because the dot is already used
in the case of functions the dot is already
21
00:03:23,650 --> 00:03:29,109
used for composition of functions so we do
not want any confusion. If you say mathematics
22
00:03:29,109 --> 00:03:36,719
if you say fg it is possible that you confuse
it for f of g of x so that we do not confuse.
23
00:03:36,719 --> 00:03:40,489
We introduce a new notation for the dot product.
24
00:03:40,489 --> 00:03:56,159
So what is f.g? f.g is this integral and as
it turns out because these regions are non
25
00:03:56,159 --> 00:04:02,829
overlapping this dot product in fact turns
out to be 0. You can work out that integral
26
00:04:02,829 --> 00:04:07,900
and check that the dot products in fact are
note to be 0. We will come back to this point
27
00:04:07,900 --> 00:04:16,870
later. Right now what I am interested is in
getting as we did earlier defining a magnitude
28
00:04:16,870 --> 00:04:21,320
something like a magnitude in the case of
a function it is called a norm.
29
00:04:21,320 --> 00:04:27,931
We define a norm that comes from this dot
product just like we did with vectors. So
30
00:04:27,931 --> 00:04:37,610
I could define the square with a norm as f.f
which turns out to be the integral 0 to 1
31
00:04:37,610 --> 00:04:57,630
f square dx. Now in the similar fashion we
can define norm g square is g.g. integral
32
00:04:57,630 --> 00:05:10,180
0 to 1 g square dx. It is area into the curve.
It is clear that they should both be the same.
33
00:05:10,180 --> 00:05:14,840
What does this work out to? So what is norm
of f?
34
00:05:14,840 --> 00:05:27,710
So it is integral 0 to 1 f square dx which
is actually the integral 0 to 0.5 1 into dx
35
00:05:27,710 --> 00:05:42,970
which is one half. So norm of that in fact
1 over square root 2 and again I am just duplicating
36
00:05:42,970 --> 00:05:52,729
whatever work we did with the usual vectors
that you have seen I can define a unit vector
37
00:05:52,729 --> 00:06:10,750
as f by norm of f and I would expect its magnitude
so (())(06:04) could be 1 is that fine. Any
38
00:06:10,750 --> 00:06:22,230
questions? Fine. What do we have? We will
now manage to actually repeat the process
39
00:06:22,230 --> 00:06:28,860
that we did for vectors we can actually get.
40
00:06:28,860 --> 00:06:36,419
We can actually define a general dot product
of 2 functions f and g. We will repeat the
41
00:06:36,419 --> 00:06:43,659
process, but in this case the functions could
be defined between any 2 intervals a and b
42
00:06:43,659 --> 00:06:53,430
and you could actually define it as f g dx.
f and g are functions that g from take some
43
00:06:53,430 --> 00:07:00,669
real number and return a real number. Is that
fine? So in general it will not be 0 to 1.
44
00:07:00,669 --> 00:07:04,539
I will do everything here as from 0 to 1,
but in general the definition is not restricted
45
00:07:04,539 --> 00:07:09,699
to 0 to 1 is that fine.
46
00:07:09,699 --> 00:07:16,770
So why do not you try what do not you try
something with 3 coordinates. So what if I
47
00:07:16,770 --> 00:07:27,470
define 3 functions f, g, and h I try something
f, g, and h. f is defined in a similar fashion
48
00:07:27,470 --> 00:07:32,160
now the only difference is because I have
got 3 functions I am going to break up the
49
00:07:32,160 --> 00:07:46,099
interval 0 to 1, one third. Two third and
that is my function f and I define my function
50
00:07:46,099 --> 00:08:00,389
g between one third, two third that is 1,
0 that is my function g and in a similar fashion
51
00:08:00,389 --> 00:08:01,610
I will define my function h.
52
00:08:01,610 --> 00:08:21,710
That is my
53
00:08:21,710 --> 00:08:30,310
function h. The value of h is 0 on the interval
0 to two third, 1 on the interval two third
54
00:08:30,310 --> 00:08:36,820
to 1. In a similar fashion g is 0 on the 2
intervals, 0, one third, two third, one third
55
00:08:36,820 --> 00:08:42,160
and it is 1 on the interval one third to two
third. Here it is 1 on the interval 0 to one
56
00:08:42,160 --> 00:08:48,980
third and it is 0 on the rest of it. Now we
go back to the example that I used in the
57
00:08:48,980 --> 00:08:59,650
earlier class. So I asked a question what
is 3f plus 2g plus h. It looks very similar
58
00:08:59,650 --> 00:09:08,900
to 3i plus 2j plus k where i, j, k are standard
unit vectors.
59
00:09:08,900 --> 00:09:13,260
So it is almost as I have defined these you
previously when you first learnt it you may
60
00:09:13,260 --> 00:09:18,150
wonder what (())(09:13) i,j, and k it is almost
as though I actually told you what are i,
61
00:09:18,150 --> 00:09:28,510
j, and k define them in terms of functions
and you can if you have 5f plus g plus h you
62
00:09:28,510 --> 00:09:34,040
can actually add up these 2 quantities you
can perform the arithmetic just like you do
63
00:09:34,040 --> 00:09:43,560
normally and get 8f plus 3g plus 3h enough
that is fine.
64
00:09:43,560 --> 00:09:51,190
All very nice! So it looks like we can use
combinations of these coefficients and represent
65
00:09:51,190 --> 00:09:55,250
function how well does this work so that is
the question that we have how well does this
66
00:09:55,250 --> 00:10:05,380
work? So what we have so far. We have defined
functions in this form because it looks like
67
00:10:05,380 --> 00:10:11,910
somewhat like a box it is called a Box function.
We have defined Box function and it is clear
68
00:10:11,910 --> 00:10:16,130
that at any interval I can define any number
of Box functions that I want we will get to
69
00:10:16,130 --> 00:10:22,520
that in a little while and it looks like I
can represent functions on the interval 0
70
00:10:22,520 --> 00:10:23,640
1 using the Box functions.
71
00:10:23,640 --> 00:10:35,010
So we will try to use it and see what happens.
We will pick a simple function. We will pick
72
00:10:35,010 --> 00:10:45,270
a very simple function p(x) equal to x. So
I would like to represent this function as
73
00:10:45,270 --> 00:10:56,810
p of f the f component pf into f plus Pg into
g plus Ph into h. This is the f component,
74
00:10:56,810 --> 00:11:05,590
the g component, the h component of P and
all I have to do now is take the dot product.
75
00:11:05,590 --> 00:11:16,510
So I asked the question what is P(x),f what
is this dot product. This is the integral
76
00:11:16,510 --> 00:11:27,450
P(x) f dx integral 0 to 1. We will just evaluate
that.
77
00:11:27,450 --> 00:11:41,850
We will just evaluate that. So we will get
x into f integral 0 to 1 dx which is well
78
00:11:41,850 --> 00:11:52,120
we know f is nonzero only between 0 and one
third, so it is 0 to one third x into 1 in
79
00:11:52,120 --> 00:12:13,100
that domain dx which is x square/2 which gives
me 1 by 18 is that fine? That is actually
80
00:12:13,100 --> 00:12:23,260
performing the integration. What is the dot
product P(x), f without performing the integration
81
00:12:23,260 --> 00:12:31,920
from here? So what would we like it to be?
Let me not say what is it what is this quantity
82
00:12:31,920 --> 00:12:55,340
dotted with f. Pf into f plus Pg into g plus
Ph into h dotted with f what is this quantity.
83
00:12:55,340 --> 00:13:13,370
It is just Pf(f,f) because f.g is 0, f.h is
0 and what is f.f? There be careful now. I
84
00:13:13,370 --> 00:13:21,510
changed the definition of my f. What is f.f.
Well we have to calculate f.f for this case
85
00:13:21,510 --> 00:13:34,470
f.f is the integral 0 to and I will write
it only till one third dx which gives me 1
86
00:13:34,470 --> 00:13:49,421
by 3. So presumably if I have one of them
it will give you 1 over n. So Pf in fact is
87
00:13:49,421 --> 00:14:09,410
I am going to get it from here. P(x) dotted
with f by f.f which gives me 1 by 6. There
88
00:14:09,410 --> 00:14:24,820
are any questions? So what we are doing now.
89
00:14:24,820 --> 00:14:42,830
In a similar fashion Pg will be Pf into f
plus Pg into g plus Ph into h dotted with
90
00:14:42,830 --> 00:15:01,670
g which will give me Pg into g.g and you can
check that g.g is going to be one third, p.g
91
00:15:01,670 --> 00:15:19,080
is going to one third and therefore what is
Pg. So if you take P(x) into g integrate from
92
00:15:19,080 --> 00:15:30,680
one third to 2 third because that is where
g is nonzero. Of course do not forget that
93
00:15:30,680 --> 00:15:46,660
you have to divide by g.g. What does this
give me? This should give me one half.
94
00:15:46,660 --> 00:15:59,100
This will give me one half and Ph in a similar
fashion Ph you will have to integrate it between
95
00:15:59,100 --> 00:16:23,060
2 thirds and 1 P(x) into h(x) into dx by h,
h which will be you can verify that it is
96
00:16:23,060 --> 00:16:33,550
5 by 6. If you are wondering how I know the
answer it is just basically comes from asymmetry.
97
00:16:33,550 --> 00:16:44,340
So this is about a 6 way from 1 that is basically
how that comes. So what is a function? What
98
00:16:44,340 --> 00:16:48,440
is the function that we want to plot?
99
00:16:48,440 --> 00:17:01,730
Let us plot this function. So this is x, this
is P(x) and the function itself is a 45 degree
100
00:17:01,730 --> 00:17:08,089
line is that fine. The function itself is
45 degree line. We have representation of
101
00:17:08,089 --> 00:17:17,199
a function on those 3 intervals represented
by I use 3 different colours here represented
102
00:17:17,199 --> 00:17:33,400
by values which are so this is one third,
2 third, 1. It is a 45 degree line, one third,
103
00:17:33,400 --> 00:17:45,429
2 third, 1. So where is one sixth. One sixth
is somewhere in between.
104
00:17:45,429 --> 00:18:12,980
What is that? That is Pf into f to which I
want to add that is plus Pg into g and the
105
00:18:12,980 --> 00:18:25,490
last one not that different in colour, but
that does not matter. The last one is Ph into
106
00:18:25,490 --> 00:18:38,549
h. is that fine. So look at the 2 functions.
I have the 45 degree line that I am trying
107
00:18:38,549 --> 00:18:45,860
to approximate and I had this other thing
made up of blue, and red lines which are nothing
108
00:18:45,860 --> 00:18:49,269
but our representation on the computer If
you have to use Box functions to represent
109
00:18:49,269 --> 00:18:52,820
the functions in the computer this is what
we would get.
110
00:18:52,820 --> 00:18:59,890
So clearly just like we have errors in representing
numbers, we have round off error. We have
111
00:18:59,890 --> 00:19:05,630
a similar error here if you try to represent
the function. If you try to represent the
112
00:19:05,630 --> 00:19:10,620
function using Box functions you do not get
the original function actually it should be
113
00:19:10,620 --> 00:19:15,580
obvious when using constant functions to represent
something that is linear. But the fact that
114
00:19:15,580 --> 00:19:20,250
matter is that I projected it, I went through
the formal process.
115
00:19:20,250 --> 00:19:24,809
I projected the functions on to the Box functions,
I went through the formal process and what
116
00:19:24,809 --> 00:19:34,600
do I have. I basically have a function here.
I have a function here which supposedly represents
117
00:19:34,600 --> 00:19:40,289
this properly. Take a closer look. In some
integral sense if you look at this you notice
118
00:19:40,289 --> 00:19:49,629
the area under this curve is indeed the area
under that little triangle there. We will
119
00:19:49,629 --> 00:19:55,470
manage somehow we have captured that integral
being defined as a dot product have come through
120
00:19:55,470 --> 00:19:56,880
and it is the same thing here.
121
00:19:56,880 --> 00:20:05,450
So we are somehow capturing that area properly,
but the function value itself is not right.
122
00:20:05,450 --> 00:20:09,629
So I no longer want to call this, I do not
want to call this P of x I want to call our
123
00:20:09,629 --> 00:20:14,110
representation give a representation a name.
Right now I will call it P tilde. Right now
124
00:20:14,110 --> 00:20:18,279
I will call it P tilde. We will introduce
more formal notation later. Right now I will
125
00:20:18,279 --> 00:20:34,919
call it P tilde. So P tilde of x equal to
Pf into f plus Pg into g plus Ph into h. So
126
00:20:34,919 --> 00:20:36,299
what we got so far.
127
00:20:36,299 --> 00:20:42,160
If we give me a function it is possible for
me to define Box functions. It is possible
128
00:20:42,160 --> 00:20:49,909
for me to use Box functions on the same interval
and represent get components, project the
129
00:20:49,909 --> 00:20:55,789
function on to the Box functions and get components.
I am aware that the resulting function that
130
00:20:55,789 --> 00:21:01,809
I have will not be identical. It is unlikely
to be identical through original function.
131
00:21:01,809 --> 00:21:06,980
There is an error. In the case of numbers
we called it round off error. In this case
132
00:21:06,980 --> 00:21:09,380
I will just call it representation error for
now.
133
00:21:09,380 --> 00:21:19,249
So this is a representation error and the
representation error.
134
00:21:19,249 --> 00:21:27,820
We have to now figure out how to quantify
the representation error. So having found
135
00:21:27,820 --> 00:21:33,769
a way by which we can find a representation
and have discovered that there is an error
136
00:21:33,769 --> 00:21:38,840
in the representation we want to now quantify
how we get that representation error. So how
137
00:21:38,840 --> 00:21:50,900
can we do this? Suggestions? So we have the
dot product. We use the dot product to do
138
00:21:50,900 --> 00:21:56,730
it. So normally what we do is we will reuse
so that is the reason why this dot product
139
00:21:56,730 --> 00:22:01,240
is extremely powerful that is the reason why
we have used the dot product. We use the dot
140
00:22:01,240 --> 00:22:02,240
product here.
141
00:22:02,240 --> 00:22:10,530
To define something called a metric. So from
the dot product, from the norm we will get
142
00:22:10,530 --> 00:22:21,779
a metric. Metric is basically a distance.
We will get a distance now. Right now we only
143
00:22:21,779 --> 00:22:25,860
have magnitude. So think about it normally
you can have magnitudes of vectors which is
144
00:22:25,860 --> 00:22:30,510
what we normally we have defined so far, but
you can also get the distance between 2 position
145
00:22:30,510 --> 00:22:35,190
vectors. The end points of 2 position vectors.
So we will do the same thing.
146
00:22:35,190 --> 00:22:42,860
So we can use the dot product. So if I have
2 functions F and G and I want to know what
147
00:22:42,860 --> 00:22:50,710
is the distance between those 2 functions
then I can look at F minus G and take that
148
00:22:50,710 --> 00:22:59,200
dot product with itself and that should give
me a measure of the distance. So this should
149
00:22:59,200 --> 00:23:11,230
be some distance between F and G square. In
Cartesian coordinates if your magnitude of
150
00:23:11,230 --> 00:23:21,249
a vector is x square plus y square plus z
square and then the distance function between
151
00:23:21,249 --> 00:23:23,760
the magnitude square is x square plus y square
plus z square.
152
00:23:23,760 --> 00:23:29,749
Then you would say x1 minus x2 square plus
y1 minus y2 square and so on. So I am just
153
00:23:29,749 --> 00:23:36,059
basically mimicking that plus z1 minus z2
square and the distance itself would be the
154
00:23:36,059 --> 00:23:40,630
square root of that. I am just basically mimicking
this. I am just repeating whatever we have
155
00:23:40,630 --> 00:23:46,159
done in the standard vectors. I am just repeating
them. It work there, it should work here.
156
00:23:46,159 --> 00:23:57,100
So what is the difference? So now I can ask
the question representation error. I can define
157
00:23:57,100 --> 00:24:15,789
it as square root of the dot product of P
of x minus P tilde, P minus P tilde is that
158
00:24:15,789 --> 00:24:18,389
fine?
159
00:24:18,389 --> 00:24:27,509
P minus P tilde. Let us get back to this P
minus P tilde. So P minus P tilde is here.
160
00:24:27,509 --> 00:24:33,990
This is P minus P tilde. That distance is
P minus P tilde. In fact if you look at it
161
00:24:33,990 --> 00:24:39,679
these 3 intervals P minus P tilde is actually
the same in this particular case. P minus
162
00:24:39,679 --> 00:24:44,710
P tilde happens to be the same. P minus P
tilde happens to be same. So if I find P minus
163
00:24:44,710 --> 00:24:48,879
P tilde for the first one then I do not have
to really repeat it for all 3 of them. I will
164
00:24:48,879 --> 00:25:02,970
just do it for the first one. So find out
what is the representation error.
165
00:25:02,970 --> 00:25:31,710
Representation error is P minus P tilde a
dot product equal to dx from 0 to 1 and I
166
00:25:31,710 --> 00:25:46,570
will find only the first component. So I am
going to find P minus Pf into f squared dx
167
00:25:46,570 --> 00:25:58,299
integral 0 to one third is that fine everyone?
These 3, the differences between the representation
168
00:25:58,299 --> 00:26:02,570
and the function in this particular problem
they happen to be same. I am just making use
169
00:26:02,570 --> 00:26:17,450
of that fact that is all. So what is this?
x minus 1 by 6 squared integral 0 to one third
170
00:26:17,450 --> 00:26:23,289
dx this is the only way by which we could
do this.
171
00:26:23,289 --> 00:26:35,940
So this is x minus 1 by 6 cube one third between
the limits 0 and one third. What does this
172
00:26:35,940 --> 00:26:59,270
give me? So one is going to be one third minus
one sixth which is one sixth cube and the
173
00:26:59,270 --> 00:27:13,399
other is going to be plus one sixth cube.
Is that fine? And there are 3 of them. So
174
00:27:13,399 --> 00:27:24,720
to get this, to get the representation error
I have 3 of these so in fact it turns out
175
00:27:24,720 --> 00:27:40,330
to be 2 times one sixth cubed. Is that okay
everyone. So this would be the representation
176
00:27:40,330 --> 00:27:41,450
error. So as I said please remember this.
177
00:27:41,450 --> 00:27:48,029
This is equivalent for our functions like
similar to round off error. Are there any
178
00:27:48,029 --> 00:28:04,559
questions? Now we are going to do can be do
better. This function on the interval 0 and
179
00:28:04,559 --> 00:28:11,070
1 we define 2 functions f and g and we define
3 different functions f, g, and h why not
180
00:28:11,070 --> 00:28:18,149
see if we can define n functions. So we will
define whole host of function. So we will
181
00:28:18,149 --> 00:28:26,090
define a whole host of function and we will
use the subscript fi to indicate the ith function.
182
00:28:26,090 --> 00:28:35,010
And what is the ith function I am going to
look like. The ith function so if I have n
183
00:28:35,010 --> 00:28:45,929
intervals, if I have n intervals and number
these x0, x1, x2, x3 and so on. All the xs
184
00:28:45,929 --> 00:28:59,039
are equally spaced. This goes to 1 my ith
function so the second function for instance
185
00:28:59,039 --> 00:29:08,980
will go from will be nonzero from x1 to x2.
The ith function that would be f2. The ith
186
00:29:08,980 --> 00:29:23,360
function will be nonzero will be 1 for x belonging
to xi minus 1, xi. Is that fine?
187
00:29:23,360 --> 00:29:32,630
So I had to make it be a little more precise
about the way I do it. So what I will do is
188
00:29:32,630 --> 00:29:51,810
I will say f0 equal to 1 in the close intervals
x0, x1. f1 and it is 0 otherwise. f1 equal
189
00:29:51,810 --> 00:30:01,590
to 1 on open interval it is open on 1 side
x2 closed on the right side. So we will keep
190
00:30:01,590 --> 00:30:18,279
everything open thereon open on the left closed
on the right. fi equal to 1 on x1 minus 1
191
00:30:18,279 --> 00:30:39,399
xi. (()))(30:24) So f2 would go from 1 to
2 and f3 would go from 2 to 3. f1 will go
192
00:30:39,399 --> 00:30:45,270
from 1 to 2. I started with fo. I am sorry.
193
00:30:45,270 --> 00:30:57,419
That is the programming. When we program we
start the count at 0 actually I started the
194
00:30:57,419 --> 00:31:06,309
count there at 0. You will have to keep your
eyes open for that. Are there any questions?
195
00:31:06,309 --> 00:31:20,480
The intervals are equally spaced in all these
discussions, but you have to know see why
196
00:31:20,480 --> 00:31:26,230
these functions are orthogonal, why does this
work, why are we able to do this that is where
197
00:31:26,230 --> 00:31:30,019
we are going to end this class, but right
now let me see if I can use this fi and then
198
00:31:30,019 --> 00:31:34,220
we will summarize what we have got. So what
do I have?
199
00:31:34,220 --> 00:31:49,010
If I take fi.fi the length of any interval
is 1 by n fi.fi is 1 by n Please check to
200
00:31:49,010 --> 00:32:09,570
make sure that works fi.fi is in fact 1 by
N. fi.fj if I is not equal to j equal to 0
201
00:32:09,570 --> 00:32:15,879
so any function in our case right now the
function that we are using can be represented
202
00:32:15,879 --> 00:32:28,720
as is approximately some P tilde can be represented
as summation over I going from 1 through N
203
00:32:28,720 --> 00:32:45,470
some ai fi. Let us get back we will try to
draw a figure for this and see what happens
204
00:32:45,470 --> 00:32:50,330
and again we will find the representation
error. Draw a figure for it.
205
00:32:50,330 --> 00:32:55,549
I am not going to draw an exact figure now
this is a little more difficult because there
206
00:32:55,549 --> 00:33:01,559
are N of them so it is little more difficult.
That is the 45 degree line. So what would
207
00:33:01,559 --> 00:33:13,149
you expect and as I said you can check this
out what you will get is a bunch of steps
208
00:33:13,149 --> 00:33:25,720
in this fashion over each interval it is going
to be a constant. You cannot represent the
209
00:33:25,720 --> 00:33:32,880
linear it may be a constant however looking
at this I would guess that the representation
210
00:33:32,880 --> 00:33:35,999
error is quite small.
211
00:33:35,999 --> 00:33:40,299
Looking at this I guess that the representation
error is quite small and just as I did earlier
212
00:33:40,299 --> 00:33:43,950
I am going to find the representation error
only in the first interval and just multiply
213
00:33:43,950 --> 00:33:59,999
it by n. So what is the representation error
in the first interval? For p(x) minus a1 into
214
00:33:59,999 --> 00:34:15,800
f1 is what we want. What is this representation
error? In order to do this we need to find
215
00:34:15,800 --> 00:34:47,890
a1. What is a1? a1 equal to dot product of
P(x) dotted with f1 by f1.f
216
00:34:47,890 --> 00:35:19,320
equal to x dx integral 0 to 1 over n by 1
over n.
217
00:35:19,320 --> 00:35:42,280
X square by 2 0 to 1 by N into N gives me
1 by 2N because we have general expression
218
00:35:42,280 --> 00:35:51,590
and 1 by 6 everything works. We have a general
expression 1 by 2N. So by a1 therefore is
219
00:35:51,590 --> 00:36:06,850
P(x) by error therefore representation error
P(x) minus a1f1 and you guys are letting me
220
00:36:06,850 --> 00:36:35,820
get away with a mistake here. It is better.
P(x) minus a1f1 gives me x minus 1 by 2N squared
221
00:36:35,820 --> 00:36:50,310
the integral between 0 to 1 by N is that right.
Earlier we had 0 to one third x minus 1 by
222
00:36:50,310 --> 00:37:03,120
6 just verify that it is okay and this in
fact will be x minus 1 by 2N cube one third
223
00:37:03,120 --> 00:37:25,100
between the limits 0 and 1 by N and that should
turn about to be fine.
224
00:37:25,100 --> 00:37:36,370
So
225
00:37:36,370 --> 00:37:42,850
the whole interval I will have N of these.
The total representation error we just say
226
00:37:42,850 --> 00:38:05,660
representation error is do I take this square
root first or do I so at the end of these
227
00:38:05,660 --> 00:38:28,890
what do I get. N of these N by 3 into 1by
8N cubed plus 1 by 8N cubed that gives me
228
00:38:28,890 --> 00:38:39,400
1 by 4 I am (())(38:34) leaving the 4 because
I planned to take a square root 3 and squared.
229
00:38:39,400 --> 00:38:48,830
This is representation error squared and therefore
the square has a representation error is that.
230
00:38:48,830 --> 00:39:06,190
Our representation error is 1 by 2 cube root
3 into N. now what we are going to do is we
231
00:39:06,190 --> 00:39:13,000
are going to look at what we have managed
to do so far and define a few terms. I just
232
00:39:13,000 --> 00:39:19,500
gone through and done all the relevant regulation
just a repetition of what we did earlier.
233
00:39:19,500 --> 00:39:22,430
Of course in the case of vectors we did not
really have a representation error. We had
234
00:39:22,430 --> 00:39:28,120
representation error in the form of round
off error only at numbers.
235
00:39:28,120 --> 00:39:36,540
Now the first thing to note is it gets better
as N gets larger that is what our instance
236
00:39:36,540 --> 00:39:42,610
tells us that we get closer and closer to
the straight line as N gets larger. So that
237
00:39:42,610 --> 00:39:48,510
part is good as N gets larger it gets better,
but there is a bad part to it. What is the
238
00:39:48,510 --> 00:39:54,010
bad part? Number of jumps that you have in
your representation will also increase which
239
00:39:54,010 --> 00:39:58,590
I am not comfortable. So we may be able to
live with it. There are by the way the ways
240
00:39:58,590 --> 00:39:59,670
by which you can live with it.
241
00:39:59,670 --> 00:40:04,110
There are things that you can do to get around
it, but it is not we asked the question can
242
00:40:04,110 --> 00:40:11,570
we do better. So now what have we managed
with Box function what have we managed. We
243
00:40:11,570 --> 00:40:16,920
have managed to get some way by which we can
represent functions. We have managed to figure
244
00:40:16,920 --> 00:40:23,890
out some way by which we can estimate the
error in that function. So the error in the
245
00:40:23,890 --> 00:40:29,260
function is of the order 1 by N which basically
means that if I am dividing the interval 0,
246
00:40:29,260 --> 00:40:34,270
1 into N parts then I have a delta x which
is of the order of 1 by N.
247
00:40:34,270 --> 00:40:40,510
So the representation error is of the order
of delta x and if I make by delta x smaller
248
00:40:40,510 --> 00:40:47,160
and smaller the representation error also
gets smaller and smaller in a linear fashion.
249
00:40:47,160 --> 00:40:52,060
So the error is of first order. The exponent
is 1. The error is a first order and rather
250
00:40:52,060 --> 00:41:04,370
casually introducing language here the error
is of first order. The convergence meaning
251
00:41:04,370 --> 00:41:10,560
as I increase N how close do I get close to
solution or to the function that I want how
252
00:41:10,560 --> 00:41:12,900
close is the representation get to the original
function.
253
00:41:12,900 --> 00:41:18,000
So it converges to the original function because
the error goes to 0 and the rate at which
254
00:41:18,000 --> 00:41:27,910
it does it is linear. So the convergence is
linear. Error is what I want, the convergence
255
00:41:27,910 --> 00:41:33,740
is linear. The representation, how well what
is the polynomial that you are able to represent
256
00:41:33,740 --> 00:41:42,810
exactly. What polynomial can you represent
exactly constant. So the representation itself
257
00:41:42,810 --> 00:41:48,640
is zeroth order. The error is first order,
the representation itself.
258
00:41:48,640 --> 00:42:16,441
So we represent with Box functions we can
get a zeroth order representation. Zeroth
259
00:42:16,441 --> 00:42:23,841
order representation, first order error, linear
convergence, 3 different things. Let us look
260
00:42:23,841 --> 00:42:32,020
at the orthogonality business. We need to
from this in order to talk to converse about
261
00:42:32,020 --> 00:42:36,880
these functions we also need to define some
terms. It is where did this orthogonality
262
00:42:36,880 --> 00:42:38,480
come from?
263
00:42:38,480 --> 00:42:52,710
Where did we get this? Fifj equal to 0 if
I not equal to j. why did that work? How did
264
00:42:52,710 --> 00:43:05,600
that happen? Why does that work? So that works
simply because if you have 1 function which
265
00:43:05,600 --> 00:43:14,290
is nonzero on the ith interval and you have
another function which is nonzero on the jth
266
00:43:14,290 --> 00:43:29,070
interval then if you have to multiply the
2 this is nonzero where this is zero, this
267
00:43:29,070 --> 00:43:33,440
is nonzero or that is zero. So this business
where is it zero, where is it not zero we
268
00:43:33,440 --> 00:43:36,120
need. We need some language for this.
269
00:43:36,120 --> 00:43:50,250
So the interval or the region where the function
is nonzero is called the support of the function.
270
00:43:50,250 --> 00:43:56,760
So the support of the function is that part
of the domain definition where the function
271
00:43:56,760 --> 00:44:09,170
is nonzero from the support of the function
of fj. Right it is the support of the function.
272
00:44:09,170 --> 00:44:16,530
So what we have done is we got orthogonality
fi.fj has been 0 when I not equal to j from
273
00:44:16,530 --> 00:44:22,120
the fact that the support of the 2 functions
are nonoverlapping in the sense we support
274
00:44:22,120 --> 00:44:23,520
to sort of orthogonal.
275
00:44:23,520 --> 00:44:29,390
Supports for nonoverlapping you understand.
This contrast with if you seen Fourier series
276
00:44:29,390 --> 00:44:37,430
before sin x and cosine x on the interval
0 to 2 pi are orthogonal to each other, but
277
00:44:37,430 --> 00:44:45,710
they define, they are both nonzero almost
everywhere on the interval 0 to 2 pi is that
278
00:44:45,710 --> 00:44:53,880
clear. Whereas here we have achieved orthogonality
by basically saying that the support of this
279
00:44:53,880 --> 00:44:57,710
function is different from the support of
that function. They are nonoverlapping that
280
00:44:57,710 --> 00:44:58,710
is important.
281
00:44:58,710 --> 00:45:01,590
They are nonoverlapping and therefore we have
orthogonality that is 1 thing that 1 critical
282
00:45:01,590 --> 00:45:09,280
thing that we have to notice from here. The
second thing is though the function gets closer
283
00:45:09,280 --> 00:45:14,530
it gets jumpier. So we have to ask ourselves
the question is there a way by which can we
284
00:45:14,530 --> 00:45:19,000
come up with something that will give us smoother
functions. We have constructed these functions
285
00:45:19,000 --> 00:45:25,690
Box functions now, but is there a mechanism
by which we can get smoother functions.
286
00:45:25,690 --> 00:45:35,910
So, nonoverlapping will give us orthogonality.
In some sense and, if we go for smoother functions.
287
00:45:35,910 --> 00:45:41,500
How do I get smoother the representation here
is zeroth order. I would like to represent
288
00:45:41,500 --> 00:45:49,200
at least the first order which means that
I should use some kind of linear interpolate
289
00:45:49,200 --> 00:45:53,780
that is the possibly. The other question that
you could ask is why bother with all these
290
00:45:53,780 --> 00:46:00,080
little bits and pieces f1, f2, f3, f4 and
so on why not we use polynomials directly
291
00:46:00,080 --> 00:46:03,570
would it be just smoother to use just polynomials
directly.
292
00:46:03,570 --> 00:46:10,870
So there are 2 possible parts that we can
take having mentioned Fourier series why get
293
00:46:10,870 --> 00:46:19,150
the orthogonality from nonoverlapping domains,
nonoverlapping supports right the domain is
294
00:46:19,150 --> 00:46:23,460
overlapped, but nonoverlapping supports. Why
get orthogonality from that? Why not just
295
00:46:23,460 --> 00:46:30,600
get orthogonality from somehow to construct
it using the Gram-Schmidt process or something
296
00:46:30,600 --> 00:46:32,270
of that sort why not just get orthogonality
directly from the functions.
297
00:46:32,270 --> 00:46:39,150
So there are 2 possible ways by which we can
go. What we will do is we will try to follow
298
00:46:39,150 --> 00:46:44,400
this linear process right now. If we have
the Box function we will now try to get go
299
00:46:44,400 --> 00:46:50,240
to a linear mechanism we will try to use this
nonoverlapping we will try to use these nonoverlapping
300
00:46:50,240 --> 00:46:55,580
functions supports for the function and see
if it is possible for us to generate linear
301
00:46:55,580 --> 00:47:01,870
interpolates. Is that fine? Are there any
questions? So in tomorrow's class we are basically
302
00:47:01,870 --> 00:47:08,200
going to look at we will start with Hat functions.
303
00:47:08,200 --> 00:47:26,270
What are called Hat functions where we will
use linear interpolates as the basic mechanism.