0% found this document useful (0 votes)
26 views2 pages

Num470s Assignment 1 Memo

This document contains an assignment memo with 4 questions regarding numerical methods: 1) The first question discusses the bisection method and modified false position method to approximate roots of functions in given intervals. The bisection method found a root of f(x)=x^4+x^3-15 in [1,2] to within 0.000461 accuracy in 8 iterations. 2) The second question uses the Newton-Raphson method to approximate the square root of 111 to within 0.00002 accuracy in 3 iterations. 3) The third question uses the fixed point method to approximate a root of f(x)=x^4+x^3-15 in [-3,-2],

Uploaded by

glory
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)
26 views2 pages

Num470s Assignment 1 Memo

This document contains an assignment memo with 4 questions regarding numerical methods: 1) The first question discusses the bisection method and modified false position method to approximate roots of functions in given intervals. The bisection method found a root of f(x)=x^4+x^3-15 in [1,2] to within 0.000461 accuracy in 8 iterations. 2) The second question uses the Newton-Raphson method to approximate the square root of 111 to within 0.00002 accuracy in 3 iterations. 3) The third question uses the fixed point method to approximate a root of f(x)=x^4+x^3-15 in [-3,-2],

Uploaded by

glory
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/ 2

MODULE: NUMERICAL METHODS CODE:NUM470S

ASSESSMENT: ASSIGNMENT 1 MEMO

LECTURER: Mr. B. FUNDZAMA TOTAL MARK: 35

--------------------------------------------------------------------------------------------------------------------------------------

Instruction: In all your calculations, round off to 6 decimal places.

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

1.4 Use 5 iterations fixed point method to approximate the root of


𝑓(𝑥) = 𝑥 4 + 𝑥 3 − 15
In the interval [−3, −2]. Start by first finding a suitable function 𝑔(𝑥) and then show
that your choice of 𝑔(𝑥) will converge to a unique root in [-3, -2].

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

You might also like