Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

PHƯƠNG PHÁP TÍNH

(Numerical Analysis)

Solutions of Equations in One Variable

January 2022
Outline
• Bisection method
• Fixed-Point Iteration
• Newton’s method
• Zeros of polynomials

2
The Bisection Method
Goal: find a root, or solution, of an equation of the form f(x) = 0
- The problem of approximating a root can be traced back at
least to 1700 B.C.E.

3
The Bisection Method
- The bisection method, or binary-search method, is based on
the Intermediate Value Theorem.
- f is a continuous function on the interval [a,b] and f(a).f(b) < 0
- The Intermediate Value Theorem implies that f(p) = 0 with
a < p < b.
- The method repeats the halving (or bisecting) of subintervals
of [a,b] and, at each step, locating the half containing p.

4
The Bisection Method

5
The Bisection Method

6
The Bisection Method
• Algorithm

7
The Bisection Method
- Stopping criteria: one of the following criteria can be used to
stop the procedure

The best
stopping
criteria

8
The Bisection Method
- Example 1 (page 50):

9
The Bisection Method
• Matlab code (Bisection_main.m + func.m)

10
The Bisection Method
- Strength:
- Simple, clear
- Always converges to a solution
- May be used as a starter for other methods
- Weakness:
- Converges slowly
- A good intermediate approximation might be discarded

11
The Bisection Method
Theorem

Example 2 (page 52):

12
Fixed-Point Iteration
The number p is a fixed-point for a given function g if g(p) = p.

Fixed-point iteration:

and a solution to x = g(x) is obtained

13
Fixed-Point Iteration
• Algorithm

14
Fixed-Point Iteration

15
Fixed-Point Iteration
Converse a root-finding problem to fixed-point iteration

16
Fixed-Point Iteration

Undefined
divergent Fast
because
of the
square
root of
negative
number

• Actual root is 1.365230013


17
Fixed-Point Iteration
Fixed-Point Theorem

Check page 63 (in the textbook) for an illustration.

18
Fixed-Point Iteration
Example
Approximate a root of f(x) = cosx – x = 0

19
Newton’s Method
Newton’s (or the Newton-Raphson) method is one of the most
powerful and well-known numerical methods for the root-
finding problem.

20
Newton’s Method

21
Newton’s Method

22
Newton’s Method
Important:

is the tangent line (D) to the graph of f at (p0,f(p0)).


- p1 is the x-intercept of D.

23
Newton’s Method
Newton’s method is a fixed-point iteration technique with

Theorem

24
Newton’s Method
• Algorithm

25
Newton’s Method
Example
Approximate a root of f(x) = cosx - x

26
Newton’s Method
The Secant method:
- It is difficult to calculate the derivative in the Newton’s
method
- The Secant method provides an approximation for this
derivative

Need 2 initial approximations 27


Newton’s Method

The Secant method

28
Newton’s Method
• Algorithm of Secant method

29
Newton’s Method
Example
Approximate a root of f(x) = cosx - x

30
Newton’s Method
The method of False Position (Regula Falsi):
- Similar to the Secant method but includes a test to ensure
that the root is always bracketed between successive
iterations.

31
Newton’s Method

32
Zeros of Polynomials

33
Zeros of Polynomials

34
Zeros of Polynomials

35
Zeros of Polynomials

36
Zeros of Polynomials
• Example:
Find an approximation to a zero of P(x) = 2x4 − 3x2 + 3x − 4, using
Newton’s method with x0 = −2 and synthe c division to evaluate
P(xn) and P (xn) for each iterate xn.

37

You might also like