2. Ders
2. Ders
3x + 7 = 0
x3 + 4x2 − 10 = 0
How can we decide whether or not such an equation possesses a solution in the
set of real numbers, and how can we find a solution?
Suppose f is a continuous function defined on the interval [a, b], with f (a)f (b) <
0. The Intermediate Value Theorem implies that a number p exists in (a, b) with
f (p) = 0.
Set a1 = a and b1 = b, and let p1 be the midpoint of [a, b]; that is,
a1 + b1
p1 =
2
(i) If f (p1 ) = 0, then we have located a solution p of f (x) = 0 and the
iteration stops.
(ii) Else, we define the new interval (a2 , b2 ) by
(a1 , p1 ) if f (p1 )f (b1 ) > 0
(a2 , b2 ) =
(p1 , b1 ) if f (p1 )f (b1 ) < 0
and repeat this procedure.
Example: Show that f (x) = x3 + 4x2 − 10 = 0 has a root in [1, 2], and use
the Bisection method with three iterations to determine an approximation to
the root.
1
Solution:
(i) f (x) = x3 + 4x2 − 10 is a continuous function on [1, 2]
(ii) f (1) = −5 < 0 and f (2) = 14 > 0. So, the Intermediate Value Theorem
ensures that there is at least one solution of f (x) = 0 on (1, 2)
First iteration:
1+2
a1 = 1 and b1 = 2 ⇒ p1 = = 1.5 and f (1.5) = 2.375 > 0
2
We have f (1)f (1.5) < 0, this means that new interval [1, 1.5].
Second iteration:
1 + 1.5
a2 = 1 and b2 = 1.5 ⇒ p2 = = 1.25 and f (1.25) = −1.796 < 0
2
We have f (1.25)f (1.5) < 0, this means that new interval [1.25, 1.5].
Third iteration:
1.25 + 1.5
a3 = 1.25 and b3 = 1.5 ⇒ p3 = = 1.375 and f (1.375) = 0.16211 > 0
2
Therefore, after three iterations p3 = 1.375 approximates the root p.
Theorem: Suppose that f ∈ C[a, b] and f (a)f (b) < 0. The Bisection
∞
method generates a sequence {pn }n=1 approximating a zero p of f with
b−a
|pn − p| ≤ , n≥1
2n
a n + bn
|pn − p| = −p
2
bn − an bn − an
= an + −p ≤
2 2
b−a
=
2n
2
(Explanation for bn − an = 2b−a
n−1 : When n = 1: a1 = a, b1 = b ⇒ b1 − a1 =
b − a = b−a
20 , When n = 2: if a a+b a+b b−a
2 = a, b2 = 2 ⇒ b2 − a2 = 2 − a = 21 , if
a+b a+b b−a
a2 = 2 , b2 = b ⇒ b2 − a2 = b − 2 = 21 , etc.)
Solution:
b−a 1
|pN − p| ≤ = N < 10−3
2N 2
We have
3
2−N < 10−3 ⇒ −N log 2 < −3 ⇒ N > ≈ 9.96
log10 2
f (x) = 0 ⇔ x = g(x)
and then to use the iteration: with an initial guess p0 chosen, compute a se-
quence
pn = g(pn−1 ), n≥1
in the hope that pn → p, where p is the actual solution (root) of the equation
f (x) = 0.
3
Example: Determine any fixed points of the function g(x) = x2 − x − 3.
Solution=
Proof :
(i) If g(a) = a or g(b) = b, then g has a fixed point at an endpoint. If not,
then g(a) > a and g(b) < b. The function h(x) = g(x) − x is continuous on
[a, b], with
h(a) = g(a) − a > 0 and h(b) = g(b) − b < 0
The Intermediate Value Theorem implies that there exists p ∈ (a, b) for which
h(p) = 0. This number p is a fixed point for g because
(ii) Suppose, in addition, that |g 0 (x)| ≤ k < 1 and that p and q are both
fixed points in [a, b]. If p 6= q, then the Mean Value Theorem implies that a
number c exists between p and q, and hence in [a, b], with
g(p) − g(q)
= g 0 (c)
p−q
Thus
|p − q| = |g(p) − g(q)| = |g 0 (c)| |p − q| ≤ k |p − q| < |p − q|
which is a contradiction. Hence, p = q and the fixed point in [a, b] is unique.
Example: Show that g(x) = (x2 − 1)/3 has a unique fixed point on the
interval [−1, 1] .
4
Also, the maximum and minimum values of g(x) occur at x = −1, x = 0 and
x = 1.
1
g(0) = − and g(−1) = g(1) = 0
3
So, absolute maximum for g(x) on [−1, 1] occurs at ±1 and absolute minimum
for g(x) occurs at 0. Therefore g(x) ∈ [−1, 1].
Moreover,
2x 2
|g 0 (x)| = ≤ < 1 for all x ∈ (−1, 1)
3 3
So g satisfies all the hypotheses of Existence and Uniqueness Theorem and has
a unique fixed point in [−1, 1].
pn = g(pn−1 ), n≥1
∞
Hence {pn }n=0 converges to p.
x 1
Example : Let g(x) = 2 − 4x + 1. Evaluate p2 by using Fixed-Point method
with p0 = 1.
pn−1 1
Solution: We know that pn = g(pn−1 ) = 2 − 4pn−1 + 1, n ≥ 1.
5
For p0 = 1, we have
p0 1 1 1 5
p1 = g(p0 ) = − +1= − +1=
2 4p0 2 4 4
5 1 57
p2 = g(p1 ) = − + 1 =
8 5 40
1 1 1 1 3
|g 0 (x)| = + ≤ + =
2 4x2 2 4 4
Hence,
N N
3 3
|pN − p| ≤ max {1 − 1, 2 − 1} = < 10−5
4 4
From this inequality:
3 5
N log10 < −5 ⇒ N > ≈ 40.01
4 log10 4 − log10 3