Lecture Note Module-6 Numerical Methods
Lecture Note Module-6 Numerical Methods
𝒇 𝒙𝟏
𝒙𝟐 = 𝒙𝟏 − ′
𝒇 𝒙𝟏
………
How to find 𝒙𝟎 ?
Identify interval of solution 𝑥 , 𝒙𝟎 such that 𝑓 𝑥 = −𝑣𝑒 𝑎𝑛𝑑 𝑓 𝑥0 = +𝑣𝑒
𝒇 𝒙𝟏
𝒙𝟐 = 𝒙𝟏 −
𝒇′ 𝒙𝟏
𝒇 𝒙𝟏 𝒙𝟏 3 + 𝒙𝟏 − 1 𝟎. 𝟕𝟓 3 + 0.75 − 1
𝒙𝟐 = 𝒙𝟏 − ′ = 𝟎. 𝟕𝟓 − = 𝟎. 𝟕𝟓 −
𝒇 𝒙𝟏 𝟑𝒙𝟏 𝟐 + 𝟏 𝟑 𝟎. 𝟕𝟓 𝟐 + 𝟏
𝟎. 𝟏𝟕𝟏𝟖𝟕
= 𝟎. 𝟕𝟓 − = 𝟎. 𝟔𝟖𝟔
𝟐. 𝟔𝟖𝟕𝟓
𝟎.𝟎𝟎𝟖𝟖
= 𝟎. 𝟔𝟖𝟔 − = 𝟎.68235
𝟐.𝟒𝟏𝟏𝟕𝟖𝟖
𝒇 𝒙𝟑 𝒙𝟑 3 + 𝒙𝟑 − 1 𝟎. 𝟔𝟖𝟐𝟑𝟓 3 + 𝟎. 𝟔𝟖𝟐𝟑𝟓 − 1
𝒙𝟒 = 𝒙𝟑 − ′ = 𝟎. 𝟔𝟖𝟐𝟑𝟓 − 𝟐
= 𝟎. 𝟔𝟖𝟔 −
𝒇 𝒙𝟑 𝟑𝒙𝟑 + 𝟏 𝟑 𝟎. 𝟔𝟖𝟐𝟑𝟓 𝟐 + 𝟏
𝟎.𝟎𝟎𝟎𝟎𝟓
= 𝟎. 𝟔𝟖𝟐𝟑𝟓 − = 𝟎.682329
𝟐.𝟑𝟗𝟔𝟖
x=0.6823 [we stopped this process as in last two steps got the same values]
Solution:
Finding 𝒙𝟎
𝑓 1 = 1. sin 1 + cos 1 = 1.381773291
𝑓 2 = 2. sin 2 + cos 2 = 1.402448017
𝑓 3 = 3. sin 3 + cos 3 = −0.5666324724
Since f(x) changes its sign from –ve to +ve as x goes from 2 to 3 , hence there is a root in (2,3) .
𝒙𝟎 = 𝟑
𝒇 𝒙𝟎 𝒙𝟎 𝑠𝑖𝑛𝒙𝟎 + cos 𝒙𝟎 𝟑 sin 3 + cos 𝟑 −𝟎. 𝟓𝟔𝟔𝟔𝟑𝟐𝟒𝟕𝟐𝟒
𝒙𝟏 = 𝒙𝟎 − = 𝟑 − = 𝟑 − = 𝟑 −
𝒇′ 𝒙𝟎 𝒙𝟎 𝒄𝒐𝒔𝒙𝟎 𝟑𝒄𝒐𝒔 𝟑 −𝟐. 𝟗𝟔𝟗𝟗𝟕𝟕𝟒𝟗
= 𝟑 − 𝟎. 𝟏𝟗𝟎𝟕𝟖𝟔 = 𝟐. 𝟖𝟎𝟗𝟐𝟏𝟑
𝒇 𝒙𝟏 𝒙𝟏 𝑠𝑖𝑛𝒙𝟏 + cos 𝒙𝟏 𝟐. 𝟖𝟎𝟗𝟐𝟏𝟑 sin 𝟐. 𝟖𝟎𝟗𝟐𝟏𝟑 + cos 𝟐. 𝟖𝟎𝟗𝟐𝟏𝟑
𝒙𝟐 = 𝒙𝟏 − ′ = 𝟐. 𝟖𝟎𝟗𝟐𝟏𝟑 − = 𝟐. 𝟖𝟎𝟗𝟐𝟏𝟑 −
𝒇 𝒙𝟏 𝒙𝟏 𝒄𝒐𝒔𝒙𝟏 𝟐. 𝟖𝟎𝟗𝟐𝟏𝟑𝒄𝒐𝒔 𝟐. 𝟖𝟎𝟗𝟐𝟏𝟑
−𝟎. 𝟎𝟐𝟖𝟔𝟒𝟏𝟎𝟎𝟏𝟔
= 𝟐. 𝟖𝟎𝟗𝟐𝟏𝟑 −
−𝟐. 𝟔𝟓𝟓𝟒𝟔𝟎𝟕𝟏𝟓
0.683236
= = 0.6821
1.00156
𝒙 = 𝟎. 𝟔𝟖𝟐𝟏
Solution :
1
𝑥= 13 − 𝑦 − 2𝑧 … … … … … … (𝑖)
10
1
𝑦= 15 − 2𝑥 − 3𝑧 … … … … … … (𝑖𝑖)
10
1
𝑧= 14 − 𝑥 − 3𝑦 … … … … … … (𝑖𝑖𝑖)
10
Iteration-1: 𝒙 = 𝟎, 𝒚 = 𝟎, 𝒛 = 𝟎
1
𝑥= 13 − 0 − 2 ∗ 0 = 1.3
10
1
𝑦= 15 − 2 ∗ 0 − 3 ∗ 0 = 1.5
10
1
𝑧= 14 − 0 − 3 ∗ 0 = 1.4
10
Solution:
Solution :
1
𝑥= 17 − 𝑦 − 𝑧 … … … … … … (𝑖)
15
1
𝑦= 18 − 2𝑥 − 𝑧 … … … … … … (𝑖𝑖)
15
1
𝑧= 18 − 𝑥 − 2𝑦 … … … … … … (𝑖𝑖𝑖)
15
Iteration-1:
𝒙 = 𝟎 1.133333
𝒚 = 𝟎 1.04888
𝒛 = 𝟎 0.984594
1
𝑥= 17 − 0 − 0 = 1.13333
15
1
𝑦= 18 − 2 ∗ 1.13333 − 0 = 1.04888
15
1
𝑧= 18 − 1.13333 − 2 ∗ 1.04888 = 0.984594
15
1
𝑥= 17 − 1.00132 − 0.99997 = 0.999914
15
1
𝑦= 18 − 2 ∗ 0.999914 − 𝟎. 𝟗𝟗𝟗𝟗𝟕 = 1.00001
15
1
𝑧= 18 − 0.999914 − 2 ∗ 1.00001 = 1.00000
15
Prof. Divesh Singh KJSIEIT
Continue…
Iteration-4:
𝒙 = 0.999914 0.999999
𝒚 = 1.00001 1
𝒛 = 1.00000 1
1
𝑥= 17 − 1.00001 − 1 = 0.999999
15
1
𝑦= 18 − 2 ∗ 0.999999 − 𝟏 = 1
15
1
𝑧= 18 − 0.999999 − 2 ∗ 1 = 1
15
Ans: 𝒙 = 𝟏, 𝒚 = 𝟏, 𝒛 = 𝟏