NONLINEAR EQUATION
ELECTRONIC LECTURE
Dau The Phiet
HCMUT-OISP
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
1 / 27
MOTIVATION
The equation f (x) = ax 2 + bx + c = 0 can be solved
directly.
The growth of population in America is described by
435 λ
(e − 1), where N (t ) is the
λ
number of population in time t and λ is the constant
model: N (t ) = 1000e λ +
birthrate of population. Suppose that in 2001,
population contains 1000,000 people, find the
birthrate in this year.
The aim of this chapter is solving approximately
nonlinear equations, which we cannot solve exactly.
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
1 / 27
ISOLATED INTERVAL CONTAINING ROOT
THEOREM
Given an equation f (x) = 0 and an interval [a, b]. If
f (x) is continuous on [a, b], f (a). f (b) < 0 and f is
monotone on [a, b], then equation f (x) = 0 has a
unique real root on [a, b].
There are 2 methods to determine the number of
intervals containing root:
Analytical method
Geometrical method
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
2 / 27
EXAMPLE
Determine all isolated intervals containing root of the
following equations:
x 3 − 6x + 2 = 0
ex − x2 = 0
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
3 / 27
ESTIMATION ERROR FOR ROOT
THEOREM
Suppose that f (x) is continous and differential on
[a, b] and ∀x ∈ [a, b], | f 0 (x)| Ê m > 0. If equation f (x) = 0
has approximate root x ∗ and exact root x , then the
absolute error ∆x ∗ of x ∗ is:
∆
x∗
| f (x ∗ )|
= |x − x| É
m
∗
EXAMPLE
Suppose that the equation f (x) = x 3 − 5x 2 + 12 = 0 has
approximate solution x ∗ = −1.37 on [−2, −1]. Estimate
the error of x ∗ , rounding to 4 decimal digits.
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
4 / 27
THE BISECTION METHOD
THE BISECTION METHOD
Let equation f (x) = 0 have one real root on [a, b].
a0 + b0
, d0 = b0 − a0
Set a0 = a, b0 = b, x 0 =
2
If f (x 0 ) = 0, we done. If not, there are 2 cases: if
f (a 0 ) f (x 0 ) < 0, then let a 1 = a 0 , b 1 = x 0 , otherwise,
set a1 = x 0 , b1 = b0 and x 1 = (a1 + b1 )/2
reapply the process on [a1 , b1 ], [a2 , b2 ], ....., [an , bn ]
At the n t h step, we get:
an + bn
É bn
2
f (a n ). f (b n ) < 0, d n = b n − a n = b − a
2n
an É x É bn , an É xn =
And
x n is the approximate
solution of equation.
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
5 / 27
THE BISECTION METHOD
THE ERROR OF SOLUTION
THEOREM
Let function f (x) is continous on [a, b] and
f (a) f (b) < 0. Then bisection method generates a
sequence {x n } that converges to the exact solution x of
equation f (x) = 0 with the error:
¯
¯
¯ an + bn
¯ 1
b−a
|x n − x| = ¯¯
− x ¯¯ É (b n − a n ) = n+1 .
2
2
2
DEFINITION
A decimal number is called correct within k decimal
places if its absolute error ≤ 0.5 × 10−k
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
6 / 27
THE BISECTION METHOD
EXAMPLE
Let the equation f (x) = 5x 3 − cos 3x = 0 have a root on
[0, 1]. Using bisection method to find x 5 and estimate
its error.
EXAMPLE
p
Let the equation f (x) = x − cos x = 0 have a root on
[0, 1]. Using bisection method to find x 5 and find its
error.
EXAMPLE
Let the equation f (x) = x − tan x = 0 have a root on
[4, 4.5]. Using bisection method to find approximate
solution which has error less than 10−2 .
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
7 / 27
THE BISECTION METHOD
EXAMPLE
How many steps must be calculated such that the
appproximate root of equation 2 + cos(e x − 2) − e x = 0
on [0.5, 1.5] is correct within 4 decimal places.
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
8 / 27
THE BISECTION METHOD
EXAMPLE
A trough of length L has a cross section in the shape of
a semicircle with radius r (see the figure). When fill
with water to within a distance h of the top, the
volume V of water is
h
2
2
V = L 0.5πr − r arcsin (h/r ) − h
p
r 2 − h2
i
Suppose L = 10cm , r = 1cm , V = 12.4cm 3 . Find the
deep of water in trough to within 0.01cm
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
9 / 27
THE BISECTION METHOD
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
10 / 27
THE BISECTION METHOD
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
11 / 27
FIXED POINT ITERATION METHOD
FIXED POINT
DEFINITION
The point x is called fixed point of function f if
f (x) = x
From a given equation f (x) = 0, we always can define
the equivalent equation x = g (x) in many ways.
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
12 / 27
FIXED POINT ITERATION METHOD
EXAMPLE
Given the equation x 3 − x − 1 = 0 , we can write:
x = x3 − 1
p
3
x = 1+x
1 1
x= + 2
x x
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
13 / 27
FIXED POINT ITERATION METHOD
THEOREM
If g (x) is differential on [a, b], moreover, there exist a
positive constant q < 1 such that
|g 0 (x)| ≤ q
for all
x ∈ [a, b]
then g has exactly one fixed point on [a, b]
EXAMPLE
Show that g (x) = (x 2 − 1)/3 has a unique fixed point on
the interval [−1, 1].
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
14 / 27
FIXED POINT ITERATION METHOD
FIXED-POINT ITERATION
Choose an initial value x 0
Construct the sequence by x n = g (x n−1 )
If lim x n = x , then
n→∞
x = lim x n = lim g (x n−1 ) = g (x)
n→∞
Dau The Phiet (BK TPHCM)
n→∞
NONLINEAR EQUATION
15 / 27
FIXED POINT ITERATION METHOD
CONDITION FOR CONVERGENCE
THEOREM
Function g differential on [a, b] and
|g 0 (x)| ≤ q < 1, ∀x ∈ [a, b], then for any x 0 ∈ [a, b], the
sequence defined by x n = g (x n−1 ) converges to the
unique fixed point x of g (x) in [a, b]
Proof
THEOREM
Mean value theorem
Function f (x) is differential on [a, b], then there exist a point c in
(a,b) such that:
f (b) − f (a) = f 0 (c)(b − a)
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
16 / 27
FIXED POINT ITERATION METHOD
Applying the Mean value theorem
|x n −x| = |g (x n−1 −g (x)| = |g 0 (ζ1 )||x n−1 −x| = .... ≤ q n |x 0 −x|
Then lim x n = x .
n→∞
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
17 / 27
FIXED POINT ITERATION METHOD
ERROR ESTIMATION
Priori error
qn
|x 1 − x 0 |
∆xn = |x n − x| ≤
1−q
Posteriori error
∆xn = |x n − x| ≤
Dau The Phiet (BK TPHCM)
q
|x n − x n−1 |
1−q
NONLINEAR EQUATION
18 / 27
FIXED POINT ITERATION METHOD
EXAMPLE
5x 3 + 3
Let the equation x =
= g (x). have a root on
20
(0, 1). Find the approximate solution x 3 by fixed point
iteration method and its error by two formulas, x 0 is
the midpoint on (0, 1).
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
19 / 27
FIXED POINT ITERATION METHOD
The four functions below have common fixed point
which is root of the equation x 4 + 2x 2 − x − 3 = 0.
p
4
1
g 1 (x) = 3 + x − 2x 2 ;
s
2
3
4
x + 3 − x4
g 2 (x) =
;
2
r
x +3
g 3 (x) =
;
x2 + 2
3x 4 + 2x 2 + 3
g 4 (x) =
.
4x 3 + 4x − 1
Perform 4 steps of iteration for each function and
conclude which function generates the best
sequence which converges the exact root of the
equation?( rounding results to 4 decimal places)
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
20 / 27
FIXED POINT ITERATION METHOD
EXAMPLE
Using fixed-point iteration method, find the
approximate solution x 3 of the equation
x = 3+
5
= g (x) on [3, 4] with x 0 = 3.5 and its error by
x2
two formulas.
EXAMPLE
Using fixed point iteration method, find the
approximate root whose
posteriori error less than
p
3
−3
10 of equation x = x + 1 = g (x) on [1, 2] with x 0 = 1.5
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
21 / 27
FIXED POINT ITERATION METHOD
EXAMPLE
Using fixed point iteration method, find the
approximate root whose posteriori error less than
10
−3
x2 − ex + 2
of equation x =
on [0, 1] with x 0 = 0.5
3
EXAMPLE
Using fixed point iteration method, how many steps
are necessary to ensure that the approximate root has
priori error less than 10−4 of equation x =
[2.5, 3] with x 0 = 2.5
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
5
+ 2 on
x2
22 / 27
FIXED POINT ITERATION METHOD
NEWTON’S METHOD
Suppose that equation f (x) = 0 has a root on [a, b].
Choose an initial value x 0
Construct sequence as following:
x n = x n−1 −
Dau The Phiet (BK TPHCM)
f n−1 (x)
0
f n−1
(x)
NONLINEAR EQUATION
23 / 27
FIXED POINT ITERATION METHOD
CONDITION FOR CONVERGENCE
Remark
THEOREM
Let equation f (x) = 0 have root on (a, b). If f 00 (x) does
not change its sign on (a, b), and x 0 is chosen by
Fourier condition, then the sequence which is
generated by Newton method converges to exact root
of equation.
We use the condition below to chose x 0
Pick up any point x 1 in (a, b)
If f 0 (x 1 ) f 00 (x 1 ) < 0, then choose x 0 = a
If f 0 (x 1 ) f 00 (x 1 ) > 0, then choose x 0 = b
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
24 / 27
FIXED POINT ITERATION METHOD
ERROR
|x n − ξ| É
Dau The Phiet (BK TPHCM)
| f (x n )|
.
m
NONLINEAR EQUATION
25 / 27
FIXED POINT ITERATION METHOD
EXAMPLE
Let the equation f (x) = x 3 − 3x + 1 = 0 have a root on
[0, 0.5]. Using Newton method, find x 3 and its error.
EXAMPLE
Let the equation f (x) = e x + 2−x + 2 cos x − 6 = 0 have a
root on [1, 2]. Using Newton method, find x 3 and its
error.
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
26 / 27
FIXED POINT ITERATION METHOD
EXAMPLE
Given equation f (x) = ln(x − 1) + cos(x − 1) = 0 and its
containing root interval [1.3, 2]. Find approximate
root x n whose error less than 10−5 with Newton
method.
Dau The Phiet (BK TPHCM)
NONLINEAR EQUATION
27 / 27