0% found this document useful (0 votes)
4 views16 pages

MAT361-Lec.-10

Uploaded by

vevocrs
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)
4 views16 pages

MAT361-Lec.-10

Uploaded by

vevocrs
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/ 16

Alexandria Higher Institute of

Engineering & Technology


(AIET)
Numerical Methods
MAT 361
EME-3- ECE-3- CE-3

Dr. Omnia A. Gawdt

Dr. Omnia Gawdt 1


Numerical Methods
MAT 361
EME-3- ECE-3- CE-3

Lecture (10)

Solution of non-linear equation

Newton-Raphson method

Dr. Omnia A. Gawdt

Dr. Omnia Gawdt 2


3. Newton- Raphson Method
This technique is called “Open” method
𝒘𝒊𝒕𝒉
Newton-Raphson method based on 𝒙𝟎 = 𝒊𝒏𝒊𝒕𝒊𝒂𝒍 𝒑𝒐𝒊𝒏𝒕
Taylor expansion, the general iteration formula:
𝒙𝟏 − 𝒙𝟎 𝟐 ሖ
𝒇 𝒙𝟏 = 𝒇 𝒙𝟎 + 𝒙𝟏 − 𝒙𝟎 𝒇ሖ 𝒙𝟎 + ሖ 𝟎) + ⋯
𝒇(𝒙
𝟐!

𝒇 𝒙𝟏 = 𝟎 𝐭𝐡𝐞𝐧 𝒙𝟏 is the root


Hence, the value of 𝒙𝟏 − 𝒙𝟎 𝟐 becomes very small and we can
neglect it. And the expression will have the following form:
𝒇 𝒙𝟎
𝒙𝟏 = 𝒙𝟎 −
𝒇ሖ (𝒙𝟎 )
𝒇 𝒙𝒏
𝒙𝒏+𝟏 = 𝒙𝒏 −
And the general form will be: 𝒇ሖ 𝒙𝒏
Dr. Omnia Gawdt 3
3. Newton- Raphson Method
Newton-Raphson method based on the Taylor expansion, the
general iteration formula:
𝒇 𝒙𝒏
𝒙𝒏+𝟏 = 𝒙𝒏 − 𝒘𝒊𝒕𝒉 𝒙𝟎
𝒇ሖ (𝒙𝒏 )
𝒀 𝒇ሖ (𝒙𝟎 )
𝒇(𝒙𝟎 ) 𝒇ሖ (𝒙𝟏 )

𝒇(𝒙𝟏 )
𝒇ሖ (𝒙𝟐 )
𝒇(𝒙𝟐 )
𝒇(𝒙𝟑 )
𝒇(𝒙𝒏 ) = 𝟎
𝑿
𝒙𝒓𝒐𝒐𝒕 𝒙 𝒙𝟐 𝒙 𝟏 𝒙𝟎
𝟑
𝒇 𝒙

Dr. Omnia Gawdt 4


Example (1): Use Newton Raphson method to find the root
of the function:
Solution
𝒇 𝒙𝒏 For trigonometric
𝒙𝒏+𝟏 = 𝒙𝒏 −
𝒇ሖ (𝒙𝒏 ) functions work with
radian mode

𝒏 𝒙𝒏 𝒇(𝒙𝒏 ) 𝒇ሖ (𝒙𝒏 ) 𝒙𝒏+𝟏

0 𝒙𝟎 = 3.0 8.4355 9.95997 𝒙𝟏 =2.153058


1 2.153058 1.29477 6.50577 1.95404
2 1.95404 0.108438 5.403795 1.93397
3 1.93397 0.001152 5.288919 1.933754
4 1.933754 0.00000012 5.287670 1.933754

Dr. Omnia Gawdt The root 5


Example (2): Use Newton Raphson method to find the root
For trigonometric
of the function: functions work with
Solution 𝒇 𝒙 = 𝐜𝐨𝐬 𝒙 − 𝒙𝒆𝒙 = 𝟎 radian mode

𝒇ሖ 𝒙 = −𝒔𝒊𝒏 𝒙 − (𝟏 + 𝒙)𝒆𝒙
𝒇 𝒙𝒏
𝒙𝒏+𝟏 = 𝒙𝒏 −
𝒇ሖ (𝒙𝒏 )
𝒏 𝒙𝒏 𝒇(𝒙𝒏 ) 𝒇ሖ (𝒙𝒏 ) 𝒙𝒏+𝟏

0 𝒙𝟎 = 0 1 -1 𝒙𝟏 = 𝟏
1 1 -2.17798 -6.27803 0.65308
2 0.65308 -0.4606 -3.7839 0.53135
3 0.53135 -0.0418 -3.11187 0.5179
4 0.5179 -4.948× 𝟏𝟎−𝟒 -3.043 0.5177

The root
Dr. Omnia Gawdt 6
Problem (1 ): Use Newton Raphson method to find the
root of the function: 𝒆𝒙 𝒔𝒊𝒏 𝒙 − 𝟐𝒙 = 𝟓 Take 𝒙𝟎 = −𝟐

Solution:
The root = - 2.5232

Problem (2): Use Newton Raphson method to find the


root of the function: Take 𝒙𝟎 = 𝟏. 𝟑

𝒍𝒏 𝒙 − 𝟏 − 𝒄𝒐𝒔 𝒙 − 𝟏 = 𝟎

Solution:
The root = 2.3029

Dr. Omnia Gawdt 7


Some Deduction from Newton-Raphson method.
Evaluate the following by Newton’s iteration method

▪ 𝟐𝟖
Let 𝒙= 𝟐𝟖 , Now we need to find the value of 𝒙
𝒙𝟐 = 𝟐𝟖 𝒙𝟐 − 𝟐𝟖 = 𝟎 𝒇 𝒙 = 𝒙𝟐 − 𝟐𝟖 = 𝟎
𝒇 𝒙 = 𝒙𝟐 − 𝟐𝟖 = 𝟎 𝟐𝟓 < 𝟐𝟖 < 𝟑𝟔
𝒇ሖ 𝒙 = 𝟐𝒙
𝒇 𝒙𝒏 𝒙𝟎 = 5 or 𝒙𝟎 = 6
𝒙𝒏+𝟏 = 𝒙𝒏 −
𝒇ሖ (𝒙𝒏 )
𝒏 𝒙𝒏 𝒇(𝒙𝒏 ) 𝒇ሖ (𝒙𝒏 ) 𝒙𝒏+𝟏
0 𝒙𝟎 = 5 -3 10 𝒙𝟏 = 5.3
1 5.3 0.09 10.6 5.29151
2 5.29151 0.00008 10.583 5.29150
Then 𝟐𝟖 ≅ 𝟓. 𝟐𝟗𝟏𝟓𝟎 P.R.E = 𝟒. 𝟗𝟔 × 𝟏𝟎−𝟓
Dr. Omnia Gawdt 8
Some Deduction from Newton-Raphson method.
Evaluate the following by Newton’s iteration method
𝟑
▪ 𝟐𝟒
𝟑
Let 𝒙= 𝟐𝟒, Now we need to find the value of 𝒙
𝒇 𝒙 = 𝒙𝟑 − 𝟐𝟒 = 𝟎 𝟖 < 𝟐𝟒 < 𝟐𝟕
𝒇ሖ 𝒙 = 𝟑𝒙𝟐
𝒇 𝒙𝒏 𝒙𝟎 = 2 or 𝒙𝟎 = 3
𝒙𝒏+𝟏 = 𝒙𝒏 −
𝒇ሖ (𝒙𝒏 )
𝒏 𝒙𝒏 𝒇(𝒙𝒏 ) 𝒇ሖ (𝒙𝒏 ) 𝒙𝒏+𝟏
0 𝒙𝟎 = 3 3 27 𝒙𝟏 = 2.8889
1 2.8889 0.11002 25.037 2.8845
2 2.8845 0.00002 24.9610 2.88449
Then
𝟑
𝟐𝟒 ≅ 2.88449 P.R.E = 𝟑. 𝟏𝟕 × 𝟏𝟎−𝟒

Dr. Omnia Gawdt 9


Some Deduction from Newton-Raphson method.
Evaluate the following by Newton’s iteration method
−𝟏ൗ𝟓
▪ 𝟑𝟎
Let 𝒙 = 𝟑𝟎 −𝟏ൗ𝟓 , Now we need to find the value of 𝒙

𝒇 𝒙 = 𝒙𝟓 − 𝟑𝟎 −𝟏
=𝟎
−𝟏ൗ𝟓
𝒇ሖ 𝒙 = 𝟓𝒙𝟒 𝟑𝟐 = 𝟏ൗ𝟐

𝒇 𝒙𝒏
𝒙𝒏+𝟏 = 𝒙𝒏 −
𝒇ሖ (𝒙𝒏 )
𝒏 𝒙𝒏 𝒇(𝒙𝒏 ) 𝒇ሖ (𝒙𝒏 ) 𝒙𝒏+𝟏
0 𝒙𝟎 = 0.5 -0.0021 0.3125 𝒙𝟏 = 0.5067
1 0.5067 0.000074 0.3296 0.506449
2 0.506449 0.000001
−𝟏ൗ𝟓
Then 𝟑𝟎 ≅ 0.506449 Dr. Omnia Gawdt 10
Some Deduction from Newton-Raphson method.
Deduce the iterative formula to find the value of 𝑵, where
𝑵 is a positive integer
Let 𝒙 = 𝑵, Now we need to find the value of 𝒙
𝒙𝟐 = 𝑵 𝒇 𝒙 = 𝒙𝟐 − 𝑵 = 𝟎 𝒇ሖ 𝒙 = 𝟐 𝒙
𝒇 𝒙𝒏 𝒙𝟐𝒏 − 𝑵
𝒙𝒏+𝟏 = 𝒙𝒏 − 𝒙𝒏+𝟏 = 𝒙𝒏 −
𝒇ሖ (𝒙𝒏 ) 𝟐 𝒙𝒏

𝟏 𝑵
𝒙𝒏+𝟏 = (𝒙𝒏 + )
𝟐 𝒙𝒏

▪ 𝟐𝟖 𝒙𝟎 = 5 𝒙𝒏 𝒙𝒏+𝟏
𝒙𝟎 = 5 𝒙𝟏 = 5.3
𝟏 28 5.3 5.29151
𝒙𝒏+𝟏 = (𝒙𝒏 + )
𝟐 𝒙𝒏 5.29151 5.29150
Then 𝟐𝟖 ≅ 𝟓. 𝟐𝟗𝟏𝟓𝟎 Dr. Omnia Gawdt 11
Example (3): Use Newton Raphson method to Deduce the iterative
𝟏
formula to find the value of , where 𝑵 is a positive integer. And hence
𝑵
𝟏
evaluate the approx. value of and compute the P.R.E.
𝟏𝟒
𝟏
Solution Let 𝒙=
𝑵
𝟏 𝟏
𝟐
𝒙 = 𝒇 𝒙 =𝒙 − =𝟎 𝟐 𝒇ሖ 𝒙 = 𝟐 𝒙
𝑵 𝑵
𝒇 𝒙𝒏 𝟏 𝟏
𝒙𝒏+𝟏 = 𝒙𝒏 − 𝒙𝒏+𝟏 = (𝒙𝒏 + )
ሖ𝒇 (𝒙𝒏 ) 𝟐 𝑵 𝒙𝒏
𝟏 𝟏
▪ 𝒙𝟎 =
𝟏𝟔
= 𝟎. 𝟐𝟓 𝒙𝒏 𝒙𝒏+𝟏
𝟏𝟒
𝒙𝟎 = 𝟎. 𝟐𝟓 𝒙𝟏 = 𝟎. 𝟐𝟔𝟕𝟖𝟔
𝟎. 𝟐𝟔𝟕𝟖𝟔 0.26726
𝟏 𝟏
𝒙𝒏+𝟏 = (𝒙𝒏 + ) 0.26726 0.26726
𝟐 𝟏𝟒 𝒙𝒏
𝟏
Then ≅ 0.26726
𝒆𝒙𝒂𝒄𝒕−𝒂𝒑𝒑𝒓𝒐𝒙. 𝟏𝟒
P.R.E. 𝜺𝒓 = ∗ 𝟏𝟎𝟎 = 𝟎%
𝒆𝒙𝒂𝒄𝒕
Dr. Omnia Gawdt 12
Failure of the Newton-Raphson Method

1- For the function 𝒇 𝒙 = 𝒙 𝒙 − 𝟏 , 𝒙𝟎 = 𝟎. 𝟓


then 𝒇ሖ 𝒙𝟎 = 𝟎 and therefore the formula
𝒇 𝒙𝒏
𝒙𝒏+1 = 𝒙𝒏 − will be undefined.
𝒇ሖ 𝒙𝒏
2- If our first guess (or any guesses thereafter) is a point at
which there is a horizontal tangent line, 𝒇ሖ 𝒙 = 𝑪
then this line will never hit the x-axis, and Newton's Method will
fail to locate a root.

Dr. Omnia Gawdt 13


3- The function of the following figure

Newton's method doesn't converge to the root.

Dr. Omnia Gawdt 14


Problem (3):Develop an algorithm using Newton-Raphson
method to find the fourth root of a positive number 𝑵,
𝟒
and hence compute the approximated value of 𝟑𝟐. And
compute the P.R.E.

Solution:
The root = 2.3784
P.R.E = 0 %

Dr. Omnia Gawdt 15


The End of Lecture (10)

Thank you

Dr. Omnia Gawdt 16

You might also like