0% found this document useful (0 votes)
52 views

The Bisection Algorithm: Either No Solutions or Multiple Solutions Between Left and Right Bounds

This document describes using the bisection method to numerically find the solution to the equation ex - 2x - 5 = 0. The user inputs an initial left and right boundary, and the bisection algorithm iteratively narrows the range until the solution is approximated. It runs for 20 iterations, graphing the function values at each midpoint to show convergence on a solution near x = 2.251637459. The bisection method works by checking if the function values at the boundaries have opposite signs, indicating a root exists between them, then testing the midpoint in each successive iteration.

Uploaded by

AhmadMoaaz
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

The Bisection Algorithm: Either No Solutions or Multiple Solutions Between Left and Right Bounds

This document describes using the bisection method to numerically find the solution to the equation ex - 2x - 5 = 0. The user inputs an initial left and right boundary, and the bisection algorithm iteratively narrows the range until the solution is approximated. It runs for 20 iterations, graphing the function values at each midpoint to show convergence on a solution near x = 2.251637459. The bisection method works by checking if the function values at the boundaries have opposite signs, indicating a root exists between them, then testing the midpoint in each successive iteration.

Uploaded by

AhmadMoaaz
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 1

The Bisection Algorithm Enter your choices for left boundary and right boundary in the boxes to the

Enter your choices for left boundary and right boundary in the boxes to the lower left. If a single solution exists
between the boundaries the worksheet will indicate with "OK". If either no solutions or multiple solutions exist
This simulation will use the bisection algorithm to the worksheet will state it. Use the graph below to determine a better intial choice for boundaries.
determine the solution for ex = 2x + 5. The user will Function: ex -2x - 5 = 0
enter an initial value (guess) for both the left bound
and the right bound. Excel will determine if a solution Enter Left Boundary: -5
exists, and use the Bisection Algorithm to numerically
approximate the solution by solving ex -2x - 5 = 0. Either no solutions or multiple solutions between left and right bounds.
Enter Right Boundary: 4

Graph 1: Initial Boundaries


n a b f[a] f[b] x f[x] 50
1 -5 4 5.0067 41.5982 -5.0000 5.006737947
2 -0.5 4 -3.3935 41.5982 -4.5263 4.063452047
3 1.75 4 -2.7454 41.5982 -4.0526 3.122639744 40
4 1.75 2.875 -2.7454 6.9754 -3.5789 2.185799793
5 1.75 2.3125 -2.7454 0.4746 -3.1053 1.25533904
6 2.03125 2.3125 -1.4389 0.4746 -2.6316 0.335122639
30
7 2.171875 2.3125 -0.5690 0.4746 -2.1579 -0.56864236
8 2.2421875 2.3125 -0.0705 0.4746 -1.6842 -1.445988054
9 2.2421875 2.2773438 -0.0705 0.1961 -1.2105 -2.280906994
10 2.2421875 2.2597656 -0.0705 0.0613 -0.7368 -3.047692817 20
11 2.2509766 2.2597656 -0.0049 0.0613 -0.2632 -3.705063684
12 2.2509766 2.2553711 -0.0049 0.0281 0.2105 -4.186725096
13 2.2509766 2.2531738 -0.0049 0.0115 0.6842 -4.386214735 10
14 2.2509766 2.2520752 -0.0049 0.0033 1.1579 -4.132564782
15 2.2515259 2.2520752 -0.0008 0.0033 1.6316 -3.151218061
16 2.2515259 2.2518005 -0.0008 0.0012 2.1053 -1.001263258 0
17 2.2515259 2.2516632 -0.0008 0.0002 2.5789 3.025359007 -6.0000 -4.0000 -2.0000 0.0000 2.0000 4.0000 6.0000
18 2.2515945 2.2516632 -0.0003 0.0002 3.0526 10.06572114
19 2.2516289 2.2516632 -0.0001 0.0002 3.5263 21.94584746
-10
20 2.2516289 2.251646 -0.0001 0.0001 4.0000 41.59815003

The bisection method checks the two initial boundary 'guesses' in


order to determine if a solution exists between them. If the product Graph 2: Boundaries after 20 iterations
of f(a)*f(b) < 0 at least one solution exists between the two values. If
f(a)*f(b) > 0 the function either doesn't cross the x-axis (no solutions) x f[x] 0.0001
or it crosses the axis more than once (multiple solutions). Graph 1 can 2.2516289 -5.4979E-05
be used to determine better left and right boundaries. 2.2516306 -4.20989E-05 8E-05

Once appropriate boundary values are entered the bisection algorithm 2.2516323 -2.92187E-05 6E-05
will determine the midpoint between the initial boundaries, m. The 2.251634 -1.63386E-05
products of f(a)f(m) and f(b)f(m) are used to determine in which
interval the solution exists. The process of using the midpoint to 2.2516357 -3.45838E-06 4E-05
narrow the interval continues until 20 iterations are carried out. 2.2516375 9.421848E-06
2E-05
2.2516392 2.23021E-05
Graph 2 shows the boundaries of the final iteration and the value at
which the function crosses the x-axis. This graph allows for an accurate 2.2516409 3.518239E-05 0
determination of the solution. 2.2516426 4.80627E-05 2.251628 2.25163 2.251632 2.251634 2.251636 2.251638 2.25164 2.251642 2.251644 2.251646 2.251648
2.2516443 6.094304E-05 -2E-05
2.251646 7.38234E-05
-4E-05

-6E-05

Solution: 2.251637459 -8E-05

You might also like