Week 3
Week 3
Week 3
ENGINEERING MATHEMATICS 1
Nonlinear Equations
Simple Newton-
Bisection
Fixed-Point Raphson
Method
Iteration Method
Example:
Given 𝑓𝑓 𝑥𝑥 = 𝑥𝑥 2 − 8𝑥𝑥 − 5, use intermediate value theorem to find the
interval that contains the negative root.
Solution:
𝑓𝑓 0 = −5 < 0
𝑓𝑓 −1 = 4 > 0
∴ 𝑓𝑓 0 𝑓𝑓 −1 < 0
Hence, the interval that contains the negative root is (−1,0).
2.1 Intermediate Value Theorem
Exercise 2.1:
1) Use intermediate value theorem to find the interval that contains the root
for 𝑓𝑓 𝑥𝑥 = 𝑥𝑥 3 + 𝑥𝑥 + 3.
𝑎𝑎𝑖𝑖 +𝑏𝑏𝑖𝑖
Compute 𝑐𝑐𝑖𝑖 = and 𝑓𝑓(𝑐𝑐𝑖𝑖 )
2
Set 𝑖𝑖 = 0
Stop the Yes Is 𝑏𝑏𝑖𝑖 − 𝑎𝑎𝑖𝑖 < 𝜀𝜀 or 𝑓𝑓(𝑐𝑐𝑖𝑖 ) < 𝜀𝜀 ??
iteration, where 𝜀𝜀 is the specified tolerance
𝑥𝑥 = 𝑐𝑐𝑖𝑖
Follow one path only No
Example:
Root, 𝑥𝑥 = 1.7325
2.2.1 Bisection Method Algorithm
Example:
Using the bisection method, find the root of
𝑓𝑓 𝑥𝑥 = 𝑥𝑥 6 − 𝑥𝑥 − 1
Exercise 2.2:
Find the root of 𝑓𝑓 𝑥𝑥 = 𝑒𝑒 𝑥𝑥 (3.2 sin 𝑥𝑥 − 0.5 cos 𝑥𝑥) on the interval
3,4 by using bisection method accurate to within 𝜀𝜀 = 0.05.
Secondly, choose an initial guess 𝑥𝑥0 and use the iterative sequence 𝑥𝑥𝑛𝑛+1 = 𝑔𝑔(𝑥𝑥𝑛𝑛 ) to
compute an 𝑥𝑥 in such a way 𝑥𝑥 = 𝑔𝑔(𝑥𝑥).
*Note: A fixed point of a function 𝑔𝑔(𝑥𝑥) is a point 𝑘𝑘 where 𝑘𝑘 = 𝑔𝑔(𝑘𝑘). This point 𝑘𝑘 is not
the root of 𝑔𝑔 𝑥𝑥 = 0 but the root of 𝑓𝑓(𝑥𝑥).
There are infinite ways to present an equivalent fixed-point problem for a given
equation and it may lead to different roots found.
2.3 Simple Fixed-Point Iteration
Example:
Example:
Find the root of
𝑓𝑓 𝑥𝑥 = 3𝑥𝑥𝑒𝑒 𝑥𝑥 − 1
by using simple fixed-point iteration accurate to within 𝜀𝜀 = 0.0001.
Assume 𝑥𝑥0 = 1.
Solution:
There are two possible forms of 𝑔𝑔 𝑥𝑥 :
1 1
𝑥𝑥 = 𝑔𝑔 𝑥𝑥 = 𝑒𝑒 −𝑥𝑥 and 𝑥𝑥 = 𝑔𝑔 𝑥𝑥 = ln
3 3𝑥𝑥
1 −𝑥𝑥 1
𝑔𝑔′ 𝑥𝑥 = − 𝑒𝑒 𝑔𝑔′ 𝑥𝑥 = −
3 𝑥𝑥
𝑔𝑔′ 1 = 𝟎𝟎. 𝟏𝟏𝟏𝟏 < 𝟏𝟏 𝑔𝑔′ 1 = 𝟏𝟏 ≮ 𝟏𝟏
Criteria is satisfied Criteria is not satisfied
1 −𝑥𝑥
∴ 𝑔𝑔 𝑥𝑥 = 𝑒𝑒
3
2.3 Simple Fixed-Point Iteration
Solution:
𝒊𝒊 𝒙𝒙𝒊𝒊 𝒙𝒙𝒊𝒊 − 𝒙𝒙𝒊𝒊−𝟏𝟏
0 1.0000
1 0.1226 0.8774
2 0.2949 0.1722
3 0.2482 0.0467
4 0.2601 0.0119
5 0.2570 0.0031
6 0.2578 0.0008
7 0.2576 0.0002
8 0.2576 0.0000
Thus, the root that satisfies the stopping criteria is 𝑥𝑥 = 0.2576.
2.3 Simple Fixed-Point Iteration
Exercise 2.3:
Locate the root of 𝑓𝑓 𝑥𝑥 = 𝑒𝑒 −𝑥𝑥 − 𝑥𝑥 by using simple fixed-point
iteration accurate to within 𝜀𝜀 = 0.003 where 𝑥𝑥 ∈ (0,1].
No
Is 𝑥𝑥𝑖𝑖+1 − 𝑥𝑥𝑖𝑖 < 𝜀𝜀 or 𝑓𝑓(𝑥𝑥𝑖𝑖+1 ) < 𝜀𝜀 ??
where 𝜀𝜀 is the specified tolerance
Yes
Stop the iteration,
𝑥𝑥 = 𝑥𝑥𝑖𝑖+1
2.4 Newton-Raphson Method
Example:
Determine the root of the function
2
𝑓𝑓 𝑥𝑥 = − 𝑒𝑒 𝑥𝑥
𝑥𝑥
by using Newton-Raphson method with 𝑥𝑥0 = 0.8 accurate to within
𝜀𝜀 = 0.0001.
Exercise 2.4:
Use Newton Raphson method to find the solutions accurate to
within 10−4 for the problem
𝑓𝑓 𝑥𝑥 = ln 𝑥𝑥 − 1 + cos 𝑥𝑥 − 1
with initial guess 𝑥𝑥0 = 1.3