0% found this document useful (0 votes)
10 views17 pages

Nonlinear Equations I

The document provides an introduction to the Bisection Method for finding zeros of continuous functions, detailing the method's application, theorems, and error bounds. It includes examples and problems to illustrate the method's use, particularly with the function f(x) = x^3 + x^2 - 2x - 2. Additionally, it discusses stopping criteria and guarantees for accuracy in approximations.

Uploaded by

王健
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views17 pages

Nonlinear Equations I

The document provides an introduction to the Bisection Method for finding zeros of continuous functions, detailing the method's application, theorems, and error bounds. It includes examples and problems to illustrate the method's use, particularly with the function f(x) = x^3 + x^2 - 2x - 2. Additionally, it discusses stopping criteria and guarantees for accuracy in approximations.

Uploaded by

王健
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

MATH2033 (2023–2024)

Introduction to Scientific Computation

Nonlinear Equations I

Department of Mathematical Sciences


Nonlinear Equations I 2/17

The Bisection Method


Suppose that a ∈ R, that b ∈ R and that a < b.
Suppose that f is a function that is real-valued on [a, b].
We will consider the problem of finding p ∈ [a, b] such that f (p) = 0.
A solution p to f (p) = 0 is called a zero of f .
Note that for functions g1 and g2 that are real-valued on [a, b], the
problem of finding x such that g1 (x) = g2 (x) is equivalent to the problem
of finding x such that g3 (x) = 0 with g3 = g1 − g2 .
Also note that f (a)f (b) < 0 is equivalent to f (a) and f (b) having
opposite signs which is equivalent to

f (a) > 0 and f (b) < 0

or
f (a) < 0 and f (b) > 0.
Nonlinear Equations I 3/17

Theorem (The Intermediate Value Theorem)


Suppose that α ∈ R, that β ∈ R and that α < β. If g is a function that is
real-valued and continuous on [α, β] and K is any number between g(α)
and g(β) then there exists at least one c ∈ (α, β) for which g(c) = K.
Nonlinear Equations I 4/17

Theorem
Suppose that α ∈ R, that β ∈ R and that α < β. Suppose that f is a
function that is real-valued and continuous on [α, β] and that
f (α)f (β) < 0. Then there exists at least one p ∈ (α, β) for which
f (p) = 0.

Proof Since f is real-valued on [α, β] and f (α)f (β) < 0, either

f (α) < 0 < f (β)

or
f (β) < 0 < f (α).
Consequently, since f is also continuous on [α, β], by the Intermediate
Value Theorem there exists at least one p ∈ (α, β) for which f (p) = 0.
Nonlinear Equations I 5/17

Given a function f which is real-valued and continuous on [a1 , b1 ] and


such that f (a1 )f (b1 ) < 0 where a1 ∈ R, b1 ∈ R and a1 < b1 , we can use
the bisection method to find approximations to a zero of f that lies in the
interval [a1 , b1 ].
Starting from the initial interval [a1 , b1 ], the approximation obtained after
n iterations of the bisection method is
1
pn = (an + bn ).
2
If f (pn ) = 0 then pn is a zero of f and so we let an+1 = pn and
bn+1 = pn .
If f (an )f (pn ) < 0 then a zero of f lies in the interval (an , pn ) and
so we let an+1 = an and bn+1 = pn .
If f (pn )f (bn ) < 0 then a zero of f lies in the interval (pn , bn ) and so
we let an+1 = pn and bn+1 = bn .
1
Note that in the last two cases bn+1 − an+1 = (bn − an ).
2
Also note that, for all positive integers n, the an and bn generated by this
method are such that a zero of f lies in the interval [an , bn ].
Nonlinear Equations I 6/17

Problem 1
Use the bisection method to find the approximations p1 , p2 and p3 to the
zero of f that lies in the interval [1, 2] for f given by
f (x) = x3 + x2 − 2x − 2, where pn is the approximation obtained after
performing n iterations of the bisection method, starting from the initial
interval [1, 2].

We first compute that f (1) = −2 < 0 and f (2) = 6 > 0. We present the
results in a table:
n an bn pn f (pn )
1 1 2 1.5 >0
2 1 1.5 1.25 < 0
3 1.25 1.5 1.375
Nonlinear Equations I 7/17

After how many iterations should we stop?


Examples of stopping criteria are to stop once

∣f (pn )∣ < ,

∣pn+1 − pn ∣ < 
or
∣pn+1 − pn ∣
<
∣pn+1 ∣
for some tolerance .
We could also stop once a quantity that provides a bound on the error is
less than some tolerance.
Nonlinear Equations I 8/17

The error bound for the bisection method


Theorem
Suppose that a ∈ R, that b ∈ R and that a < b. Suppose that f is a
function that is real-valued and continuous on [a, b] and that
f (a)f (b) < 0. Let pn be the approximation to a zero of f obtained after
performing n iterations of the bisection method, starting from the initial
interval [a, b]. Then, for all positive integers n,

b−a
∣p − pn ∣ ≤
2n
for at least one p ∈ [a, b] satisfying f (p) = 0.

Proof We will use the notation introduced on page 5. Suppose that n is


a positive integer.
b−a
If f (pn ) = 0 then ∣p − pn ∣ = 0 ≤ n where p = pn .
2
Nonlinear Equations I 9/17

Let p be a zero of f that lies in the interval [an , bn ]. If f (pn ) ≠ 0 then

∣p − pn ∣ ≤ max ∣x − pn ∣
x∈[an ,bn ]
= max {∣an − pn ∣, ∣bn − pn ∣}
1 1
= max {∣an − (an + bn )∣ , ∣bn − (an + bn )∣}
2 2
1
= ∣ (bn − an )∣
2
1
= (bn − an )
2
1b−a
=
2 2n−1
1
since bi − ai = (bi−1 − ai−1 ) for all integers i such that 2 ≤ i ≤ n with
2
a1 = a and b1 = b.
Nonlinear Equations I 10/17

We can hence conclude that, for all positive integers n,


b−a
∣p − pn ∣ ≤
2n
for at least one p ∈ [a, b] satisfying f (p) = 0.
Nonlinear Equations I 11/17

Corollary
Suppose that a ∈ R, that b ∈ R and that a < b. Suppose that f is a
function that is real-valued and continuous on [a, b] and that
f (a)f (b) < 0. Let pn be the approximation to a zero of f obtained after
performing n iterations of the bisection method, starting from the initial
interval [a, b]. Then the sequence {pn }∞
n=1 converges to a zero p ∈ [a, b]
of f .
Nonlinear Equations I 12/17

Proof Given any  > 0, there exists a positive integer N () such that

b−a
<  for all integers n ≥ N ().
2n
Consequently, since
b−a
∣p − pn ∣ ≤ for all integers n ≥ 1,
2n
given any  > 0, there exists a positive integer N () such that

∣p − pn ∣ <  for all integers n ≥ N ()

and hence the corollary holds.


Nonlinear Equations I 13/17

Alternatively, we can conclude that the corollary holds because


b−a
∣p − pn ∣ ≤ for all integers n ≥ 1,
2n
and
b−a
lim = 0.
n→∞ 2n
Nonlinear Equations I 14/17

How to guarantee a given accuracy?


Problem 2
Let f be given by f (x) = x3 + x2 − 2x − 2. Use the error bound for the
bisection method to determine a number of iterations that will guarantee
that ∣p − pn ∣ ≤ 10−4 , where p is the zero of f that lies in [1, 2] and pn is
the approximation to p obtained after performing n iterations of the
bisection method, starting from the initial interval [1, 2].

We first compute that f (1) = −2 < 0 and f (2) = 6 > 0. Since 2 − 1 = 1,


1
∣p − pn ∣ ≤ n = 2−n . We want ∣p − pn ∣ ≤ 10−4 . This will be satisfied when
2
2−n ≤ 10−4 .
Nonlinear Equations I 15/17

Now,

2−n ≤ 10−4
⇔ log10 (2−n ) ≤ −4
⇔ −n log10 (2) ≤ −4
4
⇔ n≥ .
log10 (2)
4
Moreover, = 13.287 . . . and so ∣p − pn ∣ ≤ 10−4 if at least 14
log10 (2)
iterations are performed.
Nonlinear Equations I 16/17

Problem 3
Perform iterations of the bisection method, starting from the initial
interval [−1, 1], to find approximations to the zero of f that lies in the
interval [−1, 1] for f given by f (x) = (x − 0.1)(x − 2). Stop performing
iterations once the error bound for the bisection method guarantees that
the absolute error in the latest approximation is no greater than 0.1.

We first compute that f (−1) > 0 and f (1) < 0. We present the results in
a table where pn is the approximation obtained after performing n
iterations of the bisection method:
b1 − a1
n an bn pn f (pn ) ∣0.1 − pn ∣
2n
1 −1 1 0 >0 0.1 1
2 0 1 0.5 <0 0.4 0.5
3 0 0.5 0.25 <0 0.15 0.25
4 0 0.25 0.125 <0 0.025 0.125
5 0 0.125 0.0625 >0 0.0375 0.0625
Nonlinear Equations I 17/17

References
Burden, Faires & Burden, Numerical Analysis, 10E
Section 2.1

You might also like