Assignment 1 Answers
Year 2026
0027 68 628 1800
,
, QUESTION 1
𝑥 = cos 𝑥
𝑥 − cos 𝑥 = 0
𝑓(𝑥) = 𝑥 − cos 𝑥
The secant method formula is given by:
𝑥𝑖 − 𝑥𝑖−1
𝑥𝑖+1 = 𝑥𝑖 − 𝑓(𝑥𝑖 )
𝑓(𝑥𝑖 ) − 𝑓(𝑥𝑖−1)
Initial guesses: 𝑥0 = 0 ; 𝑥1 = 1
Iteration 1
𝑓(0) = 0 − cos 0 = −1
𝑓(1) = 1 − cos 1 = 0.4597
𝑥1 − 𝑥0
𝑥2 = 𝑥1 − 𝑓(𝑥1 )
𝑓(𝑥1 ) − 𝑓(𝑥0)
1−0
𝑥2 = 1 − × 0.4597
0.4597 − (−1)
𝑥2 = 0.6851
Iteration 2
𝑓(0.6851) = 0.6851 − cos 0.6851 = −0.0893
𝑥2 − 𝑥1
𝑥3 = 𝑥2 − 𝑓(𝑥2 )
𝑓(𝑥2 ) − 𝑓(𝑥1)
0.6851 − 1
𝑥3 = 0.6851 − × (−0.0893)
(−0.0893) − 0.4597
𝑥3 = 0.7363