02+Nonlinear+Equations+ +Bisection+Method
02+Nonlinear+Equations+ +Bisection+Method
Lecture 2
NONLINEAR EQUATIONS - BISECTION METHOD
AHMAD NURFAIDHI RIZALMAN (PhD)
Civil Engineering Programme
, No. 66 Level 2 Block A, Faculty of Engineering
( 088 – 320000 (ext. 3033) + ahmadnurfaidhi@ums.edu.my
Prepared by: Ahmad Nurfaidhi Rizalman
CONTENT
q Introduction
q Intermediate Value Theorem
Ø Question 2.1 to 2.2
q Bisection Method
Ø Question 2.3 to 2.8
q Applications in Civil Engineering
Ø Question 2.9 Location of Maximum Bending Moment
1
3/21/21
INTRODUCTION
INTRODUCTION
• MathemaEcal model in science and engineering involve equaEons that need to be solved.
𝑓 𝑥 =0 (2.1)
• Solving EquaEon (2.1) means that finding the values of 𝑥 that saEsfying the equaEon.
2
3/21/21
INTRODUCTION
INTRODUCTION
Factorization
Quadra;c Formula
−𝑏 ± 𝑏! + 4𝑎𝑐
𝑥=
2𝑎
3
3/21/21
INTRODUCTION
4
3/21/21
• But, if we want to locate the interval of root without plotting graph, we can applied
Intermediate Value Theorem.
(a) (b)
Graphical view of of Intermediate Value of Theorem
10
5
3/21/21
QUESTION 2.1
Given 𝑥 + ln 𝑥 = 0 . Show that there is a root in the following interval by using Intermediate
Value Theorem.
a) [0.2, 1]
b) [0.4, 0.6]
11
12
6
3/21/21
QUESTION 2.2
Given the graph of the the funcEon 𝑓 𝑥 = sin 2𝑥 + 𝑥 ! − 3 . Choose 𝑎, 𝑏 that saEsfies
𝑏 − 𝑎 = 1. Then, show that there is a root in the chosen 𝑎, 𝑏 by using Intermediate Value
Theorem.
13
𝑓 1 = −1.091, 𝑓 2 = 4.243, so 𝑓(1)(2) < 0. Thus, there is at least a root in the interval
1,2 by using Intermediate Value Theorem.
14
7
3/21/21
BISECTION METHOD
15
BISECTION METHOD
In general, if 𝑓(𝑥) is real and conEnuous in the interval from 𝑥" to 𝑥# and 𝑓 𝑥" and 𝑓 𝑥#
have opposite signs, that is 𝑓 𝑥" 𝑓 𝑥# < 0, then there is at least one real root between 𝑥"
and 𝑥# .
Figure 2.1 Root is between lower bound 𝑥" and upper bound 𝑥#
Prepared by: Ahmad Nurfaidhi Rizalman
16
8
3/21/21
BISECTION METHOD
Bisection Method
17
Step 3 Make the following evaluations to determine which subinterval the root lies:
a) If 𝑓(𝑥" )(𝑥$ ) < 0, the root lies in the lower subinterval. Then, set 𝑥# = 𝑥$ and
return to Step 2.
b) If 𝑓(𝑥" )(𝑥$ ) > 0, the root lies in the upper subinterval. Then, set 𝑥" = 𝑥$ and
return to Step 2.
c) If 𝑓 𝑥" 𝑥$ = 0, the root equals 𝑥$ . Then, terminate the computation.
Prepared by: Ahmad Nurfaidhi Rizalman
18
9
3/21/21
BISECTION METHOD
The followings are graphical representation for Step 3a) and b), respectively
Figure 2.2 𝑓 𝑥" 𝑥$ < 0, the root lies in the Figure 2.3 𝑓 𝑥" 𝑥$ > 0, the root lies in the
lower subinterval. Therefore, set 𝑥# = 𝑥$ upper subinterval. Therefore, set 𝑥" = 𝑥$ .
19
Step 5 Compare 𝜀+ with 𝜀" . If 𝜀" < 𝜀+ , then stop the computation. Otherwise, go to Step 2
Step 1 Choosethe
and repeat lower 𝑥" and
process uppernew
by using 𝑥# guesses
interval.for the root such that the function 𝑓(𝑥)
20
10
3/21/21
#5"
𝑟 − 𝑐/ ≤ './0
, where 𝑖 ≥ 0
21
QUESTION 2.3
Use three (3) iterations of the bisection method to determine the root of the function
below. Employ initial guesses of 𝑥" = 1.2 and 𝑥# = 2.
22
11
3/21/21
𝑖 𝑥" 𝑥# 𝑥$ 𝑓 𝑥" 𝑓 𝑥# 𝑓 𝑥$
1 1.2 2 6.'&' −0.897 0.375 0.171
'
= 1.6
2 1.2 1.6 6.'&6.8 −0.897 0.171 −0.231
'
= 1.4
3 1.4 1.6 6.9&6.8 −0.231 0.171 0
'
= 1.5
23
QUESTION 2.4
Find the highest root of the quadratic function below using three iterations of the bisection
method. Use initial guesses, 𝑥: = 5 and 𝑥1 = 10. Then, compute approximate percent relative
error, 𝜀" and true percent relative error, 𝜀- after each iteration process.
24
12
3/21/21
Since the question specify for the highest root, therefore the true value selected in this
problem is 𝑥- = 5.6286.
25
Since 𝑓 𝑥" . 𝑓 𝑥$ < 0, the root lies in the lower subinterval. Then, 𝑥# = 7.5,
>.8'?85@.>3
𝜀- = >.8'?8
×100 = 33.23%, and 𝜀" = −.
26
13
3/21/21
Since 𝑓 𝑥" . 𝑓 𝑥$ < 0, the root lies in the lower subinterval. Then, 𝑥# = 6.25,
>.8'?858.'> 8.'>5@.>
𝜀- = >.8'?8
×100 = 11.04%, and 𝜀" = 8.'>
×100 = 20%
27
Therefore, after three iterations the approximate root of 𝑓(𝑥) is 𝑥$ = 5.6250 with 𝜀- =
0.06% and 𝜀" = 11.11%.
28
14
3/21/21
QUESTION 2.5
Use bisection method to determine the root of sin 𝑥 = 𝑥 ! where 𝑥 is in radian. Employ initial
guesses, 𝑥" = 0.5 and 𝑥1 = 1. Perform the computation until 𝜀" < 𝜀" = 2%.
29
Therefore, after five iterations the approximate root of 𝑓(𝑥) is 𝑥$ = 0.9219 with 𝜀" =
1.69% < 𝜀+ .
30
15
3/21/21
QUESTION 2.6
The lateral surface area, 𝑆 is given by 𝑆 = 𝜋𝑟 𝑟 ' + ℎ' where 𝑟 is the radius of the base and ℎ
is the height. Determine the radius of a cone which has a surface area of 1500 𝑚' and a height
of 25 𝑚, by using bisection method. Perform the computation up to three iterations with the
initial guesses of 𝑟" = 15 and 𝑟# = 18.
31
32
16
3/21/21
QUESTION 2.7
Given the graph of 𝑔 𝑥 = 𝑒 % and ℎ 𝑥 = cos 𝑥 over
the interval −2,2 .
a) Choose 𝑎, 𝑏 that satisfies 𝑏 − 𝑎 = 1. Then,
show that there is a negative value of 𝑥 with
𝑔 𝑥 = ℎ(𝑥) in the chosen 𝑎, 𝑏 by using
Intermediate Value Theorem.
b) Find the negative value with 𝑒 % = cos 𝑥 by using
bisection with 𝑏 − 𝑎 = 1. Do your calculation in
3 decimal places.
c) Find the negative value with 𝑒 % = cos 𝑥 by using
bisection with 𝑏 − 𝑎 = 1. Do your calculation in
9 decimal places. Approximate the value of 𝑥 to
within an absolute tolerance of 0.02.
33
Therefore,
𝑓 −2 𝑓(−1) < 0.
Thus, there is at least a negative value of 𝑥 with 𝑔 𝑥 = ℎ(𝑥) in the interval −2, −1 by using
Intermediate Value Theorem.
34
17
3/21/21
35
Hence, to approximate the value of 𝑥 to within an absolute tolerance of 0.02, 𝑖 = 4 iteration is needed.
36
18
3/21/21
37
QUESTION 2.8
Given the function 𝑓 𝑥 = sin 2𝑥 + 𝑥 ! − 3. Find the root of 𝑓(𝑥) by using bisection method
with 𝑏 − 𝑎 = 1. Do your calculation in 9 decimal places. Approximate the value of 𝑥 to within
an absolute tolerance of 105!.
Solution
Root of the equation is 1.380859375 at 8th iteration.
38
19
3/21/21
39
𝑓 𝑥 = 20 − 𝑥 ',
40
20