0% found this document useful (0 votes)
5 views20 pages

Chapter 7 Exercise Solutions

This document provides answers to selected exercises from Chapter 7 of a textbook. It includes answers to problems related to numerical solutions of differential equations using Euler's method, Taylor series methods, and finite difference methods. For each section, it lists the problem number and the numerical solution or analysis. It also includes error analyses and convergence rates for some of the problems.

Uploaded by

Lakshya Vij
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views20 pages

Chapter 7 Exercise Solutions

This document provides answers to selected exercises from Chapter 7 of a textbook. It includes answers to problems related to numerical solutions of differential equations using Euler's method, Taylor series methods, and finite difference methods. For each section, it lists the problem number and the numerical solution or analysis. It also includes error analyses and convergence rates for some of the problems.

Uploaded by

Lakshya Vij
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

i

i
book 2005/4/7 22:31 page S-48 #69

Answers to Selected Exercises


for Chapter 7
Section 7.1 (page 544)
1. (a) explicit, two-step
(d) implicit, one-step

(b) explicit, one-step


(e) explicit, two-step

(c) implicit, two-step

3. (a) |f (t, y1 ) f (t, y2 )| = |t||y1 y2 ||y12 + y1 y2 + y22 | 300|y1 y2 |


t
1
1
(b) |f (t, y1 ) f (t, y2 )| = | 1+t
2 ||y1 y2 | |y +y | 4 |y1 y2 |
1
2
2
2
(c) |f (t, y1 ) f (t, y2 )| = et | yy11y
y2 | e |y1 y2 |
2
(d) |f /y| 10e + 1
(e) |f /y| 22

5. |f (t, y1 ) f (t, y2 )| = |t||y1 y2 ||y1 + y2 + 1| (2M + 1)|y1 y2 |; the function


does not satisfy a Lipschitz condition when y can be any real number.
7. y2 (t) = t 13 t3 +

4 5
15 t

2 7
63 t

9. y4 (t) = 1 t + t2 13 t3 +

1 4
12 t

1 5
120 t

11. 1 + t + t2 + 23 t3 + 56 t4
13. 1 + t + 16 t3 18 t4
Section 7.2 (page 558)
1.

ti
0.00
0.25
0.50
0.75
1.00

wi
1.00000000
0.75000000
0.58886719
0.46717517
0.36949930

3.

ti
0.00
0.33
0.67
1.00

wi
0.00000000
0.33333333
0.94105313
2.50087572

S-48

i
book 2005/4/7 22:31 page S-49 #70

Selected answers for Section 7.2

5.

ti
0.00
0.25
0.50
0.75
1.00

wi
0.00000000
0.25000000
0.51562500
0.83605957
1.29493237

7.

ti
0.00
0.50
1.00
1.50
2.00

wi
1.00000000
1.50000000
2.04957376
2.71270721
3.53876191

Error
0.000000
0.015732
0.056741
0.109239
0.173126

Error Bound
0.000000
0.612552
25.253406
1016.470789
40889.759259

9.

ti
0.00
1.00
2.00
3.00
4.00

wi
1.00000000
0.00000000
1.00000000
2.00000000
3.00000000

Error
0.000000
0.735759
0.270671
0.099574
0.036631

Error Bound
0.000000
1.718282
6.389056
19.085537
53.598150

11.

ti
2.00
2.40
2.80
3.20
3.60
4.00

wi
-5.00000000
-3.40000000
-2.43431953
-1.81747838
-1.40353313
-1.11397901

13.

ti
0.00
1.00
2.00
3.00
4.00
5.00

wi
1.00000000
2.00000000
5.43656366
14.77811220
40.17107385
109.19630007

w
i
-5.10000000
-3.46800000
-2.48300592
-1.85382795
-1.43160379
-1.13625859

|wi w
i |
0.10000000
0.06800000
0.04868639
0.03634957
0.02807066
0.02227958

w
i
0.90000000
2.00000000
5.43656366
14.77811220
40.17107385
109.19630007

S-49

e(ti a)L | |

0.100000
0.137713
0.189648
0.261170
0.359664
0.495303

|wi w
i |
0.10000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000

e(ti a)L | |

0.013534
0.036788
0.100000
0.271828
0.738906
2.008554

17. 2
19.

h
1/8
1/16
1/32
1/64
1/128
1/256
1/512

wh (2)
47.01489874
58.72429222
66.06076195
70.20852189
72.42039078
73.56346244
74.14464021

Error
27.717490
16.008096
8.671626
4.523866
2.311998
1.168926
0.587748

Ratio
0.163213
1.731467
1.846032
1.916862
1.956692
1.977882
1.988821

i
book 2005/4/7 22:31 page S-50 #71

S-50

21.

Answers to Selected Exercises for Chapter 7

h
1/8
1/16
1/32
1/64
1/128
1/256
1/512

wh (2)
-1.02147625
-1.03698250
-1.04264552
-1.04515017
-1.04633480
-1.04691158
-1.04719625

wh (2)wh/2 (2)
wh/2 (2)wh/4 (2)

2.738164
2.260992
2.114309
2.053844
2.026164

23. (a) Rate of convergence is O(h)


(b) To within roundo error, the Eulers method approximation is exact for
any step size
(c) The error term for Eulers method involves the second derivative of the
solution; in part (b), the second derivative of the solution is identically zero.
27. (a) 17.08313

(b) 0.48054

Section 7.3 (page 567)


t

2t

e
e
1. (a) f (t, x) = et /x, df
dt = x x3
df
2
(b) f (t, x) = t(x x), dt = (x2 x)(1 + t2 (2x 1))
2 2(x+t)
(c) f (t, x) = tex+t 1, df
+ ex+t
dt = t e
5
(d) f (t, x) = e2t + (1 + et )x + x2 ,
2
df
5 t
5
5
2t
= 2e + e x + (e2t + (1 + et )x + x2 )(1 + et + 2x)
dt
2
2
2

3.

(a)
ti
0.00
0.25
0.50
0.75
1.00

5.

wi
1.00000000
1.25000000
1.51252618
1.79455216
2.10210368

ti
0.00
0.50
1.00
1.50
2.00

(b)
wi
0.50000000
0.46875000
0.37585258
0.23651630
0.10527515

(c)

ti
0.00
0.67
1.33
2.00

(a)
(b)
ti
wi
ti
wi
ti
0.00 0.00000000 1.00000000 1.00
0.50 -0.5416667 12 0.31712682 1.25
1.00 -1.7714318 2 0.42291335 1.50
1.75
2.00

(d)
wi
ti
wi
1.00000000 0.00 1.00000000
1.58491568 0.50 2.09375000
1.96969668 1.00 4.72675623
1.93770463

(c)
wi
1.00000000
0.73828125
1.04164323
1.93152335
3.61896052

ti
0.00
0.25
0.50
0.75
1.00

(d)
wi
2.00000000
2.53401693
3.14869947
3.86695803
4.71820994

i
book 2005/4/7 22:31 page S-51 #72

Selected answers for Section 7.3

7. (a)

(b)

(c)

(d)

9. (a)

h
1/1
1/2
1/4
1/8
1/16
1/32
1/64

wh (1)
2.00000000
2.08629009
2.10210368
2.10534866
2.10608341
2.10625841
2.10630113

h
1/1
1/2
1/4
1/8
1/16
1/32
1/64

wh (2)
0.00000000
0.05273438
0.10527515
0.11611699
0.11847212
0.11902497
0.11915901

S-51

|w2h (1)x(1)|
|wh (1)x(1)|

h
1/8
1/16
1/32
1/64
1/128
1/256
1/512

wh (2)
1.74910747
1.69565726
1.67680542
1.67117763
1.66964329
1.66924324
1.66914116

h
1/8
1/16
1/32
1/64
1/128
1/256
1/512

wh (1)
4.89279075
4.89724837
4.89837608
4.89866153
4.89873344
4.89875150
4.89875602

h
1/32
1/64
1/128
1/256
1/512
1/1024
1/2048

wh (1)
-2.13552346
-2.13567324
-2.13568418
-2.13568491
-2.13568496
-2.13568497
-2.13568497

5.309098
4.754853
4.357393
4.170054
4.082571
4.040647
|w2h (2)x(2)|
|wh (2)x(2)|

1.793373
4.772374
4.513314
4.222684
4.106664
4.052527
|w2h (2)x(2)|
|wh (2)x(2)|

3.013151
3.448710
3.717553
3.859617
3.930499
3.965494
|wh (1)wh/2 (1)|
|wh/2 (1)wh/4 (1)|

3.952823
3.950537
3.969588
3.983417
3.991367

|wh (1)wh/2 (1)|


|wh/2 (1)wh/4 (1)|

13.692585
14.800493
15.388943
15.691762
15.844517

i
book 2005/4/7 22:31 page S-52 #73

S-52

Answers to Selected Exercises for Chapter 7

(b)

(c)

(d)

11.
ti
1.00
2.00
3.00
4.00
5.00

h
1/8
1/16
1/32
1/64
1/128
1/256
1/512

wh (2)
-0.47835633
-0.47839156
-0.47839297
-0.47839304
-0.47839304
-0.47839304
-0.47839304

h
1/8
1/16
1/32
1/64
1/128
1/256
1/512

wh (2)
3.61139693
3.61112480
3.61111186
3.61111115
3.61111111
3.61111111
3.61111111

h
1/4
1/8
1/16
1/32
1/64
1/128
1/256

wh (1)
4.71820994
4.71827684
4.71828150
4.71828181
4.71828183
4.71828183
4.71828183

|w2h (2)x(2)|
|wh (2)x(2)|

24.813255
20.765249
18.507131
17.291194
16.612934
16.946164
|w2h (2)x(2)|
|wh (2)x(2)|

20.874128
18.291339
17.112113
16.547795
16.271921
16.135227
|w2h (1)x(1)|
|wh (1)x(1)|

Euler, h = 1/16
wi
Error
1.44269504 0.000000
0.33073704 0.029937
0.17017295 0.015864
0.11021095 0.010014
0.07983195 0.007027

14.423886
15.189765
15.589169
15.793196
15.895012
15.951504
Taylor 2nd,
wi
1.44269504
0.37434297
0.19214629
0.12373911
0.08918356

h = 1/8
Error
0.000000
0.013669
0.006109
0.003515
0.002325

Taylor 4th, h = 1/4


wi
Error
1.44269504 0.000000
0.37485133 0.014178
0.19172169 0.005685
0.12338194 0.003157
0.08891451 0.002056

13. (a) Rate of convergence is O(h4 )


(b) To within roundo error, the fourth-order Taylor method approximation
is exact for any step size
(c) The error term for the fourth-order Taylor method involves the fth derivative of the solution; in part (b), the fth derivative of the solution is identically
zero.
15. (a) Rate of convergence is O(h4 )
(b) To within roundo error, the fourth-order Taylor method approximation
is exact for any step size
(c) The error term for the fourth-order Taylor method involves the fth deriva-

i
book 2005/4/7 22:31 page S-53 #74

Selected answers for Section 7.4

S-53

tive of the solution; in part (b), the fth derivative of the solution is identically
zero.
17. The temperature of the plate is within 1% of the temperature of the furnace
at around 51 seconds.
19. At the end of 15 days, roughly 725 boys are conned to bed with the u. The
maximum number of infected boys is roughly 293, occurring around 6.5 days.
Section 7.4 (page 580)
1. For each method





h2
h2
h2
wi+1 = wi 1 h +
+ ti h
+ .
2
2
2

Note that f (t, x) is linear in both t and x, so all of the second-order RungeKutta methods reduce to the second-order Taylor method.
3. For each method
wi+1 = wi (1 4h + 8h2 ) + ti

h 2h2

3
3


+ 2h

23h2
.
6

Note that f (t, x) is linear in both t and x, so all of the second-order RungeKutta methods reduce to the second-order Taylor method.
5. (a)

ti
0.00
0.25
0.50
0.75
1.00

wi
1.00000000
0.79443359
0.64782017
0.53202400
0.43598120

(b)

ti
1.00
1.40
1.80
2.20
2.60
3.00

wi
1.00000000
1.28260571
2.81601234
6.70838939
14.64752253
29.10339185

(c)

ti
0.00
0.33
0.67
1.00

wi
0.00000000
0.47052656
2.01761443
1.34860048

(d)

ti
1.00
1.60
2.20
2.80
3.40
4.00

wi
0.00000000
0.55500000
1.08567603
1.79226467
2.97260733
5.57823118

(e)

ti
0.00
0.25
0.50
0.75
1.00

wi
0.00000000
0.25781250
0.55438367
0.98016085
1.89116857

(f)

ti
1.00
1.33
1.67
2.00

wi
2.00000000
1.58098165
1.42751269
1.34784840

7. (a)

ti
wi
0.00 1.00000000
0.50 0.65117448
1.00 0.43888130

(b)

ti
wi
1.00 1.00000000
2.00 4.96527778
3.00 28.25074074

(c)

ti
wi
0.00 0.00000000
0.50 0.97625289
1.00 0.27524710

(d)

ti
wi
1.00 0.00000000
2.50 1.36439657
4.00 5.67411824

(e)

ti
wi
0.00 0.00000000
0.50 0.55116082
1.00 2.04061543

(f)

ti
wi
1.00 2.00000000
1.50 1.49781097
2.00 1.35522770

i
book 2005/4/7 22:31 page S-54 #75

S-54

Answers to Selected Exercises for Chapter 7

9. (a)

(b)

(c)

(d)

(e)

h
5/16
5/32
5/64
5/128
5/256
5/512
5/1024

wh (5)
51.43053935
51.40986736
51.40575571
51.40479794
51.40456457
51.40450684
51.40449248

h
1/16
1/32
1/64
1/128
1/256
1/512
1/1024

wh (2)
73.97737456
74.52476636
74.67796896
74.71845965
74.72886509
74.73150235
74.73216618

h
0.9/16
0.9/32
0.9/64
0.9/128
0.9/256
0.9/512
0.9/1024

wh (0.9)
3.07177583
3.40358568
3.56283111
3.61900128
3.63543217
3.63982794
3.64096008

h
1/8
1/16
1/32
1/64
1/128
1/256
1/512

wh (2)
-1.05055756
-1.04814837
-1.04763533
-1.04751648
-1.04748784
-1.04748081
-1.04747907

h
1/16
1/32
1/64
1/128
1/256
1/512
1/1024

wh (2)
3.37040343
3.37021716
3.37016982
3.37015788
3.37015489
3.37015413
3.37015395

|w2h (5)x(5)|
|wh (5)x(5)|

4.842628
4.242606
4.087196
4.036182
4.016353
4.007756
|w2h (2)x(2)|
|wh (2)x(2)|

3.636483
3.815222
3.907003
3.953372
3.976657
3.988322
|w2h (0.9)x(0.9)|
|wh (0.9)x(0.9)|

2.395580
3.028288
3.514098
3.779628
3.900687
3.953888
|wh (2)wh/2 (2)|
|wh/2 (2)wh/4 (2)|

4.695957
4.316505
4.150401
4.073274
4.036161

|wh (2)wh/2 (2)|


|wh/2 (2)wh/4 (2)|

3.934035
3.967252
3.983689
3.991860
3.995934

13. O(h3 )

i
book 2005/4/7 22:31 page S-55 #76

Selected answers for Section 7.4

15.

ti
0.00
1.00
2.00
3.00
4.00
5.00

Euler, h = 1/4
wi
Error
1.00000000 0.000000
1.33902556 0.075188
2.17191960 0.064148
3.11263856 0.049639
4.08339525 0.039710
5.06611825 0.032901

17. (a)

Heun, h = 1/2
wi
Error
1.00000000 0.000000
1.42167812 0.007465
2.24114824 0.005080
3.16589104 0.003613
4.12587976 0.002774
5.10126336 0.002244

ti
1.00
2.00
3.00
4.00
5.00
6.00

Taylor 4th,
wi
1.00000000
3.38633652
6.29590332
9.54526676
13.04730145
16.75069118

h = 1/5
Error
0.000000
0.000042
0.000066
0.000089
0.000112
0.000134

ti
0.00
1.00
2.00
3.00
4.00
5.00

Taylor 4th,
wi
1.00000000
1.41306075
2.23481119
3.16126851
4.12229474
5.09834937

h = 1/5
Error
0.000000
0.001153
0.001257
0.001009
0.000811
0.000670

ti
1.00
1.80
2.60
3.40
4.20
5.00

Taylor 4th,
wi
1.44269504
0.43983618
0.23590318
0.15491306
0.11284715
0.08755650

h = 1/5
Error
0.000000
0.006125
0.002613
0.001481
0.000972
0.000698

(b)

(c)

S-55

RK4, h = 1
wi
Error
1.00000000 0.000000
1.41904762 0.004834
2.23940304 0.003335
3.16464758 0.002370
4.12492445 0.001819
5.10049047 0.001471

RK4, h = 1/5
wi
Error
1.00000000 0.000000
3.38627234 0.000022
6.29580194 0.000035
9.54513044 0.000047
13.04713066 0.000059
16.75048607 0.000071
RK4, h = 1/5
wi
Error
1.00000000 0.000000
1.41421742 0.000004
2.23607075 0.000003
3.16227963 0.000002
4.12310714 0.000002
5.09902074 0.000001
RK4, h = 1/5
wi
Error
1.44269504 0.000000
0.43373667 0.000025
0.23330123 0.000011
0.15343868 0.000006
0.11187894 0.000004
0.08686196 0.000003

19. (a) Rate of convergence is O(h4 )


(b) To within roundo error, the fourth-order Runge-Kutta method approximation is exact for any step size
(c) The error term for the fourth-order Runge-Kutta method involves the fth
derivative of the solution; in part (b), the fth derivative of the solution is
identically zero.
21. (a) Rate of convergence is O(h4 )
(b) To within roundo error, the fourth-order Runge-Kutta method approximation is exact for any step size
(c) The error term for the fourth-order Runge-Kutta method involves the fth

i
book 2005/4/7 22:31 page S-56 #77

S-56

Answers to Selected Exercises for Chapter 7

derivative of the solution; in part (b), the fth derivative of the solution is
identically zero.
23. The new equilibrium level is roughly 1.085; hence, the gene stays on.
25. The temperature of the plate is within 1% of the temperature of the furnace
at around 54.4 seconds.
Section 7.5 (page 595)
5. In each case, the optimal RK2 method was used to generate w1 .
wi
(b) ti
wi
(c) ti
wi
(a) ti
0.00 1.00000000
1.00 1.00000000
0.00 0.00000000
0.25 0.79933449
1.40 1.28279891
0.33 0.45990485
0.50 0.67246436
1.80 1.98867507
0.67 1.31962255
0.75 0.56126456
2.20 5.60037626
1.00 6.84444308
1.00 0.46556988
2.60 12.33057047
3.00 25.71844588
(d)

ti
1.00
1.60
2.20
2.80
3.40
4.00

wi
0.00000000
0.52285714
0.93913316
1.47027176
2.22989974
3.47208967

7. (a)

ti
0.00
0.17
0.33
0.50
0.67
0.83
1.00

wi
1.00000000
0.85608541
0.74386886
0.65106236
0.57123580
0.50108073
0.43860757

(b)

ti
1.00
1.33
1.67
2.00
2.33
2.67
3.00

wi
1.00000000
0.76567618
1.55646685
3.62206377
7.68756645
14.98283005
27.00734411

(c)

ti
0.00
0.17
0.33
0.50
0.67
0.83
1.00

wi
0.00000000
0.19819551
0.48391475
0.96996226
1.12133256
1.55731836
33.86018244

(d)

ti
1.00
1.50
2.00
2.50
3.00
3.50
4.00

wi
0.00000000
0.42961951
0.83123943
1.30415596
1.95403769
3.02101025
5.25730823

(e)

ti
0.00
0.17
0.33
0.50
0.67
0.83
1.00

wi
0.00000000
0.16824274
0.34686353
0.55171559
0.81561027
1.22576787
2.10454269

(f)

ti
1.00
1.17
1.33
1.50
1.67
1.83
2.00

wi
2.00000000
1.74114494
1.59747693
1.50570423
1.44099767
1.39463924
1.35962371

(e)

9. (a) O(h4 ), i = h90 y (5) ()


2
(c) O(h2 ), i = h3 y (3) ()

ti
0.00
0.25
0.50
0.75
1.00

wi
0.00000000
0.25520833
0.53061930
0.88956661
1.48298647

(f)

ti
1.00
1.33
1.67
2.00

wi
2.00000000
1.64529267
1.64788939
1.53528326

(b) O(h2 ), i = 2h3 y (3) ()


4
(5)
(d) O(h4 ), i = 3h
()
80 y

i
book 2005/4/7 22:31 page S-57 #78

Selected answers for Section 7.5


2

(e) O(h2 ), i = 2h9 y (3) ()


11. (a)

(b)

(c)

(d)

(e)

h
5/64
5/128
5/256
5/512
5/1024
5/2048
5/4096

wh (5)
51.40425171
51.40446442
51.40448609
51.40448760
51.40448770
51.40448770
51.40448771

h
5/64
5/128
5/256
5/512
5/1024
5/2048
5/4096

wh (6)
16.75062619
16.75056238
16.75055721
16.75055684
16.75055682
16.75055682
16.75055682

h
5/64
5/128
5/256
5/512
5/1024
5/2048
5/4096

wh (5)
5.09901364
5.09901912
5.09901949
5.09901951
5.09901951
5.09901951
5.09901951

h
1/8
1/16
1/32
1/64
1/128
1/256
1/512

wh (2)
-1.04752298
-1.04747276
-1.04747792
-1.04747845
-1.04747849
-1.04747849
-1.04747849

h
1/16
1/32
1/64
1/128
1/256
1/512
1/1024

wh (2)
3.37014881
3.37015349
3.37015386
3.37015388
3.37015388
3.37015388
3.37015388

S-57

(f) O(h2 ), i = 5h8 y (3) ()


|w2h (5)x(5)|
|wh (5)x(5)|

10.136597
14.439962
15.637848
15.929598
15.992187
16.040270
|w2h (6)x(6)|
|wh (6)x(6)|

12.457936
14.014095
14.943258
15.454346
15.725404
15.932747
|w2h (5)x(5)|
|wh (5)x(5)|

14.865821
15.763228
15.967595
16.005758
16.014934
15.965278
|wh (2)wh/2 (2)|
|wh/2 (2)wh/4 (2)|

9.723000
9.762726
13.863798
15.127961
15.608594

|wh (2)wh/2 (2)|


|wh/2 (2)wh/4 (2)|

12.766941
14.269407
15.100320
15.540741
15.780188

i
book 2005/4/7 22:31 page S-58 #79

S-58

Answers to Selected Exercises for Chapter 7

13. (a)
ti
0.00
0.30
0.60
0.90

AB2, h = 0.01
wi
Error
0.00000000 0.000000
0.27025337 0.000048
0.59029138 0.000382
3.41762626 0.223717

ti
1.00
2.00
3.00
4.00
5.00

AB2, h = 1/8
wi
Error
1.44269504 0.000000
0.38570933 0.025036
0.19773794 0.011701
0.12702571 0.006801
0.09137321 0.004514

Taylor 2nd,
wi
1.44269504
0.44610921
0.22285703
0.14090817
0.10033612

h = 1/4
Error
0.000000
0.085435
0.036820
0.020684
0.013477

ti
0.00
1.00
2.00
3.00

AB2, h = 1/8
wi
error
0.50000000 0.000000
1.26848940 0.000452
2.11900755 0.000195
3.04751103 0.000085

Taylor 2nd,
wi
0.50000000
1.26807529
2.11882837
3.04756672

h = 1/4
error
0.000000
0.000866
0.000375
0.000141

ti
1.00
1.25
1.50
1.75
2.00

AB2, h = 1/16
wi
Error
0.00000000 0.000000
1.79613452 0.088780
8.51652599 0.410723
27.29017539 1.187193
71.94880689 2.783581

Taylor 2nd,
wi
0.00000000
1.73559475
8.30280381
26.71671192
70.63811735

ti
0.00
0.30
0.60
0.90

AB4, h = 1/40
wi
Error
0.00000000 0.000000
0.27029871 0.000003
0.59060273 0.000070
3.36736561 0.273978

ti
1.00
2.00
3.00
4.00
5.00

AB4, h = 1/8
wi
Error
1.44269504 0.000000
0.36874827 0.008075
0.18919231 0.003155
0.12198821 0.001764
0.08801030 0.001151

(b)

(c)

(d)

15. (a)

(b)

Taylor 2nd,
wi
0.00000000
0.27022260
0.59006321
3.33203352

h = 0.02
Error
0.000000
0.000079
0.000610
0.309310

h = 1/8
Error
0.000000
0.149320
0.624445
1.760657
4.094271

RK4, h = 1/10
wi
Error
0.00000000 0.000000
0.27030138 0.000000
0.59067214 0.000001
3.49022244 0.151121
RK4, h = 1/2
wi
Error
1.44269504 0.000000
0.34917427 0.011499
0.18141971 0.004617
0.11764541 0.002579
0.08517270 0.001686

i
book 2005/4/7 22:31 page S-59 #80

Selected answers for Section 7.5

(c)
ti
0.00
1.00
2.00
3.00

AB4, h = 1/16
wi
Error
0.50000000 0.00000000
1.26894188 0.00000046
2.11920278 0.00000014
3.04742567 0.00000021

ti
1.00
1.25
1.50
1.75
2.00

AB4, h = 1/32
wi
Error
0.00000000 0.000000
1.88479397 0.000121
8.92668601 0.000563
28.47584661 0.001522
74.72906016 0.003328

ti
0.00
0.30
0.60
0.90

Adams PC4,
wi
0.00000000
0.27029871
0.59060273
3.36736561

ti
1.00
2.00
3.00
4.00
5.00

Adams PC4,
wi
1.44269504
0.42998497
0.23542897
0.14216907
0.09895853

h = 1/4
Error
0.000000
0.069311
0.049392
0.021944
0.012100

RK4, h = 1/2
wi
Error
1.44269504 0.000000
0.34917427 0.011499
0.18141971 0.004617
0.11764541 0.002579
0.08517270 0.001686

ti
0.00
1.00
2.00
3.00

Adams PC4,
wi
0.50000000
1.26894754
2.11920048
3.04742198

h = 1/8
Error
0.000000
0.000006
0.000002
0.000004

RK4, h = 1/4
wi
Error
0.50000000 0.000000
1.26894214 0.000001
2.11920472 0.000002
3.04742782 0.000002

ti
1.00
1.25
1.50
1.75
2.00

Adams PC4,
wi
0.00000000
1.88426289
8.92125957
28.45927622
74.69080213

h = 1/16
Error
0.000000
0.000652
0.005990
0.018092
0.041586

RK4, h = 1/8
wi
Error
0.00000000 0.000000
1.88383671 0.001078
8.92331721 0.003932
28.46770490 0.009664
74.71271684 0.019671

(d)

17. (a)

(b)

(c)

(d)

h = 1/40
Error
0.000000
0.000003
0.000070
0.273978

S-59

RK4, h = 1/4
wi
Error
0.50000000 0.00000000
1.26894214 0.00000072
2.11920472 0.00000180
3.04742782 0.00000195
RK4, h = 1/8
wi
Error
0.00000000 0.000000
1.88383671 0.001078
8.92331721 0.003932
28.46770490 0.009664
74.71271684 0.019671

RK4, h = 1/20
wi
Error
0.00000000 0.00000000
0.27030124 0.00000001
0.59067321 0.00000015
3.61653462 0.02480874

19. (a) Rate of convergence is O(h4 )


(b) To within roundo error, the approximate solution is exact for any step

i
book 2005/4/7 22:31 page S-60 #81

S-60

Answers to Selected Exercises for Chapter 7

size
(c) The error term for the four-step Adams-Bashforth method involves the
fth derivative of the solution; in part (b), the fth derivative of the solution
is identically zero.
21. (a) Rate of convergence is O(h4 )
(b) To within roundo error, the approximate solution is exact for any step
size
(c) The error term for the four-step Adams-Bashforth method involves the
fth derivative of the solution; in part (b), the fth derivative of the solution
is identically zero.
(d) Results are identical to parts (a), (b) and (c).
23. Using the four-step Adams-Bashforth method:
z
0.000 0.005 0.010 0.015 0.020 0.025
Mc 0.0160 0.0165 0.0171 0.0176 0.0182 0.0188
z
0.045 0.050 0.055 0.060 0.065 0.070
Mc 0.0213 0.0220 0.0228 0.0235 0.0243 0.0250
z
0.090 0.095 0.100 0.105 0.110 0.115
Mc 0.0284 0.0293 0.0303 0.0313 0.0323 0.0333
z
0.135 0.140 0.145 0.150 0.155 0.160
Mc 0.0378 0.0390 0.0402 0.0415 0.0429 0.0442
z
0.180 0.185 0.190 0.195 0.200
Mc 0.0501 0.0517 0.0534 0.0550 0.0568

0.030
0.0194
0.075
0.0258
0.120
0.0344
0.165
0.0456

0.035
0.0200
0.080
0.0267
0.125
0.0355
0.170
0.0471

0.040
0.0207
0.085
0.0275
0.130
0.0366
0.175
0.0486

Section 7.6 (page 607)



2h
3. Since (f, ti , wi , h) = 14 f (ti , wi )+ 34 f ti + 2h
3 , wi + 3 f (ti , wi ) it follows that
(f, ti , yi , 0) = f (ti , wi ) and the optimal RK2 method is consistent. Further2
more, is Lipschitz with constant L = L + h02L ; consequently, the method
is stable and convergent. Finally, since the local truncation error is O(h2 ), it
follows that the global error is also O(h2 ).
p1

5. Since (f, ti , wi , h) = f (ti , wi ) + h2 f  (ti , wi ) + + h p! f (p) (ti , wi ), it follows


that (f, ti , yi , 0) = f (ti , wi ) and the Taylor methodof order p is consis
p1
tent. Furthermore, is Lipschitz with constant L = L 1 + h2 + + h p! ;
consequently, the method is stable and convergent. Finally, since the local
truncation error is O(hp ), it follows that the global error is also O(hp ).
7. Since a1 + a2 = 1 and a1 2a2 + b0 = 0, the method is consistent. The
characteristic polynomial for the method is 2 43 + 13 , whose roots are 1
and 13 . Hence, the method is stable (strongly) and convergent.
9. Since a1 + a2 = 1 and a1 2a2 + b0 + b1 + b2 = 0, the method is consistent.
The characteristic polynomial for the method is 2 12 12 , whose roots are
1 and 12 . Hence, the method is stable (strongly) and convergent.

i
book 2005/4/7 22:31 page S-61 #82

Selected answers for Section 7.7

S-61

11. Since a1 + a2 = 1 and a1 2a2 + b2 = 0, the method is consistent. The


characteristic polynomial for the method is 2 4 + 3, whose roots are 1
and 3. Hence, the method is neither stable nor convergent.
15. Sawtooth oscillations begin around t = 15.
Section 7.7 (page 621)
wi
ti
1.112963 1.232078
1.217664 1.457464
1.332912 1.715946

(b)

ti
wi
0.250000 1.030776
0.417314 1.083582
0.583334 1.157704

ti
wi
0.031687 1.456815
0.059247 1.423842
0.090068 1.391101

(e)

ti
wi
0.090799 0.090056
0.189868 0.183261
0.298554 0.274120

3. (a)

ti
1.045957
1.091915
1.137872
1.183830
1.229787
1.275744

wi
1.092955
1.187930
1.284840
1.383606
1.484157
1.586426

(b)

ti
0.033408
0.066817
0.100225
0.133634
0.167042
0.200451

wi
1.000558
1.002230
1.005010
1.008889
1.013856
1.019892

(d)

ti
0.006714
0.013428
0.020143
0.026857
0.033571
0.040285

wi
1.490318
1.480934
1.471835
1.463006
1.454436
1.446112

(e)

ti
0.017138
0.034275
0.051413
0.068551
0.085688
0.102826

wi
0.017133
0.034235
0.051278
0.068230
0.085064
0.101750

ti
wi
1.045367 1.091753
1.085434 1.174418
1.127126 1.262009

(b)

ti
wi
0.096570 1.004653
0.186522 1.017248
0.286991 1.040370

ti
wi
0.006999 1.489913
0.013829 1.480383
0.020904 1.470820

(e)

ti
wi
0.069104 0.068775
0.113738 0.112285
0.166335 0.161857

1. (a)

(d)

5. (a)

(d)

(c)

ti
wi
0.131556 0.302483
0.260969 0.359698
0.408572 0.430094

(c)

ti
0.038669
0.077339
0.116008
0.154678
0.193347
0.229660

(c)

ti
wi
0.079362 0.280922
0.146974 0.309028
0.221516 0.341732

wi
0.264779
0.280106
0.295963
0.312328
0.329175
0.345406

i
book 2005/4/7 22:31 page S-62 #83

S-62

Answers to Selected Exercises for Chapter 7

7. (a)

ti
1.065145
1.130290
1.195435
1.260580

wi
1.132324
1.268659
1.408752
1.552397

(b)

ti
0.084390
0.168781
0.253171
0.337562

wi
1.003561
1.014131
1.031508
1.055359

(d)

ti
0.008082
0.016164
0.024245
0.032327

wi
1.488386
1.477194
1.466407
1.456001

(e)

ti
0.024593
0.049185
0.073778
0.098370

wi
0.024578
0.049059
0.073363
0.097406

(c)

ti
0.080373
0.160746
0.241119
0.321493

wi
0.281302
0.314894
0.350534
0.387918

9. Although x(t) 1 for t > 0.05, the time steps remain between roughly 0.03
and 0.04.
11. Although x(t) is roughly linear for t > 0.05, the time steps remain between
roughly 0.10 and 0.15.
13. RKF45: 66 function evaluations; RKV56: 56 function evaluations;
VS PC4: 72 function evaluations.
15. RKF45: 954 function evaluations; RKV56: 1144 function evaluations;
VS PC4: 930 function evaluations.
17. RKF45: 84 function evaluations; RKV56: 72 function evaluations;
VS PC4: 104 function evaluations.

Section 7.8 (page 631)


1. (a)

ti
0.25
0.50
0.75
1.00

xi
1.750000
1.500000
1.265625
1.054688

yi
1.000000
0.937500
0.843750
0.738281

(c)

ti
0.25
0.50
0.75
1.00

xi
1.750000
2.812500
4.359375
6.644531

yi
1.250000
1.687500
2.390625
3.480469

(d)

ti
0.25
0.50
0.75
1.00

xi
1.000000
0.906250
0.765625
0.615662

yi
0.625000
0.343750
0.165771
0.075028

(b)

ti
0.25
0.50
0.75
1.00

xi
0.750000
0.546875
0.356155
0.155121

yi
0.250000
0.433594
0.549933
0.597393

zi
0.750000
0.562500
0.421875
0.316406
zi
1.000000
0.906250
0.757568
0.599906

i
book 2005/4/7 22:31 page S-63 #84

Selected answers for Section 7.8

3. (a)

ti
0.25
0.50
0.75
1.00
(c) ti
0.25
0.50
0.75
1.00

xi
1.752279
1.516294
1.298973
1.103606
xi
1.938314
3.420947
5.815040
9.722662

yi
0.973470
0.909751
0.826592
0.735712
yi
1.358561
2.013745
3.143710
5.045278

(d)

ti
0.25
0.50
0.75
1.00

xi
0.960566
0.868592
0.755415
0.641364

yi
0.673079
0.441209
0.290916
0.200770

5. (a)

ti
0.25
0.50
0.75
1.00
1.25
1.50

xi
1.752279
1.516294
1.298973
1.103081
0.930638
0.780168

yi
-0.973470
-0.909751
-0.826592
-0.734979
-0.643869
-0.556664

(c)

ti
0.25
0.50
0.75
1.00
1.25
1.50

xi
1.938314
3.420947
5.815040
9.684089
15.987666
26.307773

(d)

ti
0.25
0.50
0.75
1.00
1.25
1.50

xi
0.960566
0.868592
0.755415
0.641156
0.534549
0.445351

ti
0.25
0.50
0.75
1.00

xi
0.774353
0.575159
0.376635
0.160449

(b)

ti
0.25
0.50
0.75
1.00
1.25
1.50

xi
0.774353
0.575159
0.376635
0.161088
-0.084025
-0.359521

yi
0.220174
0.380959
0.479216
0.515125

zi
0.778809
0.606543
0.472381
0.367894

zi
0.958149
0.856921
0.731669
0.606911

yi
-1.358561
-2.013745
-3.143710
-5.026095
-8.137218
-13.265638
yi
0.673079
0.441209
0.290916
0.197267
0.145231
0.119071

(b)

S-63

yi
0.220174
0.380959
0.479216
0.513028
0.492892
0.414141

zi
0.778809
0.606543
0.472381
0.368101
0.286769
0.223503

zi
0.958149
0.856921
0.731669
0.609411
0.493986
0.399363

7. (a) Let u1 = x, u2 = x , and u3 = x . Then u1 = u2 , u2 = u3 , and


u3 = 4u3 5u2 .
(b) Let u1 = x, u2 = x , u3 = x , and u4 = x . Then u1 = u2 , u2 = u3 ,
u3 = u4 , and u4 = u1 .
(c) Let u1 = x, u2 = x , and u3 = x . Then u1 = u2 , u2 = u3 , and

i
book 2005/4/7 22:31 page S-64 #85

S-64

Answers to Selected Exercises for Chapter 7

u3 = 12 u1 u3 .
(d) Let u1 = x, u2 = x , and u3 = x . Then u1 = u2 , u2 = u3 , and
u3 = u2 ln(u3 ) + sin(u1 ).
(e) Let u1 = x and u2 = x . Then u1 = u2 and u2 = 1 sin(u1 u2 ).
(f) Let u1 = x, u2 = x , u3 = x , and u4 = x . Then u1 = u2 , u2 = u3 ,

u3 = u4 , and u4 = cos(u4 ) u1 u3 .


9. (a)

ti
0.25
0.50
0.75
1.00

xi
0.000000
0.062500
0.187500
0.375000

xi
0.250000
0.500000
0.750000
0.998047

(b)

ti
0.25
0.50
0.75
1.00

xi
1.000000
0.937500
0.875000
0.832031

xi
0.250000
0.250000
0.171875
0.093750

(c)

ti
0.25
0.50
0.75
1.00

xi
0.525000
0.523438
0.488780
0.415116

xi
0.006250
0.138632
0.294653
0.472913

(d)

ti
0.25
0.50
0.75
1.00

xi
1.000000
0.937500
0.890463
0.861833

xi
0.250000
0.188149
0.114519
0.052206

11. (a)

ti
0.25
0.50
0.75
1.00

xi
0.031250
0.124878
0.280280
0.495915

xi
0.249919
0.498702
0.743479
0.979697

(b)

ti
0.25
0.50
0.75
1.00

xi
0.977376
0.934890
0.893290
0.860030

xi
0.149740
0.175915
0.151642
0.113507

(c)

ti
0.25
0.50
0.75
1.00

xi
0.510637
0.488550
0.428281
0.324666

xi
0.019033
0.161247
0.324286
0.508194

xi
1.000000
1.000000
0.992188
0.968933
xi
0.000000
0.312500
0.312500
0.214844

xi
0.998699
0.989644
0.965516
0.920363
xi
0.2879232
0.029210
0.140117
0.153877

i
book 2005/4/7 22:31 page S-65 #86

Selected answers for Section 7.8

(d)

ti
0.25
0.50
0.75
1.00

xi
0.978673
0.943086
0.912491
0.892660

xi
0.131815
0.138463
0.101970
0.056670

13. (a)

ti
0.25
0.50
0.75
1.00
1.25
1.50

xi
0.031250
0.124878
0.280280
0.496060
0.769130
1.094992

xi
0.249919
0.498702
0.743479
0.979586
1.201053
1.402008

(b)

ti
0.25
0.50
0.75
1.00
1.25
1.50

xi
0.977376
0.934890
0.893290
0.856814
0.835210
0.816912

xi
-0.149740
-0.175915
-0.151642
-0.106539
-0.072999
-0.042630

(c)

ti
0.25
0.50
0.75
1.00
1.25
1.50

xi
0.510637
0.488550
0.428281
0.324882
0.172748
-0.034510

xi
-0.019033
-0.161247
-0.324286
-0.508051
-0.714990
-0.942232

(d)

ti
0.25
0.50
0.75
1.00
1.25
1.50

xi
0.978673
0.943086
0.912491
0.888364
0.886617
0.868791

xi
-0.131815
-0.138463
-0.101970
-0.040857
-0.029003
0.061348

S-65

xi
0.998699
0.989644
0.965516
0.919958
0.850036
0.756631
xi
-0.2879232
0.029210
0.140117
0.142084
0.115945
0.085962

15. Using the RKF45 method (with hmin = 0.001, hmax = 0.5 and T OL =
5 107 ), F (30) = 0.057463 and C(30) = 0.347206.
17.

0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
period 2.009 2.012 2.019 2.027 2.039 2.053 2.070 2.091 2.114 2.141
0
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2.0
period 2.170 2.204 2.243 2.285 2.332 2.385 2.445 2.510 2.584 2.668

i
book 2005/4/7 22:31 page S-66 #87

S-66

Answers to Selected Exercises for Chapter 7

19. 
2.00
2.25
2.50
2.75
3.00
3.25
3.50
3.75
4.00
period 7.630 7.920 8.225 8.540 8.856 9.190 9.520 9.860 10.210

4.25
4.50
4.75
5.00
5.25
5.50
5.75
6.00
period 10.550 10.900 11.260 11.610 11.974 12.330 12.698 13.062

21. Using the RKF45 method (with hmin = 0.001, hmax = 0.5 and T OL = 5
107 ), x(20) = 3.563594, x (20) = 4.709370107 and x (20) = 4.432607
107 .
23. Using the RKF45 method (with hmin = 0.001, hmax = 0.5 and T OL = 5
107 ), (30) = 0.250327,  (30) = 0.018103, x(30) = 2.336166, and z(30) =
29.826942.
Section 7.9 (page 652)
1. (a) Q(z) = 1 + z + 12 z 2 + 16 z 3 +
4

3. (a) Q(z, h) = z
5. (a) Q(z, h) = z 4

1 4
1 5
(b) 3.2170
24 z + 120 z
55
59
37
9
3
2
(1 + 24 h)z + 24 hz 24 hz + 24
h
8
4
8
3
2
3 hz + 3 hz 3 hz 1
2
4
1
2
3 h)z 3 z +
3

7. (a) Q(z, h) = (1
(b) The roots of Q(z, h) are (2
(c) When h < 12 , 1 + 2h < 0.

1 + 2h)/(3 2h).

9. In each case, Newtons method was terminated with a


of 5 107 .
wi
(b) ti
wi
(c)
(a) ti
0.00 1.00000000
1.00 1.00000000
0.25 0.79155430
1.40 0.74347636
0.50 0.64428813
1.80 2.20601958
0.75 0.52825556
2.20 5.87415138
1.00 0.43211485
2.60 13.43032779
3.00 27.34534677
(d)

ti
1.00
1.60
2.20
2.80
3.40
4.00

wi
0.00000000
0.54272902
1.08124238
1.85143514
3.48686151
6.44425098

(e)

ti
0.00
0.25
0.50
0.75
1.00

< h < 0

wi
0.00000000
0.25895147
0.56703514
1.09635152
1.14337706

(f)

convergence tolerance
ti
wi
0.00 0.00000000
0.33 0.53634398
0.67 1.56173287
1.00 56.18855622

ti
1.00
1.33
1.67
2.00

wi
2.00000000
1.53334437
1.38613456
1.31209391

11. (a) Q(h) = 1 + h


1
1
> 1000
, Q(h) = 37 and spurious
(b) For IVP#1, with tf = 0.5 and h = 700
oscillations are apparent for 0 < t < 0.02. For IVP#2, with tf = 1 and h =
1
1
14
25 > 39 , Q(h) = 25 and spurious oscillations are apparent for 0 < t < 0.3.
13. (a) For the rst initial value problem, absolute stability requires h <
1
.
the second and third problems, absolute stability requires h < 39

1
200 ;

for

i
book 2005/4/7 22:31 page S-67 #88

Selected answers for Section 7.9

S-67

15. The backward Euler method introduces no spurious oscillations into the approximate solution. Both the amplitude and the duration of the oscillations
introduced by the Trpaezoidal method increase with increasing h. For the
second-order backward dierentiation formula, the amplitude and duration
of the oscillations decrease with increasing h.

You might also like