Documente Academic
Documente Profesional
Documente Cultură
Week 11 Solutions
Burden & Faires §5.6: 1b, 3b, 7, 9, 12
Burden & Faires §5.7: 1b, 3b, 5
Burden & Faires §5.8: 1b, 3b, 4
y(t0 ) = 1.0000000
y(t1 ) = 1.1909091
y(t2 ) = 1.3666667
y(t3 ) = 1.5307692
y(t4 ) = 1.6857143
w0 = 1.0000000
w1 = 1.1909091
h
wi+1 = wi + [3f (ti , wi ) − f (ti−1 , wi−1 )]
2
for i ≥ 1. Thus we get:
w0 = 1.0000000
w1 = 1.1909091
w2 = 1.3648760
w3 = 1.5281685
w4 = 1.6826555
w5 = 1.8300568
w6 = 1.9716512
w7 = 2.1084333
w8 = 2.2411849
w9 = 2.3705285
w10 = 2.4969658.
w0 = 1.0000000
w1 = 1.1909091
w2 = 1.3666667
h
wi+1 = wi + [23f (ti , wi ) − 16f (ti−1 , wi−1 ) + 5f (ti−2 , wi−2 )]
12
1
for i ≥ 2. Thus we get:
w0 = 1.0000000
w1 = 1.1909091
w2 = 1.3666667
w3 = 1.5312423
w4 = 1.6863578
w5 = 1.8341075
w6 = 1.9758148
w7 = 2.1125880
w8 = 2.2452510
w9 = 2.3744624
w10 = 2.5007431.
w0 = 1.0000000
w1 = 1.1909091
w2 = 1.3666667
w3 = 1.5307692
h
wi+1 = wi + [55f (ti , wi ) − 59f (ti−1 , wi−1 ) + 37f (ti−2 , wi−2 ) − 9f (ti−3 , wi−3 )]
24
for i ≥ 3. Thus we get:
w0 = 1.0000000
w1 = 1.1909091
w2 = 1.3666667
w3 = 1.5307692
w4 = 1.6855637
w5 = 1.8331397
w6 = 1.9747539
w7 = 2.1115202
w8 = 2.2441958
w9 = 2.3734479
w10 = 2.4997728
w0 = 1.0000000
w1 = 1.1909091
w2 = 1.3666667
w3 = 1.5307692
w4 = 1.6857143
h
wi+1 = wi + [1901f (ti , wi ) − 2774f (ti−1 , wi−1 ) + 2616f (ti−2 , wi−2 )
720
−1274f (ti−3 , wi−3 ) + 251f (ti−4 , wi−4 )]
2
for i ≥ 4. Thus we get:
w0 = 1.0000000
w1 = 1.1909091
w2 = 1.3666667
w3 = 1.5307692
w4 = 1.6857143
w5 = 1.8333882
w6 = 1.9750671
w7 = 2.1118568
w8 = 2.2445255
w9 = 2.3737733
w10 = 2.5000769
y(t0 ) = 1.0000000
y(t1 ) = 1.1909091
y(t2 ) = 1.3666667
y(t3 ) = 1.5307692
y(t4 ) = 1.6857143
y(t5 ) = 1.8333333
y(t6 ) = 1.9750000
y(t7 ) = 2.1117647
y(t8 ) = 2.2444444
y(t9 ) = 2.3736842
y(t10 ) = 2.5000000
3. Use each of the Adams-Bashforth methods to approximate the solution to the following initial-value
problem. In each case use starting values obtained from the Runge-Kutta method of order four.
Compare the results to the actual values.
b.
y 0 = 1 + y/t + (y/t)2 , 1 ≤ t ≤ 3, y(1) = 0, with h = 0.2;
actual solution y(t) = t tan(ln t).
y(t0 ) = 0.0000000
y(t1 ) = 0.2212428
y(t2 ) = 0.4896817
y(t3 ) = 0.8127527
y(t4 ) = 1.1994386
3
ti 2-step 3-step 4-step 5-step exact
1.0 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
1.2 0.2212457 0.2212457 0.2212457 0.2212457 0.2212428
1.4 0.4867550 0.4896842 0.4896842 0.4896842 0.4896817
1.6 0.8054881 0.8124317 0.8127522 0.8127522 0.8127527
1.8 1.1856931 1.1982110 1.1990422 1.1994320 1.1994386
2.0 1.6377944 1.6584313 1.6603060 1.6613179 1.6612818
2.2 2.1753785 2.2079987 2.2117448 2.2134792 2.2135018
2.4 2.8163947 2.8667672 2.8735320 2.8762776 2.8765514
2.6 3.5849181 3.6617484 3.6733266 3.6777236 3.6784753
2.8 4.5138420 4.6305275 4.6498937 4.6570033 4.6586651
3.0 5.6491203 5.8268008 5.8589944 5.8706101 5.8741000
4
ti wi iterations y(ti )
0.00 1.0000000 0 1.0000000
0.01 1.0275591 0 1.0275591
0.02 1.0558993 0 1.0558993
0.03 1.0850661 3 1.0850661
0.04 1.1151093 3 1.1151093
0.05 1.1460831 3 1.1460831
0.06 1.1780471 3 1.1780470
0.07 1.2110665 3 1.2110664
0.08 1.2452136 3 1.2452135
0.09 1.2805681 3 1.2805679
0.10 1.3172184 3 1.3172182
0.11 1.3552633 3 1.3552631
0.12 1.3948131 3 1.3948128
0.13 1.4359917 3 1.4359913
0.14 1.4789390 3 1.4789386
0.15 1.5238140 3 1.5238134
0.16 1.5707977 3 1.5707970
0.17 1.6200983 3 1.6200973
0.18 1.6719560 3 1.6719548
0.19 1.7266508 3 1.7266493
0.20 1.7845111 3 1.7845092
So, with Newton’s method, one less iteration is necessary at each step.
9.
a. Derive Eq. (5.32) by using the Lagrange form of the interpolating polynomial.
b. Derive Eq. (5.34) by using Newton’s backward-difference form of the interpolating polynomial.
Solution. a. Letting P (t) be the Lagrange form of the interpolating polynomial, we calculate:
Z ti+1
y(ti+1 ) ≈ y(ti ) + P (t) dt
ti
Z ti +h
(f (ti , y(ti )) − f (ti−1 , y(ti−1 )))t
= y(ti ) +
ti h
f (ti , y(ti ))h + f (ti−1 , y(ti−1 ))ti − f (ti , y(ti ))ti
+ dt
h
1
(f (ti , y(ti )) − f (ti−1 , y(ti−1 ))) (ti + h)2 − t2i + f (ti , y(ti ))h
= y(ti ) +
2h
+f (ti−1 , y(ti−1 ))ti − f (ti , y(ti ))ti
h
= y(ti ) + (3f (ti , y(ti )) − f (ti−1 , y(ti−1 )))
2
5
culate:
Z ti+1 3
X −s
y(ti+1 ) ≈ y(ti ) + (−1)k ∇k f (ti , y(ti ))h ds
ti k
k=0
3 Z 1
X
k k −s
= y(ti ) + ∇ f (ti , y(ti ))h(−1) ds
0 k
k=0
1 5 2 3 3
= y(ti ) + h f (ti , y(ti )) + ∇f (ti , y(ti )) + ∇ f (ti , y(ti )) + ∇ f (ti , y(ti ))
2 12 8
1
= y(ti ) + h f (ti , y(ti )) + [f (ti , y(ti )) − f (ti−1 , y(ti−1 ))]
2
5
+ [f (ti , y(ti )) − 2f (ti−1 , y(ti−1 )) + f (ti−2 , y(ti−2 ))]
12
3
+ [f (ti , y(ti )) − 3f (ti−1 , y(ti−1 )) + 3f (ti−2 , y(ti−2 )) − f (ti−3 , y(ti−3 ))]
8
h
= y(ti ) + [55f (ti , y(ti )) − 59f (ti−1 , y(ti−1 )) + 37f (ti−2 , y(ti−2 ))
24
−9f (ti−3 , y(ti−3 ))]
Solution.
Z ti+1
y(ti+1 ) − y(ti−1 ) = f (t, y(t)) dt
ti−1
h
≈ [f (ti−1 , y(ti−1 )) + 4f (ti , y(ti )) + f (ti+1 , y(ti+1 ))]
3
Solution. b. Applying the Adams Variable Step-Size Predictor-Corrector Algorithm, we get the
following results:
6
ti wi hi y(ti )
2.00000000 1.00000000 0.00000000 1.00000000
2.06250000 1.12132350 0.06250000 1.12132353
2.12500000 1.23611106 0.06250000 1.23611111
2.18750000 1.34539468 0.06250000 1.34539474
2.25000000 1.45000191 0.06250000 1.45000000
2.31250000 1.55059834 0.06250000 1.55059524
2.37500000 1.64773110 0.06250000 1.64772727
2.43750000 1.74185207 0.06250000 1.74184783
2.53110962 1.87799224 0.09360962 1.87798852
2.62471924 2.00923157 0.09360962 2.00922828
2.71832886 2.13637101 0.09360962 2.13636808
2.81193849 2.26004764 0.09360962 2.26004338
2.90554811 2.38076971 0.09360962 2.38076472
2.99915773 2.49895243 0.09360962 2.49894707
2.99936830 2.49921568 0.00021057 2.49921033
2.99957886 2.49947891 0.00021057 2.49947355
2.99978943 2.49974214 0.00021057 2.49973678
3.00000000 2.50000535 0.00021057 2.50000000
3. Use the Adams Variable Step-Size Predictor-Corrector Algorithm with TOL = 10−6 to approximate
the solution to the following initial-value problem:
b.
y 0 = 1 + y/t + (y/t)2 , 1 ≤ t ≤ 3, y(1) = 0;
actual solution y(t) = t tan(ln t).
Solution. b. Applying the Adams Variable Step-Size Predictor-Corrector Algorithm, we get the
following results:
t w h y(t)
1.00000000 0.00000000 0.00000000 0.00000000
1.03703921 0.03773348 0.03703921 0.03773348
1.07407841 0.07688780 0.03703921 0.07688780
1.11111762 0.11750963 0.03703921 0.11750962
1.14815683 0.15964398 0.03703921 0.15964397
1.18519603 0.20333499 0.03703921 0.20333497
1.22223524 0.24862649 0.03703921 0.24862645
1.25927444 0.29556249 0.03703921 0.29556244
1.29631365 0.34418760 0.03703921 0.34418754
1.33335286 0.39454733 0.03703921 0.39454726
1.37039206 0.44668843 0.03703921 0.44668835
1.40743127 0.50065911 0.03703921 0.50065903
1.44447048 0.55650930 0.03703921 0.55650921
1.48150968 0.61429086 0.03703921 0.61429076
1.51854889 0.67405779 0.03703921 0.67405768
1.55558810 0.73586642 0.03703921 0.73586631
1.59262730 0.79977565 0.03703921 0.79977552
1.62966651 0.86584708 0.03703921 0.86584694
1.66670572 0.93414529 0.03703921 0.93414514
1.70374492 1.00473798 0.03703921 1.00473782
1.74078413 1.07769626 0.03703921 1.07769609
7
t w h y(t)
1.77782333 1.15309479 0.03703921 1.15309460
1.81486254 1.23101209 0.03703921 1.23101189
1.85190175 1.31153076 0.03703921 1.31153054
1.88894095 1.39473775 0.03703921 1.39473752
1.92598016 1.48072467 0.03703921 1.48072442
1.96301937 1.56958804 0.03703921 1.56958777
2.00005857 1.66142969 0.03703921 1.66142940
2.03709778 1.75635706 0.03703921 1.75635675
2.07413699 1.85448361 0.03703921 1.85448328
2.11117619 1.95592923 0.03703921 1.95592886
2.14821540 2.06082065 0.03703921 2.06082026
2.18525460 2.16929198 0.03703921 2.16929156
2.22229381 2.28148519 0.03703921 2.28148474
2.25933302 2.39755070 0.03703921 2.39755020
2.29637222 2.51764797 0.03703921 2.51764743
2.33341143 2.64194621 0.03703921 2.64194563
2.37045064 2.77062509 0.03703921 2.77062447
2.40748984 2.90387557 0.03703921 2.90387489
2.44452905 3.04190073 0.03703921 3.04190000
2.48156826 3.18491677 0.03703921 3.18491598
2.51860746 3.33315406 0.03703921 3.33315320
2.55564667 3.48685829 0.03703921 3.48685736
2.59268587 3.64629174 0.03703921 3.64629073
2.62360638 3.78397753 0.03092051 3.78397647
2.65452689 3.92602442 0.03092051 3.92602332
2.68544740 4.07261602 0.03092051 4.07261487
2.71636790 4.22394689 0.03092051 4.22394566
2.74728841 4.38022329 0.03092051 4.38022199
2.77820892 4.54166415 0.03092051 4.54166276
2.80912943 4.70850200 0.03092051 4.70850052
2.84004993 4.88098407 0.03092051 4.88098249
2.86589042 5.02964820 0.02584049 5.02964655
2.89173091 5.18260036 0.02584049 5.18259865
2.91757139 5.34001213 0.02584049 5.34001036
2.94341188 5.50206466 0.02584049 5.50206279
2.96925237 5.66894925 0.02584049 5.66894729
2.99509285 5.84086817 0.02584049 5.84086610
2.99631964 5.84915884 0.00122679 5.84915677
2.99754643 5.85746136 0.00122679 5.85745929
2.99877321 5.86577576 0.00122679 5.86577369
3.00000000 5.87410206 0.00122679 5.87409998
5. An electrical circuit consists of a capacitor of constant capacitance C = 1.1 farads in series with a
resistor of constant resistance R0 = 2.1 ohms. A voltage E(t) = 110 sin t is applied at time t = 0.
When the resistor heats up, the resistance becomes a function of the current i,
R(t) = R0 + ki, where k = 0.9,
and the differential equation for i(t) becomes
2k di 1 1 dE
1+ i + i= .
R0 dt R0 C R0 C dt
8
Find i(2), assuming that i(0) = 0.
Solution. Running the Adams Variable Step-Size Predictor-Corrector Algorithm with tolerance
10−3 with minimum and maximum mesh size given by 0.001 and 0.5 respectively, we find that
i(2) ≈ 8.211.
b.
y 0 = 1 + (t − y)2 , 2 ≤ t ≤ 3, y(2) = 1;
actual solution y(t) = t + 1/(1 − t).
3. Use the Extrapolation Algorithm with TOL = 10−6 , hmax = 0.5, and hmin = 0.05 to approximate
the solutions to the following initial-value problems. Compare the results to the actual values.
b.
y 0 = 1 + y/t + (y/t)2 , 1 ≤ t ≤ 3, y(1) = 0;
actual solution y(t) = t tan ln t.
4. Let P (t) be the number of individuals in a population at time t, measured in years. If the average
birth rate b is constant and the average death rate d is proportional to the size of the population
(due to overcrowding), then the growth rate of the population is given by the logistic equation
dP (t)
= bP (t) − k[P (t)]2 ,
dt
where d = kP (t). Suppose P (0) = 50, 976, b = 2.9 × 10−2 , and k = 1.4 × 10−7 . Find the population
after 5 years.