Page 79 - Numerical Analysis Using MATLAB and Excel
P. 79
Chapter 2 Root Approximations
A B C D E F G H
1 Spreadsheet for finding approximations of the real roots
2 of polynomials using the Bisection method
3
2
4 Equation: y = f(x) = x − 5 = 0
5
6 Powers of x and corresponding coefficients of given polynomial f(x)
7 Enter coefficients of f(x) in Row 9
8 x 7 x 6 x 5 x 4 x 3 x 2 x Constant
9 0.00000 0.00000 0.00000 0.00000 0.00000 1.00000 0 -5
10
11 x 1 x 2 x m f(x ) f(x ) f(x )f(x )
m
1
m
1
12 (x +x )/2
1
2
13 2.00000 3.00000 2.50000 -1.00000 1.25000 -1.25000
14 2.00000 2.50000 2.25000 -1.00000 0.06250 -0.06250
15 2.00000 2.25000 2.12500 -1.00000 -0.48438 0.48438
16 2.12500 2.25000 2.18750 -0.48438 -0.21484 0.10406
17 2.18750 2.25000 2.21875 -0.21484 -0.07715 0.01657
18 2.21875 2.25000 2.23438 -0.07715 -0.00757 0.00058
19 2.23438 2.25000 2.24219 -0.00757 0.02740 -0.00021
20 2.23438 2.24219 2.23828 -0.00757 0.00990 -0.00007
21 2.23438 2.23828 2.23633 -0.00757 0.00116 -0.00001
22 2.23438 2.23633 2.23535 -0.00757 -0.00320 0.00002
23 2.23535 2.23633 2.23584 -0.00320 -0.00102 0.00000
24 2.23584 2.23633 2.23608 -0.00102 0.00007 0.00000
25 2.23584 2.23608 2.23596 -0.00102 -0.00047 0.00000
26 2.23596 2.23608 2.23602 -0.00047 -0.00020 0.00000
27 2.23602 2.23608 2.23605 -0.00020 -0.00006 0.00000
28 2.23605 2.23608 2.23607 -0.00006 0.00000 0.00000
29 2.23605 2.23607 2.23606 -0.00006 -0.00003 0.00000
30 2.23606 2.23607 2.23606 -0.00003 -0.00001 0.00000
Figure 2.14. Entire spreadsheet for Example 2.8
2−26 Numerical Analysis Using MATLAB® and Excel®, Third Edition
Copyright © Orchard Publications