1
00:00:13,580 --> 00:00:24,060
Hello good morning, so far we have learnt
some single step methods to solve initial
2
00:00:24,060 --> 00:00:31,480
value problems. So, it would be better to
work out some exercises in order to get the
3
00:00:31,480 --> 00:00:35,470
flavor of each of the methods and feel more
confident.
4
00:00:35,470 --> 00:00:36,470
.
5
00:00:36,470 --> 00:00:53,720
So, let us do some problems. This tutorial
is on single step methods, so better to have
6
00:00:53,720 --> 00:01:13,360
your calculator with you and then start working
with me. So, this is problem 1, compute
7
00:01:13,360 --> 00:01:32,640
an approximation
to y of 1, y dash of 1 and y double dash of
8
00:01:32,640 --> 00:02:05,410
1 using Taylor’s series
method of order 2 with h equals to 1, when
9
00:02:05,410 --> 00:02:47,230
y x is the solution of... So, let us read
the
10
00:02:47,230 --> 00:02:56,310
problem carefully, compute an approximation
to y of 1, y dash of 1 and y double dashed
11
00:02:56,310 --> 00:03:04,040
of 1 using Taylor’s series method of order
2 with h equals to 1, when y axis the solution
12
00:03:04,040 --> 00:03:09,480
of the following initial value problem.
Look at that, this is the third order, so
13
00:03:09,480 --> 00:03:14,850
hence we have 1, 2, 3 initial conditions all
at. So,
14
00:03:14,850 --> 00:03:27,640
we have x 0 is 0, h is 1, well I have taken
h is 1 just for a computational e’s. Now,
15
00:03:27,640 --> 00:03:33,360
we are
asking to compute approximations for y of
16
00:03:33,360 --> 00:03:44,590
1, which is y 1, y dashed of 1 is y 1 dashed,
y
17
00:03:44,590 --> 00:03:58,590
double of 1, so these are to be computed.
So, it is to be computed using Taylor series
18
00:03:58,590 --> 00:04:05,120
.suppose, y of 1 that is y 1, so we know usual
Taylor series expansion, but then how do
19
00:04:05,120 --> 00:04:15,230
we compute y dashed of 1, y double of 1 along
similar lines as it will be done for y of
20
00:04:15,230 --> 00:04:16,230
1.
.
21
00:04:16,230 --> 00:04:38,809
So, let us have a look at that. So, Taylor
22
00:04:38,809 --> 00:04:53,819
series of order 2, so this is y 1, this is
y 0 y 0
23
00:04:53,819 --> 00:05:30,660
prime h square by y 0 double. So, given data
y of 0, y dash of 0, y double of 0 therefore,
24
00:05:30,660 --> 00:05:43,869
y 0, y 0 dashed, y 0 double we have, so hence
y 1 can be easily computed. So, this is 0
25
00:05:43,869 --> 00:05:54,580
h
is 1, y 0 dashed is 1 plus h square by 2 factorial
26
00:05:54,580 --> 00:06:09,650
therefore, this is 1 there 1 there two.
Now, what is next to being computed? So, y
27
00:06:09,650 --> 00:06:18,069
1 we have computed, now we have to
compute y 1 prime, so how do we do it? So,
28
00:06:18,069 --> 00:06:26,749
let us write down the Taylor series of order
2 for y 1 prime.
29
00:06:26,749 --> 00:06:27,749
..
30
00:06:27,749 --> 00:06:49,499
So, y 1 prime is equals y 0 prime plus so
it is like y 1 prime, so let y 1 prime equals
31
00:06:49,499 --> 00:06:56,559
to z.
So, then for z of 1 we write it and replace
32
00:06:56,559 --> 00:07:15,370
it, so same thing we are doing, so this is
our
33
00:07:15,370 --> 00:07:37,449
expression, but this is the given data. So,
in order to compute y 1 prime, we need y 0
34
00:07:37,449 --> 00:08:01,709
triple, which we do not have, but we know
that y is the solution of given ODE. So, this
35
00:08:01,709 --> 00:08:16,939
implies y 3 equals to minus 2 y double minus
y prime plus y.
36
00:08:16,939 --> 00:08:41,479
Therefore, y 3 of 0 1 minus 2 y double is
minus y 1 y 0 will be 0, so this is minus
37
00:08:41,479 --> 00:08:47,520
4.
Now, we are in a position to compute this
38
00:08:47,520 --> 00:09:02,760
one, hence this is y 0 prime is 1. So, h y
0
39
00:09:02,760 --> 00:09:25,990
double prime is 2 1 square by 2 y 0 triple
prime, so this is y 3 y dash of 1 this is
40
00:09:25,990 --> 00:09:30,450
minus 2
and this is 2 get cancelled and this will
41
00:09:30,450 --> 00:09:44,900
be 1. So, we got approximation y dash of 1.
42
00:09:44,900 --> 00:09:45,900
..
43
00:09:45,900 --> 00:10:15,280
So, Taylor series for this, now we do not
know y 4, but given from the ODE, we have
44
00:10:15,280 --> 00:10:51,210
computed. So, from here y 4 therefore, y 4
of 0 is y 3 of 0 just now we have computed
45
00:10:51,210 --> 00:11:03,900
y
3 of 0 minus 4 y 2 of 0 y dashed, so this
46
00:11:03,900 --> 00:11:37,180
is 7. Hence, y 0 double 2 this is y threes
minus 4
47
00:11:37,180 --> 00:11:58,530
y 4 is 7, so this will be using second order
Taylor series we have obtained
48
00:11:58,530 --> 00:12:07,450
approximations to Y of 1, y dash, y of double
dashed of 1. So, all that we have done is
49
00:12:07,450 --> 00:12:16,070
we made used of the given having known that
y x is the solution of ODE, we have
50
00:12:16,070 --> 00:12:23,490
computed the higher order derivatives. Suppose
you have to compute y 4 of 1 then we
51
00:12:23,490 --> 00:12:32,490
differentiate this further and try to obtain
the higher order of derivatives.
52
00:12:32,490 --> 00:12:33,490
.
53
00:12:33,490 --> 00:13:02,000
.So, let us proceed further, given the initial
value problem y dash equals to x minus y
54
00:13:02,000 --> 00:13:49,400
square, y of 0 is 1, If the error in y of
x obtained from the first five terms
55
00:13:49,400 --> 00:14:17,000
of the Taylor’s
series is to be less than 0.00005. So, let
56
00:14:17,000 --> 00:14:25,740
us try to understand given the initial value
problem, if the error of y of x obtained from
57
00:14:25,740 --> 00:14:29,660
the first 4 terms of the Taylor series is
to be
58
00:14:29,660 --> 00:14:39,220
less than, that means you obtain y of x and
if the error has to be less than this then
59
00:14:39,220 --> 00:14:45,730
what
should be the condition on x. So, first 4
60
00:14:45,730 --> 00:15:04,060
terms means we have to compute up to y 4 that
means y of x obtained from first 4 terms.
61
00:15:04,060 --> 00:15:36,960
So, this is y of 0 plus x plus x square by
2 factorial
62
00:15:36,960 --> 00:15:52,980
plus Taylor series method first 1 2 3 4
first 5 letters make it 5, so that is plus
63
00:15:52,980 --> 00:16:01,779
x 4 by 4 factorial 1 2 3 4 5, first 5 terms.
So, we
64
00:16:01,779 --> 00:16:20,050
need to compute the higher order derivatives,
so y 0 equals to 1, y 0 dash equals to x 0
65
00:16:20,050 --> 00:16:24,190
minus y 0 square so that is 0 minus 1.
.
66
00:16:24,190 --> 00:16:50,870
Then y 0 double so that is 1 minus evaluated
at so this will be 1 minus 2, y 0 is 1, y
67
00:16:50,870 --> 00:17:09,730
dash
is minus 1 then y 0 3 is minus 2, y dash square
68
00:17:09,730 --> 00:18:02,659
evaluated at, so this will be 1 y 0 is 1 and
y 2 is 3 then y 0 4. So, this will be 2 y
69
00:18:02,659 --> 00:18:17,750
dash is minus 1, y 2 is 3, plus y das is minus
1 3,
70
00:18:17,750 --> 00:18:43,720
so this will be therefore, y of x is we have
written already y 0 plus y dash x 0. So, by
71
00:18:43,720 --> 00:19:01,990
substituting we get 1 minus x plus 3 by 2
x square minus 4 by 3 x cube minus 7 by 12
72
00:19:01,990 --> 00:19:10,200
x
4, so this is using first 5 terms. Now, if
73
00:19:10,200 --> 00:19:13,129
this is the case then what will be the error?
74
00:19:13,129 --> 00:19:14,129
..
75
00:19:14,129 --> 00:19:53,570
So, the error
y 5 x is minus 2, so this is y 4, so y 5 this
76
00:19:53,570 --> 00:20:43,869
will be 3 there, so 3 y 2 plus y
dashed 3 plus y 3 plus y dashed y. So, this
77
00:20:43,869 --> 00:20:56,220
will be minus 2 3 plus this is 3 and 4 times
y
78
00:20:56,220 --> 00:21:27,139
dashed is minus 1, y 3 is minus 8, this is
1 y 4 is 34. Therefore, the error
79
00:21:27,139 --> 00:21:53,519
this is minus 2
times 93 by 5 factorial, so
80
00:21:53,519 --> 00:22:15,999
this
is equals to 3 31 by 20 and it is required
81
00:22:15,999 --> 00:22:27,049
that mod T 5
must be less than equals to point this much.
82
00:22:27,049 --> 00:22:39,789
This implies 31 by 20 must be less than or
equals to it is lightly difficult to solve,
83
00:22:39,789 --> 00:22:46,480
but then one obtains the estimate, so this
is the
84
00:22:46,480 --> 00:22:56,890
range of x.
So, let us try to understand what we have
85
00:22:56,890 --> 00:23:09,250
done, we have given initial value problem
if we
86
00:23:09,250 --> 00:23:20,600
use the first 5 terms, so first 5 terms of
the Taylor series is to be is used and if
87
00:23:20,600 --> 00:23:23,679
the error
are on using first 5 terms is to be less then
88
00:23:23,679 --> 00:23:33,850
find the range of x. So, what did we do? So,
first 5 terms goes up here hence, the error
89
00:23:33,850 --> 00:23:38,559
come from T 5 that is from the fifth term
as a
90
00:23:38,559 --> 00:23:45,950
sixth term and that needs to be less than
this, so on solving we obtain the corresponding
91
00:23:45,950 --> 00:24:00,340
estimate. So, this is how we find out the
corresponding estimates.
92
00:24:00,340 --> 00:24:01,340
..
93
00:24:01,340 --> 00:24:48,779
Now, problem 3 apply Euler-Cauchy method with
step size h to the I V P and
94
00:24:48,779 --> 00:25:12,620
determine
and express it expression for y n, for what
95
00:25:12,620 --> 00:25:38,890
values of h the sequence y n is bounded. So,
what the method says apply Euler-Cauchy method
96
00:25:38,890 --> 00:25:46,300
with step size h to this initial value
problem. Determine explicit for determination
97
00:25:46,300 --> 00:25:57,399
y n and for what values of the sequence of
h y n is bounded. So, when we determine expression
98
00:25:57,399 --> 00:26:30,960
then b part is triple, so how do we
proceed? So, first let us write down Euler-Cauchy
99
00:26:30,960 --> 00:27:01,940
method, so this is Euler-Cauchy
method. Now, we have to use this method and
100
00:27:01,940 --> 00:27:05,700
determine the solution y n.
.
101
00:27:05,700 --> 00:27:53,470
.So, for the I V P f of x y is minus y therefore,
k 1 equals this, k 2 is so this is nothing
102
00:27:53,470 --> 00:28:06,059
but
minus y n plus h k 1, this is minus y n, k
103
00:28:06,059 --> 00:28:17,850
1 is minus y n so minus h y n. Therefore,
y n
104
00:28:17,850 --> 00:28:50,070
plus 1 is y n plus h by 2, k 1 is this plus
k 2, so minus y n minus h. So, this is one
105
00:28:50,070 --> 00:29:10,539
coefficient here and so 1 and minus 2 get
cancelled, so minus h then this is plus h
106
00:29:10,539 --> 00:29:16,889
square
by 2 y n.
107
00:29:16,889 --> 00:29:17,889
.
108
00:29:17,889 --> 00:29:59,590
So, what did we get y n plus 1 is 1 minus
h. So, y 1 is y 0, recursively if you apply
109
00:29:59,590 --> 00:30:16,029
y 0
hence, y n is y 0, n
110
00:30:16,029 --> 00:30:31,799
is equal to 1 2. So, this is an expression
so a part is done, now for b
111
00:30:31,799 --> 00:30:43,580
part. So, for what values of h is the sequence
y n is bounded, so this is the sequence is
112
00:30:43,580 --> 00:31:04,820
bounded f and f mod 1 minus h is less than
or equals to 1, this implies this is a range
113
00:31:04,820 --> 00:31:25,979
for
which the sequence is bounded. So, such methods
114
00:31:25,979 --> 00:31:32,609
will give an idea how to compute the
boundedness of the solution and the range
115
00:31:32,609 --> 00:31:39,519
and the step size. So, we have simply applied
on this method and then tried to determine
116
00:31:39,519 --> 00:31:45,950
the solution y n explicitly and then put the
condition for the boundedness.
117
00:31:45,950 --> 00:31:46,950
..
118
00:31:46,950 --> 00:32:20,869
So, let us move further, find the region of
absolute stability
119
00:32:20,869 --> 00:33:22,549
of the Heun’s method given
by where k 1 is this and find the region of
120
00:33:22,549 --> 00:33:33,330
absolute stability of Heun’s method. Now,
what do we do for absolute stability, there
121
00:33:33,330 --> 00:33:42,419
is a reference equation so we have to consider
only the corresponding reference equation.
122
00:33:42,419 --> 00:33:57,999
So, what will be that
the reference equation is
123
00:33:57,999 --> 00:34:10,480
y dash equals to lambda y so the reference
equation is y dash equals to lambda y.
124
00:34:10,480 --> 00:34:11,480
.
125
00:34:11,480 --> 00:35:00,740
.So, let us work out k 1 is f of x n y n,
which is lambda y n, k 2 will be lambda times
126
00:35:00,740 --> 00:35:14,850
y n
plus h by 3 k 1, k 1 is so this is lambda
127
00:35:14,850 --> 00:36:03,020
1 plus then k 3. So, this will be lambda k
2, k 2
128
00:36:03,020 --> 00:36:35,610
will be lambda 1 plus 2 by 3 h lambda plus
2 square y n.
129
00:36:35,610 --> 00:36:36,610
.
130
00:36:36,610 --> 00:37:00,460
So therefore, y n plus 1 is y n plus h by
4, this method is k 1 plus 3 k 3. So, k 1
131
00:37:00,460 --> 00:37:15,480
is lambda
y n 3 k 3, k 3 is this much, so 3 lambda y
132
00:37:15,480 --> 00:37:31,150
n 1 plus
133
00:37:31,150 --> 00:38:06,930
so this is simplified 1 plus lambda h by
4. Now, this is exactly E of lambda h y n
134
00:38:06,930 --> 00:38:28,040
where, E of lambda h equals 1 plus lambda
h
135
00:38:28,040 --> 00:39:14,590
plus this. Now, for absolute stability, this
implies lambda h belongs to minus 2.51. So,
136
00:39:14,590 --> 00:39:23,490
it
is pity tough, but one can solve it and this
137
00:39:23,490 --> 00:39:38,370
is the internal of absolute stability.
So, for example, if we have some possible
138
00:39:38,370 --> 00:40:01,560
values so for example, if h is of course,
always positive so if lambda is positive,
139
00:40:01,560 --> 00:40:12,050
so whatever may be the value so if it is beyond
this then it is not administrative values.
140
00:40:12,050 --> 00:40:31,130
So, lambda equals to say minus 1 so this gives
absolute stable, so one can obtain various
141
00:40:31,130 --> 00:40:39,600
values.
142
00:40:39,600 --> 00:40:40,600
..
143
00:40:40,600 --> 00:41:07,230
So, let us consider this is p 5 so consider
144
00:41:07,230 --> 00:41:22,230
the method y n plus 1 equals to y n plus h
f n
145
00:41:22,230 --> 00:41:43,641
plus 1. So, this is almost looking like Euler,
but this is called backward Euler. Consider
146
00:41:43,641 --> 00:42:05,521
the backward Euler method and
find the region of stability. So, the method
147
00:42:05,521 --> 00:42:30,210
is again state
forward, so the reference equation is therefore,
148
00:42:30,210 --> 00:42:34,150
the reference equation is this therefore,
y
149
00:42:34,150 --> 00:42:55,160
n plus 1 is plus h lambda y n plus 1. So,
we need to get a form, so how do we get it
150
00:42:55,160 --> 00:43:26,830
1
minus this equals y n, therefore, E of lambda
151
00:43:26,830 --> 00:43:33,630
h is this.
.
152
00:43:33,630 --> 00:44:03,230
.Now, for absolute stability we had E of lambda
h is 1 minus lambda h for absolute
153
00:44:03,230 --> 00:44:23,660
stability. So, we need this
so this condition we have to come up with
154
00:44:23,660 --> 00:44:29,400
the range, so before
error at the range we can argue lambda is
155
00:44:29,400 --> 00:44:48,500
positive what happens and negative what
happens like that? When lambda is real and
156
00:44:48,500 --> 00:45:03,120
lambda is negative then see if lambda is
negative so h is positive, if h is negative
157
00:45:03,120 --> 00:45:07,150
so this becomes 1 plus lambda h. So, this
1 hour
158
00:45:07,150 --> 00:45:33,150
of that is then is true always therefore,
the method is
159
00:45:33,150 --> 00:45:47,710
absolutely stable for minus infinity
lambda h 0.
160
00:45:47,710 --> 00:45:48,710
.
161
00:45:48,710 --> 00:46:12,220
In the other case the lambda can be complex
as well, when lambda is complex with real
162
00:46:12,220 --> 00:46:32,630
part of lambda is less than 0, so lambda is
complex real part is this. So, this quantity
163
00:46:32,630 --> 00:46:42,410
is
less than 1, we need or 1 minus lambda h greater
164
00:46:42,410 --> 00:47:06,480
than 1, so this gives 1 minus x square
greater than 1, so what is this region? This
165
00:47:06,480 --> 00:47:15,120
is the region outside the circle, it is a
interact
166
00:47:15,120 --> 00:47:33,810
1 0, so this is region and radius 1. So, depending
on the problem we error it different
167
00:47:33,810 --> 00:47:47,510
stability conditions, but for a given problem
how do you come across a lambda. See f is
168
00:47:47,510 --> 00:47:56,530
non leaner here so f can be any non-liner
quantity, but then the linearization says
169
00:47:56,530 --> 00:48:01,910
you can
linearism it and then figure out what is f?
170
00:48:01,910 --> 00:48:02,910
..
171
00:48:02,910 --> 00:48:14,930
So for example, if y dashed is say x square
plus y so our f of x y then our lambda is
172
00:48:14,930 --> 00:48:24,430
duo f
by duo y, so in this case there is just 1.
173
00:48:24,430 --> 00:48:30,990
Suppose, y dashed is x square minus y square
so
174
00:48:30,990 --> 00:48:54,850
then lambda is minus 2 y. Now, suppose we
would like to analyze about the point 0, 1
175
00:48:54,850 --> 00:49:13,770
then lambda is minus 2. So for example, when
you using Euler method what kind of h
176
00:49:13,770 --> 00:49:26,820
will give us, so that the method is absolutely
stable so keeping this lambda in you, for
177
00:49:26,820 --> 00:49:36,060
this initial value problem we have to choose
h such that the range of the absolute stability
178
00:49:36,060 --> 00:49:49,690
interval is met. So, these are some observations
we have to be careful about. Now, let us
179
00:49:49,690 --> 00:49:59,230
look at another problem, this is R K second
order.
180
00:49:59,230 --> 00:50:00,230
.
181
00:50:00,230 --> 00:50:42,340
.Consider the Rangakutta second order method
given by equals to y n plus 1. Well if you
182
00:50:42,340 --> 00:51:08,900
take h there we need not otherwise we have
to take h here
183
00:51:08,900 --> 00:51:40,400
this alpha h beta k 1. So, if this
is the case
184
00:51:40,400 --> 00:51:49,730
find the region of absolute stability, so
the story is the same. Now, consider
185
00:51:49,730 --> 00:52:10,740
the reference equation y dash equals to lambda
y this implies this, so k 1 is h lambda y
186
00:52:10,740 --> 00:52:23,540
then k 2 is h.
.
187
00:52:23,540 --> 00:52:51,800
So, this is h into lambda y n plus, so this
is lambda h y n plus beta k 1, that will be
188
00:52:51,800 --> 00:53:20,810
lambda h beta y n, so this will be 1 plus
lambda h beta y n. Therefore, this was our
189
00:53:20,810 --> 00:53:39,300
y n
plus 1 so y n plus 1 minus k 1, so k 1 plus
190
00:53:39,300 --> 00:54:07,020
lambda h y n plus 1 by dou beta k dou lambda
h 1 plus lambda h beta y n. So, this can be
191
00:54:07,020 --> 00:54:26,730
written as 1 plus lambda h, it take common
1
192
00:54:26,730 --> 00:55:02,920
minus plus lambda h by dou beta 1 plus h lambda
beta.
193
00:55:02,920 --> 00:55:29,100
So, from here we have obtain what is E of
lambda h. So, consider a special case choosing
194
00:55:29,100 --> 00:55:52,580
alpha equals to beta 1 plus
195
00:55:52,580 --> 00:56:07,860
at least in this case we get 1 plus lambda
h plus into y n. This
196
00:56:07,860 --> 00:56:14,520
is the special case otherwise you get a very
complicated expressions, so we have to get
197
00:56:14,520 --> 00:56:19,680
the range of the interval will consist of
alpha and lambda h.
198
00:56:19,680 --> 00:56:20,680
..
199
00:56:20,680 --> 00:56:30,400
So, at least in this case it gets simplified
therefore, E of lambda h is 1 plus lambda
200
00:56:30,400 --> 00:56:46,570
h plus
lambda h square. So for absolute stability
201
00:56:46,570 --> 00:57:00,380
mod, this must be less than equal to 1, so
this
202
00:57:00,380 --> 00:57:16,290
is satisfied and lambda h belongs to minus
2, 0. So, that means if say h is one-fourth
203
00:57:16,290 --> 00:57:31,830
so
lambda equals to say 3, the method is not
204
00:57:31,830 --> 00:57:48,750
absolutely stable because it is minus 2.
Suppose h is half and lambda equals to minus
205
00:57:48,750 --> 00:58:04,670
2 then the method is absolutely stable.
So, estimating these stability intervals is
206
00:58:04,670 --> 00:58:08,030
very much useful, so that there is a trade
of
207
00:58:08,030 --> 00:58:14,410
between the lambda and then step size and
the internal lambda depends on the given non
208
00:58:14,410 --> 00:58:25,020
leaner function. So, may be next class we
may do some more problems until then.
209
00:58:25,020 --> 00:58:31,670
Thank you, bye.
210
00:58:31,670 --> 00:58:31,670
.