Professional Documents
Culture Documents
MEC500 Numerical Methods With Applications: Roots of Equations
MEC500 Numerical Methods With Applications: Roots of Equations
MEC500 Numerical Methods With Applications: Roots of Equations
1
Learning Outcome
• Understand what root problems are and where they occur in
engineering and science
2
Introduction to Roots of Equations
In engineering, “Roots” problems occur when some function f can be
written in terms of one or more dependent variables x, where the
solutions to f(x) = 0 yields the solution to the problem.
How about
𝒂𝒙𝟗 + 𝒃𝒙𝟔 − 𝒄𝒙𝟒 + 𝒅𝒙𝟑 + 𝒆𝒙𝟐 − 𝒇𝒙 = 𝟎
𝒆−𝒙 − 𝒙 = 𝟎
𝒔𝒊𝒏𝒙 + 𝒙 = 𝟎 ??
5
Graphical Method
▪ Used to solve root of equations
6
Graphical Method
However….
▪ Graphs can also indicate where roots may be and where some
root-finding methods may fail.
▪ The bracketing bounds may give general idea about the number
of the roots
▪ But there is also type of function that does not imply this
generalisation such as: function that tangential to x-axis (multiple
roots) and discontinuous function
9
2.1 Bracketing Methods
Steps:
1. Guess or select an interval [𝑥𝑙 , 𝑥𝑢 ] that contains the root:
𝑓 𝑥𝑙 . 𝑓 𝑥𝑢 < 0
𝒙𝒍 +𝒙𝒖
2. Estimate the root 𝑥𝑟 where 𝒙𝒓 = (2.1-2)
𝟐
3. Evaluate the products:
if 𝑓 𝑥𝑙 . 𝑓 𝑥𝑟 < 0, set 𝑥𝑟 = 𝑛𝑒𝑤 𝑥𝑢
if 𝑓 𝑥𝑢 . 𝑓 𝑥𝑟 < 0, set 𝑥𝑟 = 𝑛𝑒𝑤𝑥𝑙
4. Check for convergence:
if satisfies pre-specified tolerence, 𝜀𝑠 , Stop!!
else, repeat step 2 and 3.
12
2.1 (a) Bisection Method
Convergence Criterion.
Since the process of finding the roots of the equation is iterative, it
is important to specify a convergence criterion, 𝜀𝑠 (or a tolerance)
in order to terminate the iterations.
𝑥𝑟𝑖+1 − 𝑥𝑟𝑖
𝜀𝑎 = 100% (2.1-3)
𝑥𝑟𝑖+1
13
2.1 (a) Bisection Method
#Example 2.1(a)
Find the root of the 3rd-order polynomial
𝒇 𝒙 = 𝒙𝟑 − 𝒙𝟐 − 𝟏𝟎𝒙 − 𝟖 = 𝟎
in the interval [3.75,5]. The tolerance 𝜀𝑠 is 0.5%.
14
2.1 (a) Bisection Method
We stop the iteration since 𝜀𝑎 is less than 𝜀𝑠 .
Remark:
The steps for this method are similar to that of the bisection method with equation
2.1-5 replacing equation 2.1-2 in Step 2. The stopping criterion (or pre-specified
error) is also the same as before
17
2.1 (b) False-Position Method
Solution of Example 2.1(b). Analytical solution yields x = 4.0 (true
root)
19