{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Solution to HW3_S09

# Solution to HW3_S09 - HW#3 EGM6341 Spring 2009 pp.117-127...

This preview shows pages 1–5. Sign up to view the full content.

HW#3 EGM6341 Spring 2009 pp.117-127 of Atkinson’s textbook #2 Bisection method Solutions: a) f(x) = exp(x)-3x 2 = 0 -8 -6 -4 -2 0 2 4 -1 0 1 2 3 4 f x -10 0 10 20 30 40 50 -1 0 1 2 3 exp(x) 3*x^2 x Finding r 1 n x0 x1 f0 f1 x2 f2 |x n -x n-1 | 1 0 -1 1 -2.6321206 -0.5 -0.14347 2 0 -0.5 1 -0.1434693 -0.25 0.591301 2.500E-01 3 -0.5 -0.25 -0.1434693 0.59130078 -0.375 0.265414 1.250E-01 4 -0.5 -0.375 -0.1434693 0.26541428 -0.4375 0.07143 6.250E-02 5 -0.5 -0.4375 -0.1434693 0.07142978 -0.46875 -0.0334 3.125E-02 6 -0.4375 -0.46875 0.0714298 -0.0333957 -0.453125 0.019672 1.563E-02 7 -0.46875 -0.453125 -0.0333957 0.01967188 -0.4609375 -0.0067 7.813E-03 8 -0.453125 -0.4609375 0.0196719 -0.006698 -0.45703125 0.006528 3.906E-03 9 -0.4609375 -0.4570313 -0.006698 0.00652786 -0.45898438 -7.5E-05 1.953E-03 10 -0.4570313 -0.4589844 0.0065279 -7.485E-05 -0.45800781 0.003229 9.766E-04 11 -0.4589844 -0.4580078 -7.485E-05 0.00322907 -0.45849609 0.001578 4.883E-04 12 -0.4589844 -0.4584961 -7.485E-05 0.00157775 -0.45874023 0.000752 2.441E-04 13 -0.4589844 -0.4587402 -7.485E-05 0.00075161 -0.45886230 0.000338 1.221E-04 14 -0.4589844 -0.4588623 -7.485E-05 0.00033842 -0.45892334 0.000132 6.104E-05 15 -0.4589844 -0.4589233 -7.485E-05 0.00013179 -0.45895386 2.85E-05 3.052E-05 16 -0.4589844 -0.4589539 -7.485E-05 2.8474E-05 -0.45896912 -2.3E-05 1.526E-05 17 -0.4589539 -0.4589691 2.847E-05 -2.319E-05 -0.45896149 2.64E-06 7.629E-06 Finding r 2

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
n x0 x1 f0 f1 x2 f2 |x n -x n-1 | 1 0 1 1 -0.2817182 0.5 0.898721 2 1 0.5 -0.2817182 0.89872127 0.75 0.4295 2.500E-01 3 1 0.75 -0.2817182 0.42950002 0.875 0.102 1.250E-01 4 1 0.875 -0.2817182 0.10200029 0.9375 -0.08313 6.250E-02 5 0.875 0.9375 0.1020003 -0.0831293 0.90625 0.011157 3.125E-02 6 0.9375 0.90625 -0.0831293 0.01115658 0.921875 -0.03556 1.563E-02 7 0.90625 0.921875 0.0111566 -0.0355608 0.9140625 -0.0121 7.813E-03 8 0.90625 0.9140625 0.0111566 -0.0120951 0.91015625 -0.00044 3.906E-03 9 0.90625 0.91015625 0.0111566 -0.0004425 0.908203125 0.005364 1.953E-03 10 0.9101563 0.90820313 -0.0004425 0.00536378 0.909179688 0.002462 9.766E-04 11 0.9101563 0.90917969 -0.0004425 0.00246234 0.909667969 0.00101 4.883E-04 12 0.9101563 0.90966797 -0.0004425 0.00101036 0.909912109 0.000284 2.441E-04 13 0.9101563 0.90991211 -0.0004425 0.00028405 0.91003418 -7.9E-05 1.221E-04 14 0.9099121 0.91003418 0.0002841 -7.918E-05 0.909973145 0.000102 6.104E-05 15 0.9100342 0.90997314 -7.918E-05 0.00010245 0.910003662 1.16E-05 3.052E-05 16 0.9100342 0.91000366 -7.918E-05 1.1636E-05 0.910018921 -3.4E-05 1.526E-05 17 0.9100037 0.91001892 1.164E-05 -3.377E-05 0.910011292 -1.1E-05 7.629E-06 Finding r 3 n x0 x1 f0 f1 x2 f2 |x n -x n-1 | 1 1 4 -0.2817182 6.59815003 2.5 -6.56751 2 4 2.5 6.59815 -6.567506 3.25 -5.89716 7.500E-01 3 4 3.25 6.59815 -5.8971601 3.625 -1.89715 3.750E-01 4 4 3.625 6.59815 -1.8971518 3.8125 1.657987 1.875E-01 5 3.625 3.8125 -1.8971518 1.65798743 3.71875 -0.27446 9.375E-02 6 3.8125 3.71875 1.6579874 -0.2744588 3.765625 0.650897 4.688E-02 7 3.71875 3.765625 -0.2744588 0.65089669 3.7421875 0.178278 2.344E-02 8 3.71875 3.7421875 -0.2744588 0.17827846 3.73046875 -0.05054 1.172E-02 9 3.7421875 3.73046875 0.1782785 -0.0505415 3.736328125 0.063251 5.859E-03 10 3.7304688 3.73632813 -0.0505415 0.06325148 3.733398438 0.006201 2.930E-03 11 3.7304688 3.73339844 -0.0505415 0.00620129 3.731933594 -0.02221 1.465E-03 12 3.7333984 3.73193359 0.0062013 -0.0222085 3.732666016 -0.00801 7.324E-04 13 3.7333984 3.73266602 0.0062013 -0.0080132 3.733032227 -0.00091 3.662E-04 14 3.7333984 3.73303223 0.0062013 -0.0009083 3.733215332 0.002646 1.831E-04 15 3.7330322 3.73321533 -0.0009083 0.00264587 3.733123779 0.000869 9.155E-05 16 3.7330322 3.73312378 -0.0009083 0.00086861 3.733078003 -2E-05 4.578E-05 17 3.7331238 3.733078 0.0008686 -1.991E-05 3.733100891 0.000424 2.289E-05 18 3.733078 3.73310089 -1.991E-05 0.00042434 3.733089447 0.000202 1.144E-05 19 3.733078 3.73308945 -1.991E-05 0.00020221 3.733083725 9.12E-05 5.722E-06 Need 16, 16 & 19 iterations for the “error” |x n -x n-1 | to reach below tolerance 0.00001 for the three roots. b) f(x) = x 3 - x 2 – x -1 = 0
y -10 -5 0 5 10 -2 -1 0 1 2 3 y x n x0 x1 f0 f1 x2 f2 |x n -x n-1 | 1 2 -1 1 -2 0.5 -1.625 2 2 0.5 1 -1.625 1.25 -1.85938 7.500E-01 3 2 1.25 1 -1.85938 1.625 -0.97461 3.750E-01 4 2 1.625 1 -0.97461 1.8125 -0.14331 1.875E-01 5 2 1.8125 1 -0.14331 1.90625 0.386871 9.375E-02 6 1.8125 1.90625 -0.14331 0.386871 1.859375 0.111721 4.688E-02 7 1.8125 1.859375 -0.14331 0.111721 1.8359375 -0.01827 2.344E-02 8 1.859375 1.835938 0.111721 -0.01827 1.8476563 0.046101 1.172E-02 9 1.835938 1.847656 -0.01827 0.046101 1.8417969 0.01376 5.859E-03 10 1.835938 1.841797 -0.01827 0.01376 1.8388672 -0.00229 2.930E-03 11 1.841797 1.838867 0.01376 -0.00229 1.840332 0.005723 1.465E-03 12 1.838867 1.840332 -0.00229 0.005723 1.8395996 0.001712 7.324E-04 13 1.838867 1.8396 -0.00229 0.001712 1.8392334 -0.00029 3.662E-04 14 1.8396 1.839233 0.001712 -0.00029 1.8394165 0.00071 1.831E-04 15 1.839233 1.839417 -0.00029 0.00071 1.839325 0.000209 9.155E-05 16 1.839233 1.839325 -0.00029 0.000209 1.8392792 -4.1E-05 4.578E-05 17 1.839325 1.839279 0.000209 -4.1E-05 1.8393021 8.37E-05 2.289E-05 18 1.839279 1.839302 -4.1E-05 8.37E-05 1.8392906 2.11E-05 1.144E-05 19 1.839279 1.839291 -4.1E-05 2.11E-05 1.8392849 -1E-05 5.722E-06

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
c) f(x)=exp(x)-1/(0.1+x 2 ) y -10 -6 -2 2 6 -3 -2 -1 0 1 2 y x n x0 x1 f0 f1 x2 f2 |x n -x n-1 | 1 0 1 -9 1.809191 0.5 -1.20842 2 1 0.5 1.809191 -1.20842 0.75 0.607566 2.500E-01 3 0.5 0.75 -1.20842 0.607566 0.625 -0.16997 1.250E-01 4 0.75 0.625 0.607566 -0.16997 0.6875 0.242489 6.250E-02 5 0.625 0.6875 -0.16997 0.242489 0.65625 0.043119 3.125E-02 6 0.625 0.65625 -0.16997 0.043119 0.640625 -0.06158 1.563E-02 7 0.65625 0.640625 0.043119 -0.06158 0.648438 -0.00879 7.813E-03 8 0.65625 0.648438 0.043119 -0.00879 0.652344 0.017276 3.906E-03 9 0.648438 0.652344 -0.00879 0.017276 0.650391 0.004272 1.953E-03 10 0.648438 0.650391 -0.00879 0.004272 0.649414 -0.00225 9.766E-04 11 0.650391 0.649414 0.004272 -0.00225 0.649902 0.001013 4.883E-04 12 0.649414 0.649902 -0.00225 0.001013 0.649658 -0.00062 2.441E-04 13 0.649902 0.649658 0.001013 -0.00062 0.64978 0.000198 1.221E-04 14 0.649658 0.64978 -0.00062 0.000198 0.649719 -0.00021 6.104E-05 15 0.64978 0.649719 0.000198 -0.00021 0.64975 -6.2E-06 3.052E-05 16 0.64978 0.64975 0.000198 -6.2E-06 0.649765 9.58E-05
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 12

Solution to HW3_S09 - HW#3 EGM6341 Spring 2009 pp.117-127...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online