Num470s Assignment 1 Memo
Num470s Assignment 1 Memo
--------------------------------------------------------------------------------------------------------------------------------------
QUESTION 1
1.1 State the conditions that must met to be guaranteed that 𝑓(𝑥) has a root in the interval
[𝑎, 𝑏].
𝑓(𝑥) must be continuous in [𝑎, 𝑏], and
𝑓(𝑎) × 𝑓(𝑏) < 0.
1.2
𝑓(𝑥) = 𝑥 4 + 𝑥 3 − 15,
1.2.1 Show that the function has a root in the interval [1, 2].
The polynomial 𝑓(𝑥) is continouos in [1, 2] and
𝑓(1) × 𝑓(2) = −13 × 9 = −117 < 0.
𝑓(𝑥) has a root in [1, 2].
1.2.2 Determine the number of iterations required to achieve an accuracy of 𝜀=
4 × 10−3 when approximating the root of 𝑓(𝑥) in the interval [1, 2].
𝑏−𝑎
log ( 𝜖 )
𝑛≥
log(2)
2−1
log ( )
≥ 4 × 10−3
log(2)
≥ 7.965778 ≈ 8𝑖𝑡𝑒𝑟𝑎𝑡𝑖𝑜𝑛𝑠
1.2.3 Apply the number of iterations found in 1.2.2 of the Bisection method to
approximate the root of the function 𝑓(𝑥) in the interval [1, 2].
n a b p f(a) f(b) f(p)
1 1 2 1,5 -13 9 -6,5625
2 1,5 2 1,75 -6,5625 9 -0,26172
3 1,75 2 1,875 -0,26172 9 3,951416
4 1,75 1,875 1,8125 -0,26172 3,951416 1,746597
5 1,75 1,8125 1,78125 -0,26172 1,746597 0,718629
6 1,75 1,78125 1,765625 -0,26172 0,718629 0,222595
7 1,75 1,765625 1,757813 -0,26172 0,222595 -0,021
8 1,757813 1,765625 1,761719 -0,021 0,222595 0,100433
1.2.4 Apply 6 iterations of the Modified False Position method to approximate the root of
𝑓(𝑥) in the interval [1, 2].
n x0 x1 x2 f(x0) f(x1) f(x2)
1 1 2 1,590909 -13 9 -4,56751
2 1,590909 2 1,796977 -4,56751 9 1,229923
3 1,590909 1,796977 1,75326 -4,56751 1,229923 -0,16163
4 1,75326 1,796977 1,762359 -0,16163 1,229923 0,120399
5 1,75326 1,762359 1,758475 -0,16163 0,120399 -0,00047
6 1,758475 1,762359 1,758505 -0,00047 0,120399 0,000461
1.2.5 State which method between the bisection method and the Modified False position
method better approximation? Justify your answer.
The modified False position method gave a better approximation.
At the sixth iterations, |𝑓(𝑥2 )| = 0.000461 < |𝑓(𝑝6 )| = 0.222595.
1.3 Use the Newton-Raphson methods to approximate √111 with the accuracy of
|𝑥𝑛+1 − 𝑥𝑛 | ≤ 2 × 10−4 .
𝑥 = √111,𝑓 (𝑥) = 𝑥 2 − 111 = 0
𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 − ′ , 𝑓(𝑥𝑛 ) ≠ 0.
𝑓 (𝑥𝑛 )
𝑥𝑛2 − 111
𝑥𝑛+1 = 𝑥𝑛 −
2𝑥𝑛
n x_n |x_n+1-x_n|
0 10
1 10,55 0,55
2 10,53566 0,014336
3 10,53565 1E-05
4
𝑔(𝑥) = − √15 − 𝑥 3
Is the suitable re-arrangement of 𝑓 to converge to the root of 𝑓 in [−3, −2],
Since 𝑔(−3) = −2.54573 ∈ (−3, −2) and 𝑔(−2) = −2.18994 ∈ (−3, −2)
n x_n=g(x_n) n x_n=g(x_n)
0 -3 0 -2
1 -2,54573 1 -2,18994
2 -2,36904 2 -2,24722
3 -2,30638 3 -2,26563
4 -2,28515 4 -2,27165
5 -2,27809 5 -2,27363
6 -2,27575 6 -2,27428
7 -2,27498 7 -2,2745
8 -2,27473 8 -2,27457