Professional Documents
Culture Documents
Nonlinear Equation
Nonlinear Equation
ELECTRONIC LECTURE
Hoang Hai Ha
HCMUT-OISP
Email: hoanghaiha@hcmut.edu.vn
THEOREM 0.1
Given an equation f (x) = 0 and an interval [a, b]. If
f (x) is continous 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].
THEOREM 0.1
Given an equation f (x) = 0 and an interval [a, b]. If
f (x) is continous 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].
THEOREM 0.1
Given an equation f (x) = 0 and an interval [a, b]. If
f (x) is continous 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].
THEOREM 0.1
Given an equation f (x) = 0 and an interval [a, b]. If
f (x) is continous 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].
THEOREM 1.1
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
EXAMPLE 1.1
Let the equation f (x) = 5x 3 − cos 3x = 0 have a root on
[0, 1]. Using bisection method to find x 4 and estimate
its error by two formulas.
EXAMPLE 1.1
Let the equation f (x) = 5x 3 − cos 3x = 0 have a root on
[0, 1]. Using bisection method to find x 4 and estimate
its error by two formulas.
EXAMPLE 1.2
p
Let the equation f (x) = x − cos x = 0 have a root on
[0, 1]. Using bisection method to find x 4 and find its
error.
EXAMPLE 1.2
p
Let the equation f (x) = x − cos x = 0 have a root on
[0, 1]. Using bisection method to find x 4 and find its
error.
x 4 = 0.56625; ∆x4 = 0.0313.
EXAMPLE 1.3
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 .
EXAMPLE 1.3
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 .
Find the least value n ∈ N such that
4.5 − 4
∆xn = n+1 < 10−2 .
2
EXAMPLE 1.3
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 .
Find the least value n ∈ N such that
4.5 − 4
∆xn = n+1 < 10−2 .
2
n = 5.
EXAMPLE 1.3
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 .
Find the least value n ∈ N such that
4.5 − 4
∆xn = n+1 < 10−2 .
2
n = 5.
x 5 = 4.4921875.
DEFINITION 2.1
The point x is called fixed point of function g if
g (x) = x
DEFINITION 2.1
The point x is called fixed point of function g if
g (x) = x
EXAMPLE 2.1
Given the equation x 3 − x − 1 = 0 , we can write:
x = x3 − 1
EXAMPLE 2.1
Given the equation x 3 − x − 1 = 0 , we can write:
x = x3 − 1
p
3
x = 1+x
EXAMPLE 2.1
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
EXAMPLE 2.1
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
THEOREM 2.1
If g (x) is differentiable on [a, b], moreover
THEOREM 2.1
If g (x) is differentiable on [a, b], moreover
EXAMPLE 2.2
Show that g (x) = (x 2 − 1)/3 has a unique fixed point on
the interval [−1, 1].
FIXED-POINT ITERATION
THEOREM 2.2
Function g is differentiable on [a, b] and
q = |g 0 (x)| < 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 2.3
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)
Then lim x n = x .
n→∞
ERROR ESTIMATION
Priori error
qn
|x n − x| ≤ |x 1 − x 0 |.
1−q
ERROR ESTIMATION
Priori error
qn
|x n − x| ≤ |x 1 − x 0 |.
1−q
Posteriori error
q
|x n − x| ≤ |x n − x n−1 |.
1−q
EXAMPLE 2.3
5x 3 + 3
Let the equation x = = g (x) have a root on (0, 1).
20
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).
SOLUTION
EXAMPLE 2.3
5x 3 + 3
Let the equation x = = g (x) have a root on (0, 1).
20
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).
SOLUTION
1 x 0 = 0.5 → x 1 = 29/160 → x 2 = 0.151489(A) → x 3 = 0.150869(B )
EXAMPLE 2.3
5x 3 + 3
Let the equation x = = g (x) have a root on (0, 1).
20
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).
SOLUTION
1 x 0 = 0.5 → x 1 = 29/160 → x 2 = 0.151489(A) → x 3 = 0.150869(B )
q = max ¯ 3 x 2 ¯ = 3 (M )
¯ ¯
2
x∈[0, 1] 4 4
EXAMPLE 2.3
5x 3 + 3
Let the equation x = = g (x) have a root on (0, 1).
20
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).
SOLUTION
1 x 0 = 0.5 → x 1 = 29/160 → x 2 = 0.151489(A) → x 3 = 0.150869(B )
q = max ¯ 3 x 2 ¯ = 3 (M )
¯ ¯
2
x∈[0, 1] 4 4
q3
3 Priori error: ∆x 3 = 1−q |x 1 − x 0 | ≈ 0.5379
EXAMPLE 2.3
5x 3 + 3
Let the equation x = = g (x) have a root on (0, 1).
20
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).
SOLUTION
1 x 0 = 0.5 → x 1 = 29/160 → x 2 = 0.151489(A) → x 3 = 0.150869(B )
q = max ¯ 3 x 2 ¯ = 3 (M )
¯ ¯
2
x∈[0, 1] 4 4
q3
3 Priori error: ∆x 3 = 1−q |x 1 − x 0 | ≈ 0.5379
q q
4 Posterrior error: ∆x 3 = 1−q |x 3 − x 2 | = 1−q |B − A| ≈ 0.0019
EXAMPLE 2.4
Using fixed-point iteration method, find the
approximate solution x 3 of the equation
5
x = 3+ = g (x) on [3, 4] with x 0 = 3.5 and its priori
x2
error .
EXAMPLE 2.4
Using fixed-point iteration method, find the
approximate solution x 3 of the equation
5
x = 3+ = g (x) on [3, 4] with x 0 = 3.5 and its priori
x2
error .
ANS
x 3 = 3.4248799, ∆x 3 = 0.0074103
EXAMPLE 2.5
Using fixed point method,
p
find the approximate root
3
x 3 for equation x = x + 1 = g (x) on [1, 2] with x 0 = 1.5
and compute its posteriori error. Find the least
number of steps of calculation to get the solution
whose priori error less then 10−3 .
EXAMPLE 2.5
Using fixed point method,
p
find the approximate root
3
x 3 for equation x = x + 1 = g (x) on [1, 2] with x 0 = 1.5
and compute its posteriori error. Find the least
number of steps of calculation to get the solution
whose priori error less then 10−3 .
q n
Priori error ∆xn ≈ 1−q |x 1 − x 0 | < 10−3 ⇒
n 10−3 (1 − q) 10−3 (1 − q)
q < ⇒ n > l og q
|x 1 − x 0 | |x 1 − x 0 |
EXAMPLE 2.6
Given function x 4 + 2x 2 − x − 3 = 0. Transform it to the
equivalent equation x = g (x) in two case below
p
4
x= 3 + x − 2x 2
3x 4 + 2x 2 + 3
x=
4x 3 + 4x − 1
With initial value x 0 = 1, which case give us better
approximate solution?
EXAMPLE 2.6
Given function x 4 + 2x 2 − x − 3 = 0. Transform it to the
equivalent equation x = g (x) in two case below
p
4
x= 3 + x − 2x 2
3x 4 + 2x 2 + 3
x=
4x 3 + 4x − 1
With initial value x 0 = 1, which case give us better
approximate solution?
n xn g 1 (x n ) g 2 (x n )
1 x1 1.1892 1.1429
2 x2 1.0801 1.1245
3 x3 1.1497 1.1241
4 x4 1.1078 1.1241
Hoang Hai Ha (BK TPHCM) NONLINEAR EQUATION TP. HCM — 2021. 22 / 34
Newton’s method
CONSTRUCT FORMULA
CONSTRUCT FORMULA
CONSTRUCT FORMULA
CONSTRUCT FORMULA
EXAMPLE 3.1
Given equation cos x − x = 0, using Newton’s method
to find approximate root on [0, π/2] after 3 iterations
with initial guess is x 0 = 0.
EXAMPLE 3.1
Given equation cos x − x = 0, using Newton’s method
to find approximate root on [0, π/2] after 3 iterations
with initial guess is x 0 = 0.
SOLUTION
f = cos x − x , f 0 = − sin x − 1, set function
f (x) cos x − x
g (x) = x − 0 =x−
f (x) − sin x − 1
EXAMPLE 3.1
Given equation cos x − x = 0, using Newton’s method
to find approximate root on [0, π/2] after 3 iterations
with initial guess is x 0 = 0.
SOLUTION
f = cos x − x , f 0 = − sin x − 1, set function
f (x) cos x − x
g (x) = x − 0 =x−
f (x) − sin x − 1
First iteration: x 1 = g (x 0 ) = 1
EXAMPLE 3.1
Given equation cos x − x = 0, using Newton’s method
to find approximate root on [0, π/2] after 3 iterations
with initial guess is x 0 = 0.
SOLUTION
f = cos x − x , f 0 = − sin x − 1, set function
f (x) cos x − x
g (x) = x − 0 =x−
f (x) − sin x − 1
First iteration: x 1 = g (x 0 ) = 1
Second iteration: x 2 = g (x 1 ) = 0.750363867840244
EXAMPLE 3.1
Given equation cos x − x = 0, using Newton’s method
to find approximate root on [0, π/2] after 3 iterations
with initial guess is x 0 = 0.
SOLUTION
f = cos x − x , f 0 = − sin x − 1, set function
f (x) cos x − x
g (x) = x − 0 =x−
f (x) − sin x − 1
First iteration: x 1 = g (x 0 ) = 1
Second iteration: x 2 = g (x 1 ) = 0.750363867840244
Third iteration: x 3 = g (x 2 ) = 0.739112890911362
CONVERGENCE
THEOREM 3.1
The sequence x n generated by Newton’s method
converges to exact root x of function f (x) = 0 if the
following conditions satisfy:
f 0 (x) 6= 0, ∀x ∈ [a, b].
CONVERGENCE
THEOREM 3.1
The sequence x n generated by Newton’s method
converges to exact root x of function f (x) = 0 if the
following conditions satisfy:
f 0 (x) 6= 0, ∀x ∈ [a, b].
f 00 (x) is continuous on [a, b].
CONVERGENCE
THEOREM 3.1
The sequence x n generated by Newton’s method
converges to exact root x of function f (x) = 0 if the
following conditions satisfy:
f 0 (x) 6= 0, ∀x ∈ [a, b].
f 00 (x) is continuous on [a, b].
x 0 (initial guest) is sufficiently close to exact root x .
EXAMPLE 3.2
Given equation f (x) = x 3 − 2x 2 − 5 on [−1, 4], construct
the sequence by Newton’s method with x 0 = −1 after 5
iterations.
EXAMPLE 3.2
Given equation f (x) = x 3 − 2x 2 − 5 on [−1, 4], construct
the sequence by Newton’s method with x 0 = −1 after 5
iterations.
Exact root x = 2.690647448028614.
x 1 = 0.142857142857143
x 2 = −9.731428571428571
x 3 = −6.276696653150196
x 4 = −2.398586261805698
x 5 = −1.270038382108753
EXAMPLE 3.2
Given equation f (x) = x 3 − 2x 2 − 5 on [−1, 4], construct
the sequence by Newton’s method with x 0 = −1 after 5
iterations.
Exact root x = 2.690647448028614.
x 1 = 0.142857142857143
x 2 = −9.731428571428571
x 3 = −6.276696653150196
x 4 = −2.398586261805698
x 5 = −1.270038382108753
⇒ Method failed
Hoang Hai Ha (BK TPHCM) NONLINEAR EQUATION TP. HCM — 2021. 28 / 34
Newton’s method
INITIAL GUESS
INITIAL GUESS
INITIAL GUESS
INITIAL GUESS
INITIAL GUESS
ERROR
ERROR
Estimate error of approximate root x n in Newton’s
method is
| f (x n )|
|x n − x| É .
m
EXAMPLE 3.3
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 3.3
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.
SOLUTION
f 0 = 3x 2 − 3, f 00 (x) = 6x
EXAMPLE 3.3
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.
SOLUTION
f 0 = 3x 2 − 3, f 00 (x) = 6x
Taking p = 0.1 ∈ [0, 0.5], check the sign of f 0 (x) f 00 (x)
at p ,
EXAMPLE 3.3
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.
SOLUTION
f 0 = 3x 2 − 3, f 00 (x) = 6x
Taking p = 0.1 ∈ [0, 0.5], check the sign of f 0 (x) f 00 (x)
at p , f 0 (0, 1) f 00 (0.1) < 0, then choose x 0 = 0.
EXAMPLE 3.3
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.
SOLUTION
f 0 = 3x 2 − 3, f 00 (x) = 6x
Taking p = 0.1 ∈ [0, 0.5], check the sign of f 0 (x) f 00 (x)
at p , f 0 (0, 1) f 00 (0.1) < 0, then choose x 0 = 0.
f x 3 − 3x + 1
Consider g (x) = x − 0 = x − ,
f 3x 2 − 3
EXAMPLE 3.3
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.
SOLUTION
f 0 = 3x 2 − 3, f 00 (x) = 6x
Taking p = 0.1 ∈ [0, 0.5], check the sign of f 0 (x) f 00 (x)
at p , f 0 (0, 1) f 00 (0.1) < 0, then choose x 0 = 0.
f x 3 − 3x + 1
Consider g (x) = x − 0 = x − , x n = g (x n−1 ).
f 3x 2 − 3
x 1 0.333333
x 2 0.347222
x 3 0.347296
EXAMPLE 3.4
Given equation sin x − e −x = 0, using Newton’s method
to find approximate root on [0, 1] and estimate its
error.
EXAMPLE 3.4
Given equation sin x − e −x = 0, using Newton’s method
to find approximate root on [0, 1] and estimate its
error.
SOLUTION
f 0 = cos x + e −x , f 00 = − sin x − e −x
EXAMPLE 3.4
Given equation sin x − e −x = 0, using Newton’s method
to find approximate root on [0, 1] and estimate its
error.
SOLUTION
f 0 = cos x + e −x , f 00 = − sin x − e −x
since f (0) f 00 (0) > 0 so we choose x 0 = 0
x1 0.5
x 2 0.585644
x 3 0.588529