1
00:00:14,790 --> 00:00:26,720
Hello. So, we talk about Runge Kutta methods
for initial value problems. So, in the last
2
00:00:26,720 --> 00:00:34,830
lectures we have talked about Euler method,
then modified Euler method. So, we
3
00:00:34,830 --> 00:00:41,950
introduced the concept of slow power aging.
So, the generalization is if you take an
4
00:00:41,950 --> 00:00:48,540
interval, you try to take some intermit points
and then take the weighted average of the
5
00:00:48,540 --> 00:00:55,820
slopes. This is the more generalization which
leads to Runge Kutta method. So, let us
6
00:00:55,820 --> 00:01:01,620
talk about the derivation is little lengthy,
because its more technical based on the formula
7
00:01:01,620 --> 00:01:07,360
you have to compare with the with the Telesis
expansion, and then try to determine the
8
00:01:07,360 --> 00:01:13,140
coefficients and weights and all that, so
we have to be little patient while understanding
9
00:01:13,140 --> 00:01:14,189
the derivation.
.
10
00:01:14,189 --> 00:01:32,700
So, let us talk about this. So, as I mentioned
the concept is within an interval, when you
11
00:01:32,700 --> 00:01:40,810
step from 1 x n you know the data and we try
to compute the data at x n plus 1. So, that
12
00:01:40,810 --> 00:01:45,140
is what because this is single step method.
So, we have been doing that now what is the
13
00:01:45,140 --> 00:01:56,350
idea use several intermediate points a 3 h.
So, on and then take the slopes at each point.
14
00:01:56,350 --> 00:02:07,170
.So, that is weighted average that is what
I said. So, your approximate solution is y
15
00:02:07,170 --> 00:02:22,459
n plus
h i 1 to l, the weights and slope at these
16
00:02:22,459 --> 00:02:30,129
intermediated points.
So, as I mentioned we are taking weights such
17
00:02:30,129 --> 00:02:48,430
that and l points, l intermediate points
this l denotes l slopes, and moreover I started
18
00:02:48,430 --> 00:02:57,430
with a 2. So, in x n plus a 1 h equals to
x n.
19
00:02:57,430 --> 00:03:02,121
So, that I have taken a 1 equals 0. This is
just for convenience. So, that there is a
20
00:03:02,121 --> 00:03:07,859
symmetry in that derivation that is all nothing
serious about it you can take even this a
21
00:03:07,859 --> 00:03:12,909
1
a 2. There is no harm now when you talk about
22
00:03:12,909 --> 00:03:18,129
star. So, what is the first 1 i starts from
1
23
00:03:18,129 --> 00:03:31,459
therefore, x n is. So, the first entry is
y n of x n plus a 1 h. So, this is x n this
24
00:03:31,459 --> 00:03:52,730
is, call this k
1. So, the next entry x n plus a 2 this is
25
00:03:52,730 --> 00:04:06,979
f of x n plus a 2 h y n of x n plus a 2 h.
We use
26
00:04:06,979 --> 00:04:26,790
Euler so this is y n plus a 2 h y dash of
x n. So, that means in Taylor series, we have
27
00:04:26,790 --> 00:04:32,130
neglected the second rod onwards that is what
we have.
28
00:04:32,130 --> 00:04:57,840
So, this is y n plus, this y dash f x n is
f right. So, this is a 2 h, further this can
29
00:04:57,840 --> 00:05:03,210
be
generalized in the sense this is equals to
30
00:05:03,210 --> 00:05:13,320
f of a 2 h this is k 1 right. So, I introduce
k 1
31
00:05:13,320 --> 00:05:26,380
there. So, this let us call k 2, see this
for try to follow we started here and f of
32
00:05:26,380 --> 00:05:35,970
x n plus a 2
h is this. So, then we used Euler for this
33
00:05:35,970 --> 00:05:41,900
is just Euler then this is nothing but k 1
as
34
00:05:41,900 --> 00:05:47,750
defined. Now, we have defined something called
k 2. So, that means each slope at each
35
00:05:47,750 --> 00:05:58,550
point were computing were giving a notation
right now we move to the next right. So,
36
00:05:58,550 --> 00:06:00,080
what is the next point.
.
37
00:06:00,080 --> 00:06:29,120
.The next point is y n prime a 3, so this
is f of. So, still we have not used the concept
38
00:06:29,120 --> 00:06:32,690
of
averaging, now the first time we are trying
39
00:06:32,690 --> 00:06:39,580
to introduce here because where are we
computing, we are computing y dashed at x
40
00:06:39,580 --> 00:06:43,150
n plus a 3 h. So, there is already x n 2 x
n
41
00:06:43,150 --> 00:06:49,440
plus a 2 h and from here to here. So, there
already 2 slopes involved prior to that right.
42
00:06:49,440 --> 00:07:08,150
Now, we try to use a averaging concept. So,
that is this we have to, this is y n plus
43
00:07:08,150 --> 00:07:14,620
the
increment is a 3 h, then we have y dash of
44
00:07:14,620 --> 00:07:20,570
x n right. So, this we tried to get it in
weighted
45
00:07:20,570 --> 00:07:29,980
average sense.
So, we introduce some notation b 3 1 y dash
46
00:07:29,980 --> 00:07:46,110
of x n plus, b 3 2 widest of x n plus, a 2
h.
47
00:07:46,110 --> 00:08:02,950
See this is a 3 h therefore, we have used
passed 2 slopes x n x n plus a 2 h . So, this
48
00:08:02,950 --> 00:08:09,919
is
weighted average. So, this can be simplified
49
00:08:09,919 --> 00:08:16,830
this more generalization. So, we are not so
much worried about particular constant because
50
00:08:16,830 --> 00:08:23,870
ultimately we end up with a
generalization in terms of specified constants.
51
00:08:23,870 --> 00:08:45,050
So, this is plus, now I take h common here
this h look at these constants orbited constants.
52
00:08:45,050 --> 00:08:58,130
So, this a 3 multiplied by b 3 1 divide by
this. So, this we can call some new constant.
53
00:08:58,130 --> 00:09:09,570
And y dash of x n is just k 1 plus again a
3 multiplied by b 3 2 divide by this, this
54
00:09:09,570 --> 00:09:14,569
I call
another constant and y dashed of x n plus
55
00:09:14,569 --> 00:09:23,420
a 2 h is k 2. So, it is more of technical
you
56
00:09:23,420 --> 00:09:38,949
should try to follow. First one this is at
x n second slope is at x n plus a 2 h. So,
57
00:09:38,949 --> 00:09:48,420
that is k
2, then third slope is at x n plus a 3 h.
58
00:09:48,420 --> 00:10:21,920
So, this k 3, let me define k 1 is this k
2 is, k 1 is
59
00:10:21,920 --> 00:10:57,300
involved k 3 both k 1 and k 2.
So, one can proceed further and try to get,
60
00:10:57,300 --> 00:11:03,490
but we do not want to do that because we fix
finite number of intermediate points and take
61
00:11:03,490 --> 00:11:11,939
the slopes and try to do it. Now, an
immediate concern is anybody would ask and
62
00:11:11,939 --> 00:11:17,899
who will decide this intermediate points
and who will decide this weights and who will
63
00:11:17,899 --> 00:11:22,199
tell me how many points to be considered
and all the stuff right.
64
00:11:22,199 --> 00:11:32,100
So, we have to really consider this and since
already I mentioned this is a bit laborious,
65
00:11:32,100 --> 00:11:38,550
may be somebody would start with less number
of intermediate points. So, that your
66
00:11:38,550 --> 00:11:43,500
weighted average is done with less number
of slopes, then you expect a little simpler
67
00:11:43,500 --> 00:11:49,800
method first and then straightly complicated.
So, let us try to fix the number of
68
00:11:49,800 --> 00:12:08,980
intermediate points.
So, if one uses l slopes, we generate k i
69
00:12:08,980 --> 00:12:34,689
of the form x n plus a h y n plus h. We have
taken common then
70
00:12:34,689 --> 00:12:48,589
we get this kind of pattern where i is. So,
it is one can identify easily,
71
00:12:48,589 --> 00:13:01,929
.see this k 2 is x n plus a 2 h, h is common
so a 2 k 1 k 3 is xn plus a 3 h, then h comes
72
00:13:01,929 --> 00:13:13,279
out then a 3 1 k 1 plus a 3 2 plus k 2. So,
the generalization is a 4 1 k 1, a 4 2 k 2,
73
00:13:13,279 --> 00:13:19,459
a 4 3 k
3, like that for k 4 so this is the generalization
74
00:13:19,459 --> 00:13:32,889
right. So, this gets reduced to simpler
forms depending on the number of slopes.
75
00:13:32,889 --> 00:13:47,499
So, as I mentioned let us start with
just 2 slopes. So, if u consider 2 slopes
76
00:13:47,499 --> 00:13:57,949
right, then step
one you define the method. So, we are defining
77
00:13:57,949 --> 00:14:14,069
the method, y n plus 1 is y n plus just 2
slopes. So, what will we get, h w 1 k 1 plus
78
00:14:14,069 --> 00:14:21,860
w 2 k 2 i mean instead of the arbitrary
constants, earlier notation we can just generalize
79
00:14:21,860 --> 00:14:29,089
it. So, this is these are the weights
standard I have used. Now, k 1 k 2 contain
80
00:14:29,089 --> 00:14:30,089
arbitrary coefficient.
.
81
00:14:30,089 --> 00:14:57,779
So, what are they k 1 is f of and k 2 is f
of x n plus a 2 h y n plus h a 2 1 k 1. Now,
82
00:14:57,779 --> 00:15:04,480
at this
stage what is left, yes we have to determine
83
00:15:04,480 --> 00:15:10,069
the arbitrary coefficient and the weights.
So,
84
00:15:10,069 --> 00:15:16,899
to do that I would like to switch to some
other notation, just for a convenience because
85
00:15:16,899 --> 00:15:28,550
using such indices will be little nasty in
the derivation, x n plus say alpha h y n plus
86
00:15:28,550 --> 00:15:38,870
beta
h k 1. So, I hope you follow right.
87
00:15:38,870 --> 00:15:48,779
So, I am not going with these notations just
for convenience head 1 is replaced by beta.
88
00:15:48,779 --> 00:15:59,860
Now, what is a next task. So, step 1 we have
defined this that means this is going to be
89
00:15:59,860 --> 00:16:06,730
our method, k method with 2 slopes provided
one determines what are the arbitrary
90
00:16:06,730 --> 00:16:21,649
coefficient left, the arbiter coefficient
are w 1 w 2 alpha beta. So, these are the
91
00:16:21,649 --> 00:16:34,290
orb try
coefficient. Now, one has to determine right.
92
00:16:34,290 --> 00:16:42,769
So, what is step 2?
93
00:16:42,769 --> 00:16:43,769
..
94
00:16:43,769 --> 00:17:11,920
Step 2 is in order to determine
the arbiter constants of coefficient w 1,
95
00:17:11,920 --> 00:17:21,730
w 2, alpha, beta
what we do. Already I mentioned see what is
96
00:17:21,730 --> 00:17:30,420
this is an approximate solution for the
given initial problem. Now, approximating
97
00:17:30,420 --> 00:17:37,620
what approximating the true solution
therefore, who is fellow with whom we have
98
00:17:37,620 --> 00:17:43,860
to compare, we have to compare this fellow
with the exact solution, but then exact solution
99
00:17:43,860 --> 00:17:52,980
is not known to us. So, what we do is
your exact solution is if it exist I mean
100
00:17:52,980 --> 00:17:56,211
under the sums of existence and uniqueness.
Your
101
00:17:56,211 --> 00:18:05,340
exact solution will be expanded in terms of
l series.
102
00:18:05,340 --> 00:18:15,610
Now once you expand your Taylor Series, compare
your Taylor Series with your
103
00:18:15,610 --> 00:18:24,590
approximation here. So, let us do that, in
order to determine the arbiter constants w
104
00:18:24,590 --> 00:18:34,390
1, w
2, alpha, beta, expand y n plus 1 that is
105
00:18:34,390 --> 00:18:51,370
the approximation in powers of h, such that
it
106
00:18:51,370 --> 00:19:15,770
agrees with Taylor series expansion of true.
That is this and how do you compare how
107
00:19:15,770 --> 00:19:37,560
long to a specified number of terms.
Now, when you say specified number of terms,
108
00:19:37,560 --> 00:20:02,640
may be this is specified number of terms.
This may define may
109
00:20:02,640 --> 00:20:11,321
define order of the method. So, comparing
up to this order that
110
00:20:11,321 --> 00:20:18,790
means that will dictate the order of the method.
So, let us do that as I mentioned it is
111
00:20:18,790 --> 00:20:26,260
going to be very, very technical so we have
to follow the steps. So, let us expand Taylor
112
00:20:26,260 --> 00:20:32,631
series first.
So, I am writing the t s that is Taylor series
113
00:20:32,631 --> 00:20:43,780
expansion first, y of x n plus 1 is y of x
n
114
00:20:43,780 --> 00:21:00,540
plus
115
00:21:00,540 --> 00:21:22,000
so on. We have this terms, y dashed is f of
x n y n, y double is dou f dou x plus f x
116
00:21:22,000 --> 00:21:23,000
y
117
00:21:23,000 --> 00:21:38,750
.dou f dou y evaluated x n y n, I mean it
is better to compute the next time as well
118
00:21:38,750 --> 00:21:44,210
before
we proceed with comparison. So, let us it
119
00:21:44,210 --> 00:21:47,790
is straightly complicated, but then we need
this
120
00:21:47,790 --> 00:21:51,800
term y 3.
.
121
00:21:51,800 --> 00:22:32,520
So, y 3 one can do it 2 f of course, all this
validated at. So, this as I mentioned this
122
00:22:32,520 --> 00:22:42,210
is
lightly complicated. So, we have t s, this
123
00:22:42,210 --> 00:22:52,910
is supposed to be the exact. Now, we have
the
124
00:22:52,910 --> 00:23:04,070
approximation this is approximation. So, what
is our aim, our aim is to expand this in
125
00:23:04,070 --> 00:23:16,530
powers of h so that we compare with this.
So, its slightly complicated, let us try to
126
00:23:16,530 --> 00:23:20,480
do
that. Now, our immediate concern is to expand
127
00:23:20,480 --> 00:23:24,770
this in powers of h that means see for
example, k 1 there is nothing to expand, but
128
00:23:24,770 --> 00:23:32,260
when you take k 2, there is you have to
expand this right. So, let us do that, y 3
129
00:23:32,260 --> 00:23:43,020
is done. Now, we proceed to
expansion of y n
130
00:23:43,020 --> 00:24:08,370
plus 1. So, this I call h exp.
So, k 1 there is nothing, k 2 it is better
131
00:24:08,370 --> 00:24:22,200
to write the form of k 2, f of x n plus alpha
x alpha
132
00:24:22,200 --> 00:24:43,720
h y n plus beta h k1. So, this is f of x n
y n so it is a 2 variable expansion Taylor
133
00:24:43,720 --> 00:24:52,991
series.
So, we have to expand this plus alpha h with
134
00:24:52,991 --> 00:25:01,520
respect to this variable. So, I am not writing
the evaluation point. So, it is understood
135
00:25:01,520 --> 00:25:06,810
at each step I have to write, but one can
use
136
00:25:06,810 --> 00:25:15,030
generalized notation just plus first order
terms I am writing first f expanded with respect
137
00:25:15,030 --> 00:25:19,840
to this, then the first order term.
Now I will expand with respect to the first
138
00:25:19,840 --> 00:25:25,140
order term with respect to this. So, that
will be
139
00:25:25,140 --> 00:25:34,400
beta h k 1 dou f by dou y because with respect
to this variable. So, this the first order
140
00:25:34,400 --> 00:25:50,080
.terms, plus second order terms, this is the
increment. So, alpha square h square, second
141
00:25:50,080 --> 00:25:59,350
order derivative plus the mix term 2 alpha
h beta h.
142
00:25:59,350 --> 00:26:17,870
So, that will be 2 alpha beta h square k 1
this is the mix term plus second order term
143
00:26:17,870 --> 00:26:27,010
of
with respect to y beta square h square k 1
144
00:26:27,010 --> 00:26:40,111
square
plus well look at this. So, we have to
145
00:26:40,111 --> 00:26:50,260
expand with respect x and y. So, this function
about the point x n y n, then first order
146
00:26:50,260 --> 00:26:56,410
terms alpha x so f by so x plus this is increment
for y therefore, the increment times dou f
147
00:26:56,410 --> 00:27:03,800
by dou y. Now, the second order terms, 1 naught
2 factorial. So, this is second order term
148
00:27:03,800 --> 00:27:12,520
of this, this is second order term of this
and this is the next term. Now, this can be
149
00:27:12,520 --> 00:27:16,030
simplified as follows.
.
150
00:27:16,030 --> 00:27:45,660
So, k 2 is given by
plus h so beta, we have k 1 there. So, that
151
00:27:45,660 --> 00:27:55,970
k 1 is nothing but f so that
becomes an f there
152
00:27:55,970 --> 00:28:03,090
plus because what is our aim, our aim is to
compare with the Taylor
153
00:28:03,090 --> 00:28:10,000
series expansion. So, our Taylor series expansion
has exactly this kind of form h h square
154
00:28:10,000 --> 00:28:43,970
by 2 factorial. So, we are trying to put it
in that form . So, this is k 2, what did we
155
00:28:43,970 --> 00:28:48,790
do, we
are trying to get the h expansion of that
156
00:28:48,790 --> 00:28:54,800
approximation.
So, k 1 is this k 2 we have expanded, now
157
00:28:54,800 --> 00:29:00,180
what we have to do, we have to substitute
the
158
00:29:00,180 --> 00:29:21,830
expansions in y n plus 1. So, let us try to
do that therefore, your y n plus 1 is y n
159
00:29:21,830 --> 00:29:33,740
plus h w
1 k 1 plus h, this is our approximation. So,
160
00:29:33,740 --> 00:29:41,500
this is given by y n plus h w 1 k 1 is just
f
161
00:29:41,500 --> 00:30:07,900
plus h w 2 k 2, this entire expression we
have to write down f plus h. This is first
162
00:30:07,900 --> 00:30:33,040
term
then let me put it here.
163
00:30:33,040 --> 00:30:34,040
..
164
00:30:34,040 --> 00:31:03,550
So, this can be further simplified as follows,
y n plus h. Let me explain the we get this
165
00:31:03,550 --> 00:31:08,340
look our aim is to put it in a Taylor series
form, so coefficient of h coefficient of h
166
00:31:08,340 --> 00:31:19,970
square. So, look at this you have one term
here and with h w 2 f. So, if you take common
167
00:31:19,970 --> 00:31:43,030
we get exactly this term. So, similarly, we
get
168
00:31:43,030 --> 00:31:54,610
this is the next term. So, h square, how do
we get it, look h square w 2 times this now
169
00:31:54,610 --> 00:32:16,720
h cube from this term. So, plus 2 alpha beta
is
170
00:32:16,720 --> 00:32:38,140
a mix term.
So, this is our h expansion and what was our
171
00:32:38,140 --> 00:32:49,000
t expansion. So, this is Taylor series
expansion this is our Taylor series with these
172
00:32:49,000 --> 00:33:12,190
2 terms. So, may be its better to write down
y of is y of x n plus h f plus h square by
173
00:33:12,190 --> 00:33:32,870
2 dou f by dou x plus f dou f by dou y
plus h
174
00:33:32,870 --> 00:34:19,869
cube by 6 h cube by 6. So, this our Taylor
series expansion. Now, what is our aim, aim
175
00:34:19,869 --> 00:34:26,879
is
to compare as I mentioned the next task is,
176
00:34:26,879 --> 00:34:35,530
to compare the Taylor series expansion and
the h expansion up to desired terms.
177
00:34:35,530 --> 00:34:41,929
So, that means you have coefficient of h coefficient
of h square so we compare. So, that
178
00:34:41,929 --> 00:34:48,810
we get some we except a system of equations
let us see. So, again I would like to this
179
00:34:48,810 --> 00:34:52,300
is
an approximation which were x expand in powers
180
00:34:52,300 --> 00:35:00,350
of h and this is our Taylor series
expansion, now we try to compare. So, what
181
00:35:00,350 --> 00:35:28,170
we do is compare h expansion and t
expansion to match the coefficient of equal
182
00:35:28,170 --> 00:35:41,520
powers of h. So, let us look at it y n must
be
183
00:35:41,520 --> 00:35:57,060
approximating y of x and then look you have
h f. So, h f, w and plus w 2 must be 1.
184
00:35:57,060 --> 00:36:17,530
.So, this is approximating this, then this
you have h f in this term. So, if you try
185
00:36:17,530 --> 00:36:21,510
to
compare this two, what happen w 1 plus w 2
186
00:36:21,510 --> 00:36:32,580
must be 1 right. So, let us try to do that.
So,
187
00:36:32,580 --> 00:36:51,100
if we do that we get from first case, then
so let me use again red. So, this is red these
188
00:36:51,100 --> 00:37:00,610
2
then the green, now h square upper I am using.
189
00:37:00,610 --> 00:37:09,600
So, you have h square h square by 2. So,
there is a half a team for dou f by dou x,
190
00:37:09,600 --> 00:37:11,990
if you remove h square there is just a factor
of
191
00:37:11,990 --> 00:37:18,960
half a team for dou f by dou x whereas, her
you have alpha w 2 sitting. Therefore, alpha
192
00:37:18,960 --> 00:37:26,580
w 2 must be half there and here beta w 2 is
sitting for f dou f by dou y and there is
193
00:37:26,580 --> 00:37:35,930
another half sitting for f dou f by dou y
therefore, beta w 2 must be half there.
194
00:37:35,930 --> 00:37:36,930
.
195
00:37:36,930 --> 00:37:53,090
We get this is one equation, then alpha w
2 is half, beta w 2 is half. So, this I have
196
00:37:53,090 --> 00:38:01,450
done it
only up to how many terms up to order of h
197
00:38:01,450 --> 00:38:07,481
square. Now, compared so y n is
approximate of y f x n and by comparing by
198
00:38:07,481 --> 00:38:15,880
this we get, w 1 plus w 2 is 1 and comparing
this h square terms we get alpha w 2 is half
199
00:38:15,880 --> 00:38:24,800
beta w 2 is half. So, I am not comparing
these three terms. So, that means I have compared
200
00:38:24,800 --> 00:38:36,290
up to terms up to h square right now
from this system. If you stop then we should
201
00:38:36,290 --> 00:38:42,610
be able to determine the coefficient, but
suppose let us stop at this stage. That means
202
00:38:42,610 --> 00:38:48,960
you have compared up to h square.
You should be able to solve, but how many
203
00:38:48,960 --> 00:38:54,580
unknowns you have, w 1, w 2, alpha and
beta and you have only three unknowns right.
204
00:38:54,580 --> 00:39:02,770
So, that means you have to choose one of
them arbitrary right. Let us say choosing
205
00:39:02,770 --> 00:39:16,430
alpha non zero, we get beta equals to alpha
w 2
206
00:39:16,430 --> 00:39:29,540
is 1 over 2 alpha w 1 is 1 minus 1 over 2
alpha. So, with this our approximation becomes
207
00:39:29,540 --> 00:39:41,180
.y n plus h, what was our approximation, these
are our approximation h into w 1 k 1 plus
208
00:39:41,180 --> 00:39:59,000
w 2 k 2. So, we have w 1, h into our w 1 is
1 minus 1 over 2 alpha, k 1 plus w 2 1 over
209
00:39:59,000 --> 00:40:00,650
2
alpha.
210
00:40:00,650 --> 00:40:19,130
So, this is our approximation where k 1 is
given by f of x n plus alpha h y n plus alpha
211
00:40:19,130 --> 00:40:34,560
h
k 1. So, this is our R K method, still alpha
212
00:40:34,560 --> 00:40:50,260
is arbitrary. Now, you can talk about specific
values, so let me write this as R K 2 because
213
00:40:50,260 --> 00:40:57,490
I have compared only up to h square
therefore, maybe we are optimistic just by
214
00:40:57,490 --> 00:41:03,980
comparing up to h square. We can call this
method second order probably right, any way
215
00:41:03,980 --> 00:41:12,840
we can discuss that. Now, since alpha is
arbiter let us take some specific value and
216
00:41:12,840 --> 00:41:19,230
try to see right.
.
217
00:41:19,230 --> 00:41:30,520
If alpha is half, then beta will also half
then what will happen to your method alpha
218
00:41:30,520 --> 00:41:36,780
is
half right. So, this fellow is zero and this
219
00:41:36,780 --> 00:41:52,869
fellow is 1 right, if alpha is half. So, let
us if
220
00:41:52,869 --> 00:42:09,869
alpha is half, beta is half then we get w
1 0, w 2 is 1 and you method reduces to y
221
00:42:09,869 --> 00:42:28,170
n plus
1 is y n plus y n plus w 2 is 1, so h f of
222
00:42:28,170 --> 00:42:53,880
x n plus h by 2 y n plus h by 2 f. So, this
is a
223
00:42:53,880 --> 00:43:11,140
method we get. So, y n plus
this is a method alpha is half. So, this coefficient
224
00:43:11,140 --> 00:43:16,350
vanishes
and alpha is half. So, this we get w 1 0 w
225
00:43:16,350 --> 00:43:30,020
2 is 1 and beta equal to alpha equal to half.
Therefore, the method reduces to this one.
226
00:43:30,020 --> 00:43:54,530
Suppose, alpha equals to one then beta equals
to 1 then w 1 equals to half and which is
227
00:43:54,530 --> 00:44:09,550
also w 2.
So, in this case y n plus 1 y n plus, h times
228
00:44:09,550 --> 00:44:25,640
w 1 plus w 1 k 1 plus w 2 k 2. So, this reduces
to h times k 1 plus k 2 and what is our k
229
00:44:25,640 --> 00:44:36,840
1 k 1 is f and k 2 is k 2 is f of x n plus
alpha h y
230
00:44:36,840 --> 00:45:01,410
.n plus beta h k 1 this reduces to f of x
n plus h y n plus h k 1 k 1 is f. So, this
231
00:45:01,410 --> 00:45:08,560
is the
particular case when alpha is 1 alpha is.
232
00:45:08,560 --> 00:45:14,840
So, these are general choices now the story
is not
233
00:45:14,840 --> 00:45:24,190
left we have compared up to 2 terms and then
shown as system of this form and then one
234
00:45:24,190 --> 00:45:31,940
is arbitrary. So, of course, taking non zero,
one can have different choice right. So,
235
00:45:31,940 --> 00:45:41,790
general choices are alpha is half and alpha
is 1. Now, what happens to the terms beyond
236
00:45:41,790 --> 00:45:48,740
h square, obviously they should contribute
to the error.
237
00:45:48,740 --> 00:45:49,740
.
238
00:45:49,740 --> 00:46:10,609
So, if you consider the difference, since
t expansion and h expansion agree up to h
239
00:46:10,609 --> 00:46:24,890
square, what will happen to the difference.
The difference must be the residual that is
240
00:46:24,890 --> 00:46:49,730
error. So, naturally that should from h cube.
So, if you can do the long calculation, y
241
00:46:49,730 --> 00:47:10,360
3
we have computed any way this is in our hand.
242
00:47:10,360 --> 00:47:27,580
So, this is the residual which is supposed
to be the error of course, at a given. Since,
243
00:47:27,580 --> 00:47:41,240
we know f and we have determine alpha. So,
what will happen, this entire thing is known
244
00:47:41,240 --> 00:47:55,790
to us and hence this is order of h cube. So,
the residual is of order h cube and hence
245
00:47:55,790 --> 00:48:13,510
the method is of order h square.
So, one remark see for example, here for all
246
00:48:13,510 --> 00:48:22,570
f means not for a particular f this is
becoming 0 and for all of no choice of alpha
247
00:48:22,570 --> 00:48:29,690
will make the leading term vanish what is
the leading term in this is the leading term.
248
00:48:29,690 --> 00:48:57,020
So, further you have h 4, no choice of alpha
make the leading term vanish for all f of
249
00:48:57,020 --> 00:49:06,760
x y. So, this is an important mark to conclude
that really the error is coming from the order
250
00:49:06,760 --> 00:49:24,750
of h cube. So, we have approximated with
two slopes in generalized formula, but we
251
00:49:24,750 --> 00:49:27,290
have considered only two slopes.
252
00:49:27,290 --> 00:49:35,170
.Then we have taken the weighted average and
expanded the approximate formula
253
00:49:35,170 --> 00:49:45,920
expand the Taylor series formula. Then determined
the arbitrary coefficient up to h
254
00:49:45,920 --> 00:49:53,349
square right and then conclude that the residual
comes from h cube. Hence this is the
255
00:49:53,349 --> 00:50:01,619
second order method so this is RK 2 that is
what I have written. Now, suppose one would
256
00:50:01,619 --> 00:50:10,480
like to define a higher order method R K method
what one has to do, one has to compare
257
00:50:10,480 --> 00:50:20,619
a the terms between the Taylor series expansion
and the h series expansion of the
258
00:50:20,619 --> 00:50:28,670
approximate and try to determine the arbitrary
coefficient.
259
00:50:28,670 --> 00:50:36,700
So, this will determine the method because
once you determine the coefficient the
260
00:50:36,700 --> 00:50:43,530
method is determined and then you get a new
method. So, how long we try to determine
261
00:50:43,530 --> 00:50:48,850
of course, this is algebraically you try to
do you get very complex system. So, the
262
00:50:48,850 --> 00:50:53,990
standard methods are first one you arrive
at second order method. There is a choice
263
00:50:53,990 --> 00:50:58,010
of
one arbiter coefficient and more general choice
264
00:50:58,010 --> 00:51:04,300
are half and 1.
So, these are R K second order, but they slightly
265
00:51:04,300 --> 00:51:09,680
vary. Now, if you really go for more
number of terms, then you get let us say you
266
00:51:09,680 --> 00:51:17,830
go to 4 terms. Then you get four in the
sense you got to compare h optical h power
267
00:51:17,830 --> 00:51:24,550
4, you get fourth order R K method. So, that
will be slightly complicated.
268
00:51:24,550 --> 00:51:25,550
.
269
00:51:25,550 --> 00:51:42,160
So, before for that let us just see some example.
So, this is y dashed is x square plus 2 x
270
00:51:42,160 --> 00:51:51,470
y
and y of 0 is 1 and say h is 0.1. So, then
271
00:51:51,470 --> 00:51:56,900
whatever the method we have determined, let
us
272
00:51:56,900 --> 00:52:11,040
say alpha 1 case. So, alpha 1 case we have
y n plus 1 is y n plus h by 2 k 1 is just
273
00:52:11,040 --> 00:52:12,040
f, there
274
00:52:12,040 --> 00:52:30,359
.plus k 2 is f of x n plus h y n plus h f.
So, this is the method we have. Suppose, we
275
00:52:30,359 --> 00:52:36,520
try to
determine y f 0.1. So, this will be y 0 plus
276
00:52:36,520 --> 00:52:54,359
f of x 0 y 0 plus f of x 0 plus 0.1 y0 plus
0.1
277
00:52:54,359 --> 00:53:15,250
into f of. So, we had compute each term, what
is f of, this is x 0 square. So, x 0 is 0,
278
00:53:15,250 --> 00:53:31,540
this
is 0. Therefore, so y 0 is 1 h by 2. This
279
00:53:31,540 --> 00:53:40,520
is 0 and f of we need this term right and
this is 0.
280
00:53:40,520 --> 00:53:54,160
So, this reduces to this is 0, this is gone.
So, this reduces to f of 0.1 and 1. So, this
281
00:53:54,160 --> 00:53:59,680
is 0.1
square.
282
00:53:59,680 --> 00:54:31,410
So, this will be where we are. So, point h
by 2 this is 0 and this is reduced to. So,
283
00:54:31,410 --> 00:54:40,770
we get
the value. Next we compute a good exercise
284
00:54:40,770 --> 00:54:49,420
for you is for the same example you try to
compute the values at least 2-3 values, y
285
00:54:49,420 --> 00:54:52,310
point 1 point 2 point 3, using Euler method
and
286
00:54:52,310 --> 00:54:59,369
then R K method. Since, they form of f is
very simple one can compare with the exact
287
00:54:59,369 --> 00:55:11,260
solution to know which gives slightly at the
rate. So, in the next class we try to talk
288
00:55:11,260 --> 00:55:17,960
about
R K fourth order and may be once we define
289
00:55:17,960 --> 00:55:25,160
the order of the method, then we have to
talk slightly more about the error.
290
00:55:25,160 --> 00:55:30,830
For example, you are computing y f 0.1, then
there is some error introduced at that stage
291
00:55:30,830 --> 00:55:35,400
then to compute y f 0.2 you are using the
value of y f point 1, so whatever the error
292
00:55:35,400 --> 00:55:43,670
introduced at 0.1 that will propagate. So,
we have to really think of we have to really
293
00:55:43,670 --> 00:55:52,020
think of how these errors will be propagating
and try to control. So, will talk on R K
294
00:55:52,020 --> 00:55:57,330
fourth order and then how in general error
estimates are computed.
295
00:55:57,330 --> 00:55:58,790
Thank you.
296
00:55:58,790 --> 00:55:58,790
.