Document 12034916

advertisement
Exercise 4) The text homework problems 2.4.4, 2.5.4, 2.6.4 are canceled. However, you will work on a
similar set of “by hand” problems in the lab. In preparation for that, use the Euler, Improved Euler, and
Runge Kutta pseudo-code below to estimate e’, as the solution to the initial value problem that we’ve used
exclusively in these notes, namely
y’(x)
y
(In the
• will be studying different initial value problems
In this exercise use just one step, ii I,
of si
iso, use the slope fields to illustrate how you fin’ and use the various k values which
are rates o c anges that get represented as slopes in the solution :raphs. Take one step to get from the
initial point (x0,y0) (0, 1) to the final point (x1,y1
(I,??
..:
—
)
V
4~ Euler pseudocode for
y’ (x) f(x, y)
~Vo) Yo
k f(x~i)
x
j+I
x+h
j
y+hk.
(answer is (x
~‘~)
(i~ 2).)
/
V
II
340-0
I
I
3.5
II)
1?
I
k= çco,
lii.’lTF
Ill/li
Ill
I1I~iffIlttl
I
IlIl,,,,,,
111171
III?
3
y1’: ‘y04-kk
2.5
,
,
,
I
IlFIlFrl?1Il7P7l
Ill
/
1171171FF
It
0~a
fill
/.‘7t1f117I17r1lI~
2.
~2
t
I /11/11/11/1111~
(1,1)
E’$er.
1.5
-
- -
U.
—05
1,0177, 1.7802
4b) Improved Euler pseudocode:
(a, i’)
k~ f(x3~)
/c2 f(x+h,y+hk)
k1t fit8 ‘)“l.
k
lC2t ~~(&,ItC)t
x
J
~-(k + 1c2)
I
x+h
j
y+hk
(answer isy1
kt
4-(i~z) za
k(I~l):I S
2.5)
y1ty0+-k14
i.
i
(x~,y1) r c~,z.c)
IS
4c).
Runge-Kutta pseudocode:
k1
(.5.Y)
~r
h
h)
2’
‘
h
h
k3 4x+ 2’~ : Ic)
Ic4 f(x+h~.v+hk\
t
Ix
k
2
~J
Ic
x
jI
y
J
1
j
c(O~S
y+hk
Ij
(‘~,~D’—
2.708)
V =V
(°,i.~
4
kA.61~frnDt
I I
I a’ I /1~1111?
I/stiff
fit / 1 it/f If fitif/tIt
k~t j-(,~+h,~-bk,)
~4 (.5, i~.c)
3.5 -1!? a’ I , I F I- t F S I I
a’
I 7 1 1 5
I,, / I iItI,,ItI)’I,I,,
.
&. (oi.c, L~- .so.n)
t
LW~J~bIh4~
x+h
j
(answer by
k,t
cLo.~u.
3)
1
j
I€#s.is4pofn1r
‘‘I /5 /,t,,,i,ItI,II?
3
£(.s,i.7s)tI.75
7~)
7, ii???
7.7?
a’, a’,??
a’ I
2.5 7. .7 1 1!
iC4~• &(1,
\4- L’~b1S)
I,, ft /
b
‘It it 1t
V2
‘it 7, 1t/F
kt
.7.’,
j.7o7
.7,
,
1.5
.7
.7.
,
,_?
~
Ns..i,.
.7
‘
/
,
~
A
1
ti 4-170%’
——A
2-’ot..
AA’AAAAAAA,’
0.5
(x11l~1”yt (t,t.7ot.
0
e.
et.f~A,J[~
~t4s
2 ]It..
-0.5
1.0177, 1.7802
0
1.5
x
1~
Download