Professional Documents
Culture Documents
NMO-Lecture 4 - Newtons Raphson Method
NMO-Lecture 4 - Newtons Raphson Method
Class: TE
Course: Numerical Methods and
Optimization
Unit: Roots of Equation
Lecture 01: Types of Root
Topics 02
Let the tangent has coordinate (𝑥1 , 𝑦1 ) on the curve and (𝑥2 , 0) on
the point where it intersect x axis
dy 𝑦2 −𝑦1
1. Slope = = = y’
dx 𝑥2 −𝑥1
0−𝑦1
2. Slope = 𝑦1 ′= f’ (x1 ) = 𝑥 = y’
2 −𝑥1
f(𝑥 )
5. 𝑥2 = 𝑥1 − f ’(x1 )
1
Example 5: Using Newton Raphson method and initial guess as zero ,find root of 𝑥 3 −5𝑥 + 3 = 0. Do 3 iterations only.
f(𝒙𝟏 ) = 03 −5 ∗ 0 + 3
f(𝒙𝟏 ) = 3 4. Iteration 2 𝒙𝟏 = 0.6
Example 5: Using Bisection method and initial guess as zero ,find root of 𝑥 3 −5𝑥 + 3 = 0. Do 3 iterations only.
Solution :
5. Iteration 3 𝒙𝟏 = 0.6551
f(𝒙𝟏 ) = 0.65513 −5 ∗ 0.6551 + 3 = 0.0056
f’ (𝒙𝟏 ) = 3 ∗ 0.62 −5 = −3.7125
f(𝑥1) 𝟎.𝟎𝟎𝟓𝟔
𝑋2 = 𝑋1 − = 0.6551 − = 0.6566
f’(𝑥1) −𝟑.𝟕𝟏𝟐𝟓
1. 0 3 -5 0.6
л
Example 6: Find the root of equation 𝑠𝑖𝑛𝑥 − 𝑥. 𝑐𝑜𝑠𝑥 using Newtons-Raphson method. Assume initial guess as 𝑥1 = 3 up
2
to accuracy of 0.00001
. • Check Accuracy: 𝒙𝟐 − 𝒙𝟏 < Accuracy
Solution :
f(𝑥) = 𝑠𝑖𝑛𝑥 − 𝑥. 𝑐𝑜𝑠𝑥 𝟒. 𝟓𝟎𝟎𝟎 − 𝟒. 𝟕𝟏𝟐𝟑 = 0.2124 > 0.00001
л
Example 6: Find the root of equation 𝑠𝑖𝑛𝑥 − 𝑥. 𝑐𝑜𝑠𝑥 using Newtons-Raphson method. Assume initial guess as 𝑥1 = 3 up
2
to accuracy of 0.00001
. Iteratio 𝒙𝟏 f(𝒙𝟏 ) f’ (𝒙𝟏 ) 𝒙𝟐 Accuracy
Solution :
n No.
f(𝑥) = 𝑠𝑖𝑛𝑥 − 𝑥. 𝑐𝑜𝑠𝑥
1. 4.7123 -0.9981 -4.7119 4.5000 0.2124
f’(𝑥) = 𝑐𝑜𝑠𝑥 − 𝑥 −𝑠𝑖𝑛𝑥 + 𝑐𝑜𝑠𝑥 = 𝑥. 𝑠𝑖𝑛𝑥
2. 4.5000 -0.0289 -4.3988 4.4934 0.0065
4. Iteration 3 𝒙𝟏 = 4.4934
3. 4.4934 0.000041 -4.3860 4.493409 0.000009
f(𝒙𝟏 ) = sin(4.4934) − (4.4934)𝑐𝑜𝑠(4.4934)
f(𝒙𝟏 ) = −0.000041
f’ (𝒙𝟏 ) = 𝑥. 𝑠𝑖𝑛𝑥
f’(𝒙𝟏 )= (4.4934). 𝑠𝑖𝑛(4.4934) = −4.3860
f(𝑥 ) −𝟎.𝟎𝟎𝟎𝟎𝟒𝟏
4. 𝑋2 = 𝑋1 − f’(𝑥1 ) = 4.4934 − −𝟒.𝟑𝟖𝟔𝟎
= 4.493409
1
Example 7: Find the root of equation 𝑥 3 − 𝑐𝑜𝑠 2 𝑥 using Newtons-Raphson method. up to accuracy of 0.02.Explain
Convergence criteria for this method.
Solution :
f(𝑥1 ) X f’’(𝑥1) −𝟎.𝟕𝟎𝟖𝟎∗𝟓.𝟏𝟔𝟕𝟕
f(𝑥) = 𝑥3 − 𝑐𝑜𝑠 2 𝑥 3. Check 2 1= = 0.2394 <1
f’(𝑥1) 𝟎.𝟑.𝟗𝟎𝟗𝟐𝟗𝟐
f’(𝑥) = 3𝑥 2 − 2. 𝑐𝑜𝑠𝑥 −𝑠𝑖𝑛𝑥 = 3𝑥 2 +𝑠𝑖𝑛2𝑥
4. Iteration 1 𝒙𝟏 = 1
f’′(𝑥) = 6𝑥 + 2. 𝑐𝑜𝑠2𝑥
f(𝒙𝟏 ) = 03 − 𝑐𝑜𝑠 2 0
Let initial guess 𝒙𝟏 = 1
f(𝒙𝟏 ) = 𝟎. 𝟕𝟎𝟖𝟎𝟕
f(𝒙𝟏 ) = 𝑥 3 − 𝑐𝑜𝑠 2 𝑥 = 13 − 𝑐𝑜𝑠 2 1 = 0 − 1
f’ (𝒙𝟏 ) = 3.02 + 𝑠𝑖𝑛2.0
f(𝒙𝟏 ) = 0.70807
f’(𝒙𝟏 ) = 3.90929
f’ (𝒙𝟏 ) = 3𝑥 2 + 𝑠𝑖𝑛2𝑥 = 3 ∗ 12 + sin 2 ∗ 1=0
f(𝑥 ) 𝟎.𝟕𝟎𝟖𝟎𝟕
f’(𝒙𝟏 ) =3.90929 4. 𝑋2 = 𝑋1 − f’(𝑥1 ) = 0 − 𝟑.𝟗𝟎𝟗𝟐𝟗
= 𝟎. 𝟖𝟏𝟖𝟖
1
Example 7: Find the root of equation 𝑥 3 − 𝑐𝑜𝑠 2 𝑥 using Newtons-Raphson method. up to accuracy of 0.02.Explain
Convergence criteria for this method.
f(𝑥 ) 𝟎.𝟎𝟖𝟐𝟑
4. 𝑋2 = 𝑋1 − f’(𝑥1 ) = 0.8188 − 𝟑.𝟎𝟎𝟗
= 0.7914
1
5. replace 𝒙𝟏 by 𝒙𝟐
• Check Accuracy: 𝒙𝟐 − 𝒙𝟏 < Accuracy
𝟎. 𝟕𝟗𝟏𝟒 − 𝟎. 𝟖𝟏𝟐𝟐 =0.0273 > 0.02