Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
122 views13 pages

Bisection Method

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 13

Bisection Method

EXERCISE 1. Solve the following problems using bisection method and show the graph of a
function. Use separate sheet for the solutions.

1.) a. Show that the equation x3 + 3x − 2 = 0 has a root between x = 0 and x = 1. b.


Use the bisection method to find this root to 2 decimal places.
ANSWER:

n a f(a) b f(b) c=a+b2 f(c) Update


1 0 -2 1 2 0.5 -0.38 a=c
2 0.5 -0.38 1 2 0.75 0.67 b=c
3 0.5 -0.38 0.75 0.67 0.62 0.12 b=c
4 0.5 -0.38 0.62 0.12 0.56 -0.13 a=c
5 0.56 -0.13 0.62 0.12 0.59 0 a=c
6 0.59 0 0.62 0.12 0.61 0.05 b=c
7 0.59 0 0.61 0.05 0.6 0.02 b=c
8 0.59 0 0.6 0.02 0.6 0.01 b=c
9 0.59 0 0.6 0.01 0.6 0 a=c
10 0.6 0 0.6 0.01 0.6 0 b=c
11 0.6 0 0.6 0 0.6 0 b=c
Approximate root of the equation x + 3x − 2 = 0 is 0.60 after 11 iterations.
3

GRAPH:
2.) a. Sketch the functions y = x2 and y = x + 1 on the same graph.

ANSWER:

(Red parabola) Roots of y = x^2

x = 0; x = 0

(Blue Line) Root of y = x + 1; x = -1

b. Show that the equation x2 − x − 1 = 0 has a root between 0 and 1.


ANSWER:
Roots:

x = -0.6180; x = 1.6180

c. This equation also has a positive root. Between which two positive integers does
this root lie?
ANSWER:
The root lies between the positive integers of x=1 and x=2.

d. Use the bisection method to find the positive root to 1 decimal places.
ANSWER:

n a f(a) b f(b) C = (a + b)/2 f(c)


1 1 -1 2 1 1.5 -0.25
2 1.5 -0.25 2 1 1.75 0.3125
3 1.5 -0.25 1.75 0.3125 1.625 0.0156
4 1.5 -0.25 1.625 0.0156 1.5625 -0.1211
5 1.5625 -0.1211 1.625 0.0156 1.5938 -0.0537
6 1.5938 -0.0537 1.625 0.0156 1.6094 -0.0193
7 1.6094 -0.0193 1.625 0.0156 1.6172 -0.0019
8 1.6172 -0.0019 1.625 0.0156 1.6211 0.0069
9 1.6172 -0.0019 1.6211 0.0069 1.6191 0.0025
10 1.6172 -0.0019 1.6191 0.0025 1.6182 0.0003
Approximate Root of the equation x2 – x – 1 = 0 using Bisection method is 1.6.
GRAPH:

ANSWER:

3.) Use the bisection method to solve the equation x3 − 5 = 0 to 2 decimal places given that
a solution exists between 1.65 and 1.8.
ANSWER:
Approximate root of the equation x3 − 5 = 0 using Bisection Method is 1.71 (After 11
iterations)

n a f(a) b f(b) c=a+b2 f(c) Update


1 1.65 -0.51 1.8 0.83 1.72 0.13 b=c
2 1.65 -0.51 1.72 0.13 1.69 -0.19 a=c
3 1.69 -0.19 1.72 0.13 1.71 -0.03 a=c
4 1.71 -0.03 1.72 0.13 1.72 0.05 b=c
5 1.71 -0.03 1.72 0.05 1.71 0.01 b=c
6 1.71 -0.03 1.71 0.01 1.71 -0.01 a=c
7 1.71 -0.01 1.71 0.01 1.71 0 a=c
8 1.71 0 1.71 0.01 1.71 0 b=c
9 1.71 0 1.71 0 1.71 0 b=c
10 1.71 0 1.71 0 1.71 0 a=c
11 1.71 0 1.71 0 1.71 0 b=c
GRAPH:
4.) Solve the equation x2 − 6x + 3 = 0 to 2 decimal places using the bisection method
and given starting interval x = [5, 6].

ANSWER:

n a f(a) b f(b) c=a+b2 f(c) Update


1 5 -2 6 3 5.5 0.25 b=c
2 5 -2 5.5 0.25 5.25 -0.94 a=c
3 5.25 -0.94 5.5 0.25 5.38 -0.36 a=c
4 5.38 -0.36 5.5 0.25 5.44 -0.06 a=c
5 5.44 -0.06 5.5 0.25 5.47 0.09 b=c
6 5.44 -0.06 5.47 0.09 5.45 0.02 b=c
7 5.44 -0.06 5.45 0.02 5.45 -0.02 a=c
8 5.45 -0.02 5.45 0.02 5.45 0 a=c
9 5.45 0 5.45 0.02 5.45 0.01 b=c
10 5.45 0 5.45 0.01 5.45 0 b=c
11 5.45 0 5.45 0 5.45 0 b=c
12 5.45 0 5.45 0 5.45 0 a=c
Approximate Root of the equation x2 − 6x + 3 = 0 using Bisection method is 5.45 (After 12 iterations)

GRAPH:
5.) Louise invests some of the profits from a business. In order to understand one
particular investment, she needs to find a solution greater than 1 to the equation: x 8 − 11x +
10 = 0

a. Show that this equation has a solution between x = 1.05 and x = 1.15
ANSWER:

f(1.05) = -0.073 and f(1.15)=0.409 shows that the graph crosses the x-axis
between x=1.05 and x=1.15

b. Calculate two iterations of the bisection method to solve the equation starting with the
interval [1.05, 1.15].
ANSWER:

n a f(a) b f(b) c=a+b2 f(c) Update


1 1.05 -0.07 1.15 0.41 1.1 0.04 b=c
2 1.05 -0.07 1.1 0.04 1.08 -0.04 a=c
3 1.08 -0.04 1.1 0.04 1.09 0 a=c
4 1.09 0 1.1 0.04 1.09 0.02 b=c
5 1.09 0 1.09 0.02 1.09 0 b=c
6 1.09 0 1.09 0 1.09 0 a=c
7 1.09 0 1.09 0 1.09 0 b=c
8 1.09 0 1.09 0 1.09 0 b=c
9 1.09 0 1.09 0 1.09 0 a=c

Approximate Root of the equation x8 − 11x + 10 = 0 using Bisection method is 1.09 (After 9iterations)
6.) Consider the function f(x) = 2ex − 2x − 3
a. Show that there is a root to the equation f(x) = 0 in the interval [0, 2]
ANSWER:

n a f(a) b f(b) c=a+b2 f(c) Update


1 0 -1 1 0.44 0.5 -0.7 a=c
2 0.5 -0.7 1 0.44 0.75 -0.27 a=c
3 0.75 -0.27 1 0.44 0.88 0.05 b=c
4 0.75 -0.27 0.88 0.05 0.81 -0.12 a=c
5 0.81 -0.12 0.88 0.05 0.84 -0.04 a=c
6 0.84 -0.04 0.88 0.05 0.86 0 b=c
7 0.84 -0.04 0.86 0 0.85 -0.02 a=c
8 0.85 -0.02 0.86 0 0.86 0 a=c
9 0.86 0 0.86 0 0.86 0 a=c
10 0.86 0 0.86 0 0.86 0 b=c
11 0.86 0 0.86 0 0.86 0 b=c
12 0.86 0 0.86 0 0.86 0 a=

Approximate Root of the equation 2ex − 2x − 3 using Bisection method is 0.86 (After 12 iterations)

GRAPH:
b. Using [0, 2] as the starting interval, calculate two iterations of the bisection method
to solve the equation f(x) = 0. State the interval obtained at the end of the second
iteration.
ANSWER:

Interval: [0,1];
Root is: 0.5

7.) Use the bisection method to find the root of the function f(x) = x- e-x with an accuracy of
0.0001.
ANSWER:
n a f(a) b f(b) c = (a + b)/2 f(c)
1 0 -1 1 0.6321 0.5 -0.1065
2 0.5 -0.1065 1 0.6321 0.75 0.2776
3 0.5 -0.1065 0.75 0.2776 0.625 0.0897
4 0.5 -0.1065 0.625 0.0897 0.5625 -0.0073
5 0.5625 -0.0073 0.625 0.0897 0.5938 0.0415
6 0.5625 -0.0073 0.5938 0.0415 0.5781 0.0172
7 0.5625 -0.0073 0.5781 0.0172 0.5703 0.005
8 0.5625 -0.0073 0.5703 0.005 0.5664 -0.0012
9 0.5664 -0.0012 0.5703 0.005 0.5684 0.0019
10 0.5664 -0.0012 0.5684 0.0019 0.5674 0.0004

Approximate Root of the equation x- e-x using Bisection method is 0.5674.


8.) Find the root of the function f(x) = cos x − x with the interval [0,1]. Determine the roots
with 8 digit of accuracy.

ANSWER:

n a f(a) b f(b) c=a+b2 f(c) Update


1 0 1 1 -0.45969769 0.5 0.37758256 a=c
2 0.5 0.37758256 1 -0.45969769 0.75 -0.01831113 b=c
3 0.5 0.37758256 0.75 -0.01831113 0.625 0.18596312 a=c
4 0.625 0.18596312 0.75 -0.01831113 0.6875 0.08533495 a=c
5 0.6875 0.08533495 0.75 -0.01831113 0.71875 0.03387937 a=c
6 0.71875 0.03387937 0.75 -0.01831113 0.734375 0.00787473 a=c
7 0.734375 0.00787473 0.75 -0.01831113 0.7421875 -0.00519571 b=c
8 0.734375 0.00787473 0.7421875 -0.00519571 0.73828125 0.00134515 a=c
9 0.73828125 0.00134515 0.7421875 -0.00519571 0.74023438 -0.00192387 b=c
10 0.73828125 0.00134515 0.74023438 -0.00192387 0.73925781 -0.00028901 b=c

Approximate Root of the equation cos(x)-x=0 using Bisection method is 0.73925781 (After 10 iterations)

GRAPH:
9.) Find the root of the function f(x) = x3 – 6x2 + 11x − 6

ANSWER:

Approximate Root of the

equation f(x) = x3 – 6x2 + 11x

− 6 using Bisection method is

0.999996

GRAPH:

Roots: x

=3

x =2

x =1
10.) Find the root of the function f(x) = x4 − 16

ANSWER:
Initial guesses (0 and 4)
Iterati xl xr xu f(xl) f(xr) f(xu) f(xl)*f(xu)
on
0 0 4 2 -16 240 0 0

One of the equation is equal to the midpoint of 2.

GRAPH:
11.) Find the root of the function f(x) = x6 − x − 1
ANSWER:

Approximate Root of the

equation f(x) = x6 − x −

1 using Bisection method is

1.1347.

GRAPH:

Roots:

x = 1.1347 + 0.0000i

x = 0.4511 + 1.0024i

x = 0.4511 - 1.0384i

x = -0.6294 + 0.7358i

x = -0.6294 - 0.7358i

x = -0.7781 + 0.0000 i

You might also like