1
00:00:10,160 --> 00:00:20,640
So in the last class we saw that Laplace equation
discretized could be written as a system of
2
00:00:20,640 --> 00:00:36,620
equations. In fact I just wrote that as A
phi = b, to keep the conversation general,
3
00:00:36,620 --> 00:00:43,790
right, I will switch to the standard notation
that you are used to which is Ax = b, I will
4
00:00:43,790 --> 00:00:49,680
put a tilde under the x to indicate that it
is a vector, fine and also so that we do not
5
00:00:49,680 --> 00:00:53,930
confuse it, I mean after all we were doing
xy coordinates and so on, so that we do not
6
00:00:53,930 --> 00:00:55,930
confuse it with the xy there.
7
00:00:55,930 --> 00:01:05,220
So we are basically solving the system Ax
= b, okay, and there were 2 schemes that we
8
00:01:05,220 --> 00:01:17,270
saw. One was the Jacobi iteration and the
other was basically Gauss-Seidel, you may
9
00:01:17,270 --> 00:01:24,080
not have realized it, the other scheme that
we basically used to solve that system of
10
00:01:24,080 --> 00:01:32,319
equations was Gauss-Seidel, okay, now what
I want to do is both of these schemes are
11
00:01:32,319 --> 00:01:38,209
iterative schemes as opposed to direct schemes
like Gaussian elimination or an equivalent
12
00:01:38,209 --> 00:01:40,319
which is LU decomposition.
13
00:01:40,319 --> 00:01:49,540
Okay, so we are not talking about using a
direct method. Direct methods like we would
14
00:01:49,540 --> 00:02:04,989
not do this like either Gaussian elimination,
we are not going to do this, or equivalently
15
00:02:04,989 --> 00:02:12,770
LU decomposition. You can actually show that
these 2 are equivalent to each other, okay,
16
00:02:12,770 --> 00:02:17,879
the elimination and the back substitution
part turns out to be the same as doing the
17
00:02:17,879 --> 00:02:20,390
LU decomposition.
18
00:02:20,390 --> 00:02:25,390
So we are going with iterative schemes, okay
we are going with iterative schemes to solve
19
00:02:25,390 --> 00:02:34,400
this in the context of Laplace equation it
is called a relaxation scheme, okay, now what
20
00:02:34,400 --> 00:02:39,170
we will do is, we will try to write these
in the iterative form that we have actually
21
00:02:39,170 --> 00:02:45,230
written for phi, okay, in a recursive form
that we have actually written for phi, in
22
00:02:45,230 --> 00:02:49,830
order to do that I need to partition A.
23
00:02:49,830 --> 00:02:56,330
I want to partition A that means I want to
write A as the sum of various parts as the
24
00:02:56,330 --> 00:03:10,870
sum of 3 parts D, L and U. This is basically
where we ended in the last class, so if the
25
00:03:10,870 --> 00:03:22,000
entry is in A or aij, the entry is in D or
dij, correspondingly you have lij and uij.
26
00:03:22,000 --> 00:03:45,020
I am defining my DS the diagonal terms D or
my defining D: dij = aig, if i = j = 0 otherwise,
27
00:03:45,020 --> 00:03:50,900
so those of you have already seen upper triangular
and lower triangular matrices this may just
28
00:03:50,900 --> 00:03:55,350
be a repeat, but just for completion let me
just write this out.
29
00:03:55,350 --> 00:04:27,290
So for L: lij is aij, if i < j, okay, and
= 0 otherwise, and U: which is uij = aij,
30
00:04:27,290 --> 00:04:37,870
if i > j and 0 otherwise. So basically this
will give me the diagonal elements, this will
31
00:04:37,870 --> 00:04:40,760
give me the elements below the diagonal, this
will give me the elements above the diagonal.
32
00:04:40,760 --> 00:04:49,460
Okay, so I have partitioned my matrix A in
this fashion. Let us just take one equation
33
00:04:49,460 --> 00:04:54,380
that we did from Gauss Jacobi and see what
we are talking about.
34
00:04:54,380 --> 00:05:01,270
So the Laplace equation when we were doing
the regular Jacobi iteration basically was
35
00:05:01,270 --> 00:05:16,960
phi ij at n+1 = 0.25, I will write a 0 here
which was the righthand side of the equation
36
00:05:16,960 --> 00:05:33,300
lambda squared phi = 0 + phi i+1j n + phi
i j+1 n + phi i–1j n + phi i j–1 n. This
37
00:05:33,300 --> 00:05:49,980
would basically be, the 0 here is
basically the righthand side. The righthand
38
00:05:49,980 --> 00:06:00,460
side happen to be 0, okay, that is the entry
in b. Okay, so if I look at this Jacobi iteration
39
00:06:00,460 --> 00:06:05,560
basically which is this 0.25 that is 1/4.
40
00:06:05,560 --> 00:06:11,900
This is 1/4 which is essentially D inverse
that corresponds to D inverse. So looking
41
00:06:11,900 --> 00:06:49,520
at this by inspection, I say that my
x at n+1 is D inverse b – L+U times
42
00:06:49,520 --> 00:07:08,050
x at n, is that fine, everybody, so I can
rearrange terms, I get xn+1 = sum P times
43
00:07:08,050 --> 00:07:27,389
xn + C, right. What is P, what is the matrix
P? P = -D inverse L + U, okay, this is called
44
00:07:27,389 --> 00:07:44,820
iteration matrix. So P is the iteration matrix,
we can write it in this form. So this is P
45
00:07:44,820 --> 00:07:50,840
that would be Jacobi, I put a J there P Jacobi.
46
00:07:50,840 --> 00:07:59,220
What about Gauss-Seidel, Gauss-Seidel is going
to have, if we did Gauss-Seidel instead we
47
00:07:59,220 --> 00:08:10,500
had phi ij n+1 = 0.25 times my righthand side
happens to be 0, I am just picking some arbitrary
48
00:08:10,500 --> 00:08:33,039
entry + phi i+1j n + phi i j+1 n + phi i-1j
n+1 + phi i j-1 n+1 this is of course assuming
49
00:08:33,039 --> 00:08:38,979
that I am going from the lower lefthand corner
right, left to right, bottom to top. There
50
00:08:38,979 --> 00:08:44,660
is implicit assumption on the sweep direction.
51
00:08:44,660 --> 00:08:55,269
Okay, so these basically comes from the n+1
side, okay, in a sense that is like saying
52
00:08:55,269 --> 00:09:12,079
that we are solving, let me take these over
to that side, okay, so that would be like
53
00:09:12,079 --> 00:09:17,690
saying, so I am undoing, whatever we did I
am undoing it right to just get the matrix
54
00:09:17,690 --> 00:09:48,940
form, okay, so what do we have, so we have
-phi i-1j n+1 or –phi ij–1 n+1 can either
55
00:09:48,940 --> 00:10:02,990
multiplied by 0.25 or we can get that 4 out,
4 times phi ij n+1 = 0 + phi i+1jn + phi i
56
00:10:02,990 --> 00:10:03,990
j+1 n.
57
00:10:03,990 --> 00:10:42,979
What is this?, this is a diagonal term, this
is D, this is L, right so, this is L + D +L
58
00:10:42,979 --> 00:11:10,320
* x tilde at n+1 = b + U times xn is that
fine. So Gauss-Seidel turns out to be xn+1
59
00:11:10,320 --> 00:11:33,009
= D+L inverse b+u xn tilde. We have to be
a bit careful with the signs, because really
60
00:11:33,009 --> 00:11:41,579
the way we had written 8 this would have been
-4 and those would have been +1 okay you have
61
00:11:41,579 --> 00:11:55,550
to be a bit careful with
62
00:11:55,550 --> 00:12:10,399
the signs.
63
00:12:10,399 --> 00:12:15,959
The diagonals in the off diagonal terms are
of opposite sign in the original matrix, okay,
64
00:12:15,959 --> 00:12:27,459
so actually in the original matrix from the
original matrix this is actually – of D+L,
65
00:12:27,459 --> 00:12:35,889
okay you have to be a bit careful, okay that
is fine, right. Yet again we are able to write
66
00:12:35,889 --> 00:12:51,179
that matrix for Gauss-Seidel as xn+1 is P
Gauss-Seidel xn + C, the C is of course a
67
00:12:51,179 --> 00:13:00,139
C Gauss-Seidel, C is also dependent on, is
that fine, everybody, okay.
68
00:13:00,139 --> 00:13:09,269
And the P is called the iteration matrix,
we can actually figure out now that you can
69
00:13:09,269 --> 00:13:12,709
ask the question if you are going through
we have the iteration matrix, if you are going
70
00:13:12,709 --> 00:13:19,360
through iterations. You are generating given
the x0 you are generating the x1, given the
71
00:13:19,360 --> 00:13:25,230
x1 you are generating an x2 you are generating
a sequence, now we have a form that relates
72
00:13:25,230 --> 00:13:30,279
one to the other in a simple equation.
73
00:13:30,279 --> 00:13:33,029
Something at least that the chalk does looks
as though it can be written simply, we can
74
00:13:33,029 --> 00:13:37,540
ask ourselves the question is there a way
for proven analysis of this, okay, is there
75
00:13:37,540 --> 00:13:44,899
a way for us to figure out to analyze this
problem, so does it converge, does the sequence
76
00:13:44,899 --> 00:13:49,299
that we get, does it converge. In the last
class we saw that we could use the Cauchy’s
77
00:13:49,299 --> 00:13:53,649
test to decide whether convergence occurs
or not.
78
00:13:53,649 --> 00:14:01,119
Here we will see what else we can do, so we
start with this equation okay, so I will write
79
00:14:01,119 --> 00:14:06,939
this in this general form either whether it
is Gauss-Seidel or Jacobi iteration, whatever
80
00:14:06,939 --> 00:14:13,279
iteration, we will see how to do the analysis
for that so coming back here what we basically
81
00:14:13,279 --> 00:14:27,319
do is so the general form that we have is
x at n+1 = P times x at n + C, this is the
82
00:14:27,319 --> 00:14:34,189
general form that we have is that okay.
83
00:14:34,189 --> 00:14:45,230
So you will guess an x not and get an x1 that
is what you are going to do and then get an
84
00:14:45,230 --> 00:14:50,410
x2, from there you are going to get an x2
and so on. You are going to generate the sequence
85
00:14:50,410 --> 00:14:59,629
x. The actual solution to this equation we
will represent by x so the solution that we
86
00:14:59,629 --> 00:15:09,949
want is x, is that fine, what do I mean by
that, that means that if x is the solution
87
00:15:09,949 --> 00:15:24,999
this implies x = Px + C fine.
88
00:15:24,999 --> 00:15:32,970
So from this equation if I subtract out the
equation with the solutions that satisfies
89
00:15:32,970 --> 00:15:42,139
the solution, from this if I subtract out
that I will get an error essentially what
90
00:15:42,139 --> 00:15:49,929
I am saying is if at any given time I have
a candidate solution xn right, I know my actual
91
00:15:49,929 --> 00:15:57,160
solution x the difference between them I will
define as the error en. This also happens
92
00:15:57,160 --> 00:16:02,669
to be a vector, is that okay, everyone, that
is fine.
93
00:16:02,669 --> 00:16:08,540
So if I subtract from this equation, I subtract
this equation, both of them are linear fortunately
94
00:16:08,540 --> 00:16:19,639
I am using that fact then I get the iteration
equation en+1 = P times en and by converting
95
00:16:19,639 --> 00:16:25,549
to en what I have achieved though what is
the difference? There is a difference, the
96
00:16:25,549 --> 00:16:32,100
C is gone. And now you can ask the question
do the sequence if en go to 0. I am generating
97
00:16:32,100 --> 00:16:33,170
a sequence.
98
00:16:33,170 --> 00:16:42,759
So my iterations are basically generating
e0, e1, e2, en and the question is does the
99
00:16:42,759 --> 00:16:49,740
sequence converge and you wanted to converge
to 0 in this case we know earlier it had to
100
00:16:49,740 --> 00:16:55,089
converge to a solution and we do not know
what the solution is okay in this case we
101
00:16:55,089 --> 00:17:04,770
know that this has to go to 0, fine. So in
order to do that if this were scalar equation
102
00:17:04,770 --> 00:17:15,790
you do a ratio test okay, so let us look at
how we go about analyzing this.
103
00:17:15,790 --> 00:17:23,540
So please bear this in mind, we are going
to come back to this equation now, I am not
104
00:17:23,540 --> 00:17:26,740
actually going to do fixed point theory, but
I am going to talk about something called
105
00:17:26,740 --> 00:17:37,081
a fixed point theory, we are not actually
going to do fixed point theory, right, but
106
00:17:37,081 --> 00:17:45,310
we are actually going to talk about fixed
points, so in general an equation of this
107
00:17:45,310 --> 00:17:50,470
form, okay, so what is the fixed point because
I suddenly introduced this idea of a fixed
108
00:17:50,470 --> 00:17:53,350
point.
109
00:17:53,350 --> 00:18:03,380
So x is the fixed point or e here is a fixed
point, if it turns out that we will actually
110
00:18:03,380 --> 00:18:11,540
get xi = P times xi, xi is a fixed point,
so if you substitute xi back into the equation
111
00:18:11,540 --> 00:18:21,950
on the right hand side you get back xi, so
when do we do this? In general, this equation
112
00:18:21,950 --> 00:18:32,640
in general, looks something of the form xn+1
= g of xn, g is some arbitrary function so
113
00:18:32,640 --> 00:18:34,160
most iterations will look like this.
114
00:18:34,160 --> 00:18:39,180
We will have some function, you give me an
xn, you give me a guess we perform some magic
115
00:18:39,180 --> 00:18:49,630
and you will get a new xn=1, so and this a
particular case of that, so the question is
116
00:18:49,630 --> 00:18:56,220
if you have something of this nature when
does it have a fixed point, that is when will
117
00:18:56,220 --> 00:19:04,220
have xi so that xi = g of xi, okay, I am not
going to talk about it in the general context,
118
00:19:04,220 --> 00:19:06,680
I will still talk about it only in this context,
but I want you to see that.
119
00:19:06,680 --> 00:19:09,700
But I want you to see that, so that is the
question that you can ask and what do g and
120
00:19:09,700 --> 00:19:24,760
P what do they do, given xi, what g and P
do is if
121
00:19:24,760 --> 00:19:32,980
you take xi in the domain of definition of
g you understand what I am saying, so those
122
00:19:32,980 --> 00:19:37,731
are the set of values for which g will give
you an meaningful answer, it is defined, g
123
00:19:37,731 --> 00:19:43,970
is defined on those set of values, will return
xi that you can plug back in that means g
124
00:19:43,970 --> 00:19:48,140
maps xi basically back into the domain.
125
00:19:48,140 --> 00:19:52,260
The domain in the range of the same it is
important, so this equation, the ways we have
126
00:19:52,260 --> 00:19:59,940
set it up for it to work g has to map any
argument of it is own back into the domain,
127
00:19:59,940 --> 00:20:16,320
am I making sense? right. So g or P for instance
if you say that I have some interval on which
128
00:20:16,320 --> 00:20:26,390
g is defined so what g has to basically do
is, let us take x constraint, if we constraint
129
00:20:26,390 --> 00:20:41,520
x to 0 to pi/2 and I am looking at x = sin
of x, xn +1 = sin of xn, am I making sense,
130
00:20:41,520 --> 00:20:43,020
okay.
131
00:20:43,020 --> 00:20:48,870
In fact instead of pi/2 I could even taken
1, 0 to 1 then it turns out that right if
132
00:20:48,870 --> 00:20:56,540
I had even taken x is in 0 to 1 then this
will constrain, okay, this will map back not
133
00:20:56,540 --> 00:21:03,780
constrain, sin x maps back into interval 01
right for this if I start off here and guaranteed
134
00:21:03,780 --> 00:21:08,410
that I am going to be in that interval, sin
x is not going to take me out of that interval
135
00:21:08,410 --> 00:21:11,450
does that make sense, okay.
136
00:21:11,450 --> 00:21:18,330
So first that it maps back into itself the
second question that we have is, is that enough
137
00:21:18,330 --> 00:21:25,480
for us to be able to guarantee that there
is xi which is g of xi and that we are going
138
00:21:25,480 --> 00:21:33,050
to get to it, okay, so the fixed point theory
basically tells you when you have a fixed
139
00:21:33,050 --> 00:21:39,690
point as I said I am not going to really sit
down and state and prove the theorem, but
140
00:21:39,690 --> 00:21:44,550
we will just look at the essentials of fixed
point theory that we require because it is
141
00:21:44,550 --> 00:21:45,790
pretty intuitive.
142
00:21:45,790 --> 00:21:51,280
Let us take an example similar to that but
let us take a scaler so I will remove the
143
00:21:51,280 --> 00:22:04,240
tilde, I have an x no tilde underneath, this
is a scalar, xn+1 = alpha xn these are just
144
00:22:04,240 --> 00:22:10,660
numbers, what will this generate for a given
alpha? What is the kind of series this will
145
00:22:10,660 --> 00:22:16,080
generate? What is the sequence it generate?
It will generate a geometric sequence, okay,
146
00:22:16,080 --> 00:22:20,840
so and when does that converge.
147
00:22:20,840 --> 00:22:27,010
So you want mod alpha < 1, so mod alpha less
than 1 will guarantee that this will converge
148
00:22:27,010 --> 00:22:32,860
to there is a fixed point, it will converge
to 0, okay, so there is another situation
149
00:22:32,860 --> 00:22:41,620
where there are fixed points, if alpha = 1
then every point is a fixed point, right,
150
00:22:41,620 --> 00:22:49,120
if alpha = 1 every point is a fixed point,
okay, so mod alpha < 1 and alpha = 1 right,
151
00:22:49,120 --> 00:22:53,260
both of them will work.
152
00:22:53,260 --> 00:22:57,700
We will see where this takes us so it is possible
that if mod alpha < 1 you will generate a
153
00:22:57,700 --> 00:23:03,560
sequence that converges and basically there
in the sense you did a ratio test, actually
154
00:23:03,560 --> 00:23:11,850
doing a ratio test, this is not the Cauchy’s
test, okay, what if I had a second sequence,
155
00:23:11,850 --> 00:23:26,110
yn+1 now I will make this alpha x alpha yn,
so you can ask me the question where are these
156
00:23:26,110 --> 00:23:29,890
sequences coming from, so these sequences
corresponds.
157
00:23:29,890 --> 00:23:35,110
I am not going to give you an actual problem
but let us in our mind imagine that you are
158
00:23:35,110 --> 00:23:41,950
solving a problem and because of knowledge
that I have, right, I pick a coordinate system
159
00:23:41,950 --> 00:23:49,900
and I pick a convenient coordinate system,
I look at my problem and I pick a coordinate
160
00:23:49,900 --> 00:23:57,300
system, I have some knowledge right in fluid
mechanics or whatever it is, I look at the
161
00:23:57,300 --> 00:24:02,560
problem and say this is a convenient coordinate
system and in this coordinate system I get
162
00:24:02,560 --> 00:24:03,560
these 2 equations.
163
00:24:03,560 --> 00:24:09,350
Okay, which if I iterate gives me some answer
to a fluid mechanics problem it does not matter
164
00:24:09,350 --> 00:24:14,640
what is the problem okay, what is important
is that I picked a convenient coordinate system
165
00:24:14,640 --> 00:24:18,360
and that I have deliberately set the convenient
coordinate system at an angle here obviously,
166
00:24:18,360 --> 00:24:23,010
right, coordinate system is not convenient
to the problem so I have picked the convenient
167
00:24:23,010 --> 00:24:24,490
coordinate system.
168
00:24:24,490 --> 00:24:30,591
I have these 2 equations that come out of
my problem just like we got a system of equation
169
00:24:30,591 --> 00:24:35,570
from Laplace equation, right, in a similar
fashion I do some magic in my fluid mechanics
170
00:24:35,570 --> 00:24:39,891
or whatever and I end up with these 2 equations
and if I solve these 2 equation I solved my
171
00:24:39,891 --> 00:24:44,370
problem that is all we need to know we do
not need to know what the problem is, so I
172
00:24:44,370 --> 00:24:49,280
can now generate iterates, right.
173
00:24:49,280 --> 00:25:15,390
So I will generate a sequence (x0, y0), (x1,
y1), (x2, y2)…(xn, yn)…and when do
174
00:25:15,390 --> 00:25:44,771
these converge? You want mod alpha x <1 and
you want mod alpha y < 1, is that fine, or
175
00:25:44,771 --> 00:25:52,690
in general I can write it in a different way
because I have (()) (25:48) max of mod alpha
176
00:25:52,690 --> 00:26:06,170
x, mod alpha y <1 max form of those 2 is < 1
then that x0 y0 that sequence will converge,
177
00:26:06,170 --> 00:26:12,180
fine, any questions.
178
00:26:12,180 --> 00:26:16,770
So if I have 3 equations instead of 2 equations
then it will be max of alpha x, alpha y and
179
00:26:16,770 --> 00:26:24,580
alpha z and so on, okay, the largest one,
the magnitude has been < 1 okay, but see in
180
00:26:24,580 --> 00:26:29,050
real life this does not always happen this
way, normally what happens is we have a problem
181
00:26:29,050 --> 00:26:36,981
we may not know of a convenient coordinate
system to start with okay, so this is basic
182
00:26:36,981 --> 00:26:42,120
this coordinate system here I have clearly
drawn it this way it is a setup, right.
183
00:26:42,120 --> 00:26:45,781
In reality what you would have done and what
you have seen we always do is I will draw
184
00:26:45,781 --> 00:26:52,850
a coordinate system this way. I will have
an x prime I would not call it something else,
185
00:26:52,850 --> 00:26:58,900
xi eta coordinate system this way, in real
life that is what would happen, you draw a
186
00:26:58,900 --> 00:27:02,780
coordinate system typically parallel to your
page because you have no other reason to pick
187
00:27:02,780 --> 00:27:03,920
a coordinate system right.
188
00:27:03,920 --> 00:27:09,200
If you had knowledge about the solution you
would pick a convenient coordinate system,
189
00:27:09,200 --> 00:27:12,900
but sometimes it does not happen, sometimes
we think deep, think of a coordinate system
190
00:27:12,900 --> 00:27:16,810
draw it and it turns out it is not really
the convenient coordinate system right, we
191
00:27:16,810 --> 00:27:22,860
try our best, so let us say you had picked
this coordinate system instead okay, but this
192
00:27:22,860 --> 00:27:25,810
is the underlying sequence that you are going
to generate.
193
00:27:25,810 --> 00:27:30,690
So how do I transform this into the new coordinate
system, I just have to rotate the coordinates,
194
00:27:30,690 --> 00:27:39,960
in order to rotate the coordinates I will
first write that xn+1 I will write those in
195
00:27:39,960 --> 00:27:53,020
a matrix form because I am going to do some
matrix manipulation here, right, is that okay.
196
00:27:53,020 --> 00:28:02,260
This is the same, same iteration matrix and
these converge these, that is if I call this
197
00:28:02,260 --> 00:28:18,360
xn+1 let me make it capital lambda, this is
this matrix, it contains alpha right, Xn,
198
00:28:18,360 --> 00:28:23,290
so the matrix form of this equation can be
written in this fashion and it looks suspiciously
199
00:28:23,290 --> 00:28:27,280
like what we are talking about earlier, this
looks, the reason why I am doing this it looks
200
00:28:27,280 --> 00:28:36,350
very much like en+1 is P times en that is
where we are going.
201
00:28:36,350 --> 00:28:50,770
And this sequence of x is x0, x1, x2, xn converges
if the maximum of alpha x and alpha y are
202
00:28:50,770 --> 00:28:56,590
<1 that is what we have. Now if we had picked
a different coordinate system which was at
203
00:28:56,590 --> 00:29:00,890
an angle theta with respect to the convenient
coordinate system xy if you had actually picked
204
00:29:00,890 --> 00:29:05,620
the different coordinate system then we can
go from one coordinate system to another coordinate
205
00:29:05,620 --> 00:29:10,460
system by performing a rotation okay.
206
00:29:10,460 --> 00:29:21,970
So the rotation matrix R
basically is cos theta sin theta these are
207
00:29:21,970 --> 00:29:37,210
entries in the unit vector, right –sin theta,
cos theta matrix so if I take this equation
208
00:29:37,210 --> 00:29:50,850
and pre-multiplied by R, so I pre-multiplied
by R, RXn+1 will give me xi, okay, the vector
209
00:29:50,850 --> 00:30:00,630
xi which consists of the entries so RXn+1,
let me see, I will write back here, so this
210
00:30:00,630 --> 00:30:14,860
equation turns out to be RXn+1 we need to
give it some nice symbol.
211
00:30:14,860 --> 00:30:20,330
The capital xi does not look that good so
I will use xi with tilde underneath okay just
212
00:30:20,330 --> 00:30:41,100
bear with the notation, right, so that if
I take this equation RXn+1 = xi n+1 = R lambda
213
00:30:41,100 --> 00:30:55,660
so I stick an R inverse R there xn. So this
tells me xi n+1 = if I call this matrix A,
214
00:30:55,660 --> 00:31:15,010
A times xi n, okay, these are the vectors
that we get in the second set of coordinates,
215
00:31:15,010 --> 00:31:22,679
right, so depending on your coordinate system
the equations that you get will change.
216
00:31:22,679 --> 00:31:27,330
The iteration goes on, but if you could rotate
from one coordinate system to another coordinate
217
00:31:27,330 --> 00:31:31,720
system you may actually find that there is
a convenient coordinate system in which the
218
00:31:31,720 --> 00:31:36,830
equations decouple, right, so all of you are,
you know where I am headed now, right, so
219
00:31:36,830 --> 00:31:45,870
this matrix, R matrix is often called the
model matrix. We will come back to this later,
220
00:31:45,870 --> 00:31:52,960
we will need this okay, and the alpha x and
alpha y what are these called?
221
00:31:52,960 --> 00:32:06,360
Alpha x and alpha y are Eigen values
and these of course will correspond to Eigen
222
00:32:06,360 --> 00:32:12,730
vectors, right, these are Eigen values so
if you have matrix A it has Eigen values which
223
00:32:12,730 --> 00:32:20,740
are alpha x and alpha y, so if you have to
do this iteration xi n+1 = A xi n, if you
224
00:32:20,740 --> 00:32:32,520
have to do this iteration, right or you have
to do the iteration en+1 is Pen, what we are
225
00:32:32,520 --> 00:32:41,280
going to say is if this sequence of xi is
that you get will converge if max of the Eigen
226
00:32:41,280 --> 00:32:42,440
value is less than 1.
227
00:32:42,440 --> 00:32:49,640
The modules of the Eigen value is <1. The
largest Eigen value is <1, is that fine everyone,
228
00:32:49,640 --> 00:32:56,540
okay, right, so en+1 = Pen this iteration
matrix generates a sequence and that sequence
229
00:32:56,540 --> 00:33:06,520
converges if the modules of the largest Eigen
value is <1 okay, so now we have reduced finding
230
00:33:06,520 --> 00:33:10,550
that fixed point to finding out what is the
largest Eigen value and if you know that the
231
00:33:10,550 --> 00:33:14,630
largest Eigen value is <1 you are set.
232
00:33:14,630 --> 00:33:19,550
In the sense that at least you know that you
are going to get to the fixed point. So how
233
00:33:19,550 --> 00:33:27,050
does this works, this by the way, this mapping,
I forgot to mention this earlier, this mapping
234
00:33:27,050 --> 00:33:41,790
or that xn+1 = g of xn so this maps into itself
but this mapping when mod alpha x is < 1,
235
00:33:41,790 --> 00:33:44,530
right basically what is happening is there
is a shrinking that is happening, it is called
236
00:33:44,530 --> 00:33:52,990
a contraction mapping, that is if you take
values in a certain interval.
237
00:33:52,990 --> 00:33:56,800
It will map into a smaller interval, it is
called contraction mapping and we just write
238
00:33:56,800 --> 00:34:03,630
that here, contraction mapping, so the mapping
is not only into itself it is a contraction
239
00:34:03,630 --> 00:34:09,669
mapping, the typical example that I would
give for this would be you can imagine a steel
240
00:34:09,669 --> 00:34:15,409
rod but it is easier to think of a piece of
sponge, right so you take a prismatic piece
241
00:34:15,409 --> 00:34:18,740
of foam or something of that sort that you
can squeeze with your hand easily.
242
00:34:18,740 --> 00:34:24,259
So you sit down and make markings on it at
equivalent rules so if I take that foam and
243
00:34:24,259 --> 00:34:30,009
the contraction mapping that I do is that
is easy, I squeeze, right so I hold the foam
244
00:34:30,009 --> 00:34:36,279
in my hand or I hold it in a wise something
of that sort and I squeeze, so when I squeeze
245
00:34:36,279 --> 00:34:42,339
the right extreme moves in, the left extreme
moves in all of the points move, there is
246
00:34:42,339 --> 00:34:46,489
one point that does not change, do you understand
what, there is a fixed point.
247
00:34:46,489 --> 00:34:50,139
Even in that example there is a fixed point,
so if I go through a contraction mapping there
248
00:34:50,139 --> 00:34:54,359
is still a fixed point. There is one point
that does not move, am I making sense, right,
249
00:34:54,359 --> 00:34:59,009
I mean I do not have the foam in my hand but
I think you can imagine it, right, okay, there
250
00:34:59,009 --> 00:35:04,489
is one point that does not change. So if you
have a contraction mapping right, well ya
251
00:35:04,489 --> 00:35:08,569
you could have a translation which is why
I got it off the C, okay.
252
00:35:08,569 --> 00:35:17,450
So you see that is the issue, so if I have
to translate if I did not push them together
253
00:35:17,450 --> 00:35:23,039
in the proper fashion it is possible that
I could have a translation now you will know
254
00:35:23,039 --> 00:35:29,980
why I move to the en+1 okay because I had
got rid of the C. I want something that is
255
00:35:29,980 --> 00:35:39,589
linear, I want something that is linear. Remember
this is a standard confusion, this is outside
256
00:35:39,589 --> 00:35:47,940
the normal discussion y = mx + c is not linear,
it is a straight line.
257
00:35:47,940 --> 00:35:52,700
Unfortunately linear also means line, right,
so curvilinear does not mean then you will
258
00:35:52,700 --> 00:35:58,470
get confused if you assume linear means straight
line, curvilinear does not make sense, curvilinear
259
00:35:58,470 --> 00:36:03,349
means a curved line, right okay, y = mx +
c is not linear in the sense of function is
260
00:36:03,349 --> 00:36:09,279
linear okay, is that fine, remember that.
So we got rid of that C by going switching
261
00:36:09,279 --> 00:36:10,540
to the error.
262
00:36:10,540 --> 00:36:15,509
It is a little game that we play. Now so if
you have, so the fixed point theorem basically
263
00:36:15,509 --> 00:36:20,030
says, right you have those map, I am not going
to go through all the detail but you have
264
00:36:20,030 --> 00:36:26,339
a map back into the domain and it is the contraction
mapping, right, then there is a fixed point
265
00:36:26,339 --> 00:36:30,140
and you can get to that fixed point in this
case because we are generating a sequence
266
00:36:30,140 --> 00:36:36,420
that will help us converge, so they are automate
on will actually converge because of the fact
267
00:36:36,420 --> 00:36:45,190
that we have a contraction mapping, is that
fine, are there any questions? okay, now that
268
00:36:45,190 --> 00:36:47,079
is fine.
269
00:36:47,079 --> 00:37:01,849
So now the thing is how do we deal with this,
we have reduced ourselves going from en+1
270
00:37:01,849 --> 00:37:10,500
= P times en how do we find out what are the
largest Eigen values and Eigen vectors instead
271
00:37:10,500 --> 00:37:16,630
of dealing with this directly I will deal
with Laplace equation itself directly so in
272
00:37:16,630 --> 00:37:25,460
Laplace equation if phi is the solution and
phi tilde or capital phi is the candidate
273
00:37:25,460 --> 00:37:39,130
right and this of course will give us a corresponding
e, it will give us an e, okay.
274
00:37:39,130 --> 00:37:43,099
And we have talked about uniqueness, what
are the boundary conditions that e satisfies,
275
00:37:43,099 --> 00:37:52,519
well let us call it en, what is the boundary
condition that en satisfies? It will be 0
276
00:37:52,519 --> 00:37:55,579
right, the boundary condition will be 0 because
we have subtracted from the original which
277
00:37:55,579 --> 00:37:59,890
satisfies the boundary condition. See the
candidate has to satisfy the boundary condition
278
00:37:59,890 --> 00:38:00,990
exactly, you cannot violate.
279
00:38:00,990 --> 00:38:04,170
The boundary conditions are inviolate, you
cannot violate the boundary condition, to
280
00:38:04,170 --> 00:38:08,800
do whatever you want on the interior, you
cannot violate the boundary conditions, okay,
281
00:38:08,800 --> 00:38:14,490
so the candidate solution also satisfy the
boundary condition therefore this is 0, this
282
00:38:14,490 --> 00:38:17,579
has homogenous boundary conditions, it is
0 on the boundaries, okay.
283
00:38:17,579 --> 00:38:24,740
So how are we going to go about solving this,
I cook up, I do use my Fourier series, I will
284
00:38:24,740 --> 00:38:30,630
write Fourier series in 2 dimensions if you
have not seen this we will see how this works.
285
00:38:30,630 --> 00:38:46,670
So I look at this function e (x, y) = alm
you know that these are Fourier coefficients
286
00:38:46,670 --> 00:38:49,730
are not the entries of the matrix aij, you
understand what I am saying, do not confuse
287
00:38:49,730 --> 00:39:01,499
them with the entries with the matrix say
alm exponent i pi lx/L.
288
00:39:01,499 --> 00:39:26,779
L is the length of the domain in our case
it is 1, but I will just leave it as L exponent
289
00:39:26,779 --> 00:39:41,299
i pi my/L right so instead of 1/1 unit square
I have an L/L this is summed over m, summed
290
00:39:41,299 --> 00:39:51,890
over l. I know I am going to use a grid of
a certain size, right if I have n intervals,
291
00:39:51,890 --> 00:40:01,450
then what is the highest frequency that I
can represent, so here I do not have a 2 pi,
292
00:40:01,450 --> 00:40:05,310
it should have been 2 pi right, it is only
pi.
293
00:40:05,310 --> 00:40:14,099
So this goes from m = 1 through n–1, l = 1
through n-1, I have dropped the m=0 and l=0
294
00:40:14,099 --> 00:40:19,259
because my boundary conditions are 0 right
my boundary conditions are 0 Laplace equation
295
00:40:19,259 --> 00:40:27,089
maximum minimum occurs in the boundary, okay
fine, we know that it is going to go to 0
296
00:40:27,089 --> 00:40:35,660
anyway so I dropped the dc component m = 0,
so I have m = 1, so what is the relationship
297
00:40:35,660 --> 00:40:39,859
between exy and Laplace equation?
298
00:40:39,859 --> 00:40:46,349
If I substitute this into Laplace equation
what will happen, if I substitute this in
299
00:40:46,349 --> 00:41:01,210
the Laplace equation what will happen, lambda
square. What is lambda squared of exy = -pi
300
00:41:01,210 --> 00:41:22,319
squared l squared/L squared – pi squared
m squared/L squared, is
301
00:41:22,319 --> 00:41:31,390
that right, you can just check to make sure
that I have not, so if I take any one of these
302
00:41:31,390 --> 00:41:36,079
for m = 1 or 2 or 3 or what if I take any
one of these and this is what I am going to
303
00:41:36,079 --> 00:41:44,960
get, is that fine, just substitute it and
try it.
304
00:41:44,960 --> 00:41:49,099
So these are basically, now look at what we
have just done these are basically Eigen function,
305
00:41:49,099 --> 00:42:01,420
these are Eigen values and these are Eigen
vectors or Eigen functions, okay, fine so
306
00:42:01,420 --> 00:42:09,450
these are Eigen functions or Eigen vectors,
why am I doing this, why is it important that
307
00:42:09,450 --> 00:42:13,809
they are Eigen vectors or Eigen functions
because I know that I want to get my Eigen
308
00:42:13,809 --> 00:42:17,609
values, the largest Eigen value, am I making
sense.
309
00:42:17,609 --> 00:42:21,210
I know from my iteration matrix somewhere
along the line I want to do the ratio test,
310
00:42:21,210 --> 00:42:24,430
let me not just say that I want to get the
largest Eigen value, the largest Eigen value
311
00:42:24,430 --> 00:42:28,319
apparently comes from the ratio test so I
do the ratio test in some fashion then ask
312
00:42:28,319 --> 00:42:35,529
the question for what value will the ratio
test, right, give me the smallest change,
313
00:42:35,529 --> 00:42:46,140
the smallest ratio or I should say the least
change, right okay.
314
00:42:46,140 --> 00:42:58,000
So it turns out that anyone of these right,
which we call elm or whatever or anyone of
315
00:42:58,000 --> 00:43:05,229
these can be now substituted into our differential
equation, our finite difference scheme and
316
00:43:05,229 --> 00:43:13,720
we will see what it is that we get, okay,
so what do we have, so we have let us pick
317
00:43:13,720 --> 00:43:33,859
Jacobi, we will do Jacobi iteration, so I
will write this n+1, we have done this so
318
00:43:33,859 --> 00:44:01,470
many times okay, these i i+1 are spacial coordinates.
319
00:44:01,470 --> 00:44:11,519
So we can actually substitute, we can sample
the function exy right and substitute in here,
320
00:44:11,519 --> 00:44:20,599
am I making sense. In a similar fashion I
guess I should not have written it this way
321
00:44:20,599 --> 00:44:27,900
because this will cause you to think that
there is a V also maybe I should not have
322
00:44:27,900 --> 00:44:34,190
written it in terms of phi, I should have
written it in terms of after all en also satisfies,
323
00:44:34,190 --> 00:44:58,819
e also satisfies del squared e, does it satisfies
Laplace equation? is del squared e = 0? So
324
00:44:58,819 --> 00:45:07,779
we want this will be for any n okay.
325
00:45:07,779 --> 00:45:19,200
Del squared e = 0 what is this going to give
us. Let me see if we go through with this
326
00:45:19,200 --> 00:45:32,420
en +1 = I am going to substitute now, the
function phi I am going to represent in terms
327
00:45:32,420 --> 00:45:38,359
of, the function e I am going to represent
in terms of these exponentials so what do
328
00:45:38,359 --> 00:46:07,420
I have en+1 at ij is 0.25 times en at i+1j
+ en at i-1j + en at ij+1 + en at ij-1 they
329
00:46:07,420 --> 00:46:14,180
are all equivalent rules so what does this
going to give me i+1j i-1j.
330
00:46:14,180 --> 00:46:29,270
So what is the relationship between ey+1j
at n and eij is there a relationship between
331
00:46:29,270 --> 00:47:06,089
these 2? One will be exponent sum constant
times i+1h, xi = i times h because we are
332
00:47:06,089 --> 00:47:16,569
taking equivalent rules, I am slowly getting
ahead of myself here and yj = j times h we
333
00:47:16,569 --> 00:47:24,059
are taking equivalent rules, okay, so the
relationship and eij would be of the form
334
00:47:24,059 --> 00:47:30,430
exponent everything else is the same ih okay.
335
00:47:30,430 --> 00:47:39,359
So the relationship between ei+1j and eij
would be just one exponent of all of this
336
00:47:39,359 --> 00:47:52,910
coefficient times h. Oh I have made a mistake
here you guys have not corrected me, okay,
337
00:47:52,910 --> 00:48:00,069
what is the mistake that I have made? I am
using i to be square root of -1, I am also
338
00:48:00,069 --> 00:48:10,589
using i as the subscript, I should not do
that, you have to be very careful, so henceforth
339
00:48:10,589 --> 00:48:16,390
I will switch to the notation pq, p+1q, p-1q,
pq+1, pq-1.
340
00:48:16,390 --> 00:48:40,349
You have to be very careful right, p+1q, pq,
p+1q, pq, is that fine okay, because right
341
00:48:40,349 --> 00:48:44,859
now all of the sudden when I introduced Fourier
series I have decided that i = square root
342
00:48:44,859 --> 00:48:49,490
of -1 when I could use a different i but I
am likely to forget so we will just switch
343
00:48:49,490 --> 00:48:56,170
the notation fine and when your electrical
sciences you may have used j instead of an
344
00:48:56,170 --> 00:49:01,609
i but it does not matter, we will stick to
i = square root of -1
345
00:49:01,609 --> 00:49:21,820
So this equation using this information then
becomes epq at n+1 = 0.25 times exponent of
346
00:49:21,820 --> 00:49:48,989
i pi l/L + exponent of –i pi l/L + exponent
of i pi m/L + exponent of –i pi m/L the
347
00:49:48,989 --> 00:50:15,910
whole into epq at n, is that fine, did I make
a mistake, i pi l * h, h is very important
348
00:50:15,910 --> 00:50:26,569
here i pi l * h, h is very critical for me.
Okay, so what we will do is in the next class
349
00:50:26,569 --> 00:50:29,650
we will see where we can take this, right.
350
00:50:29,650 --> 00:50:35,099
So in the next class what we are going to
do is we will take the ratio of the 2 and
351
00:50:35,099 --> 00:50:42,069
find out what is the rate at which what is
the growth, the geometric growth that we are
352
00:50:42,069 --> 00:50:49,150
getting or the (()) (50:44), what does Gauss-Seidel,
what does Gauss-Jordan do we will see if we
353
00:50:49,150 --> 00:50:54,029
can do something similar to similar by way
of convergence to Gauss-Seidel and so on,
354
00:50:54,029 --> 00:50:59,180
is that fine, okay, thank you.