Professional Documents
Culture Documents
HW#5
HW#5
HW#5
Faculty of Engineering
Civil Engineering Department
Submitted to:
Prof. Salem Alsanusi
20, Nov, 2022
Prepared by:
Bashir A. El-Saadawi
CE 501 Numerical Analysis
Q1) Using Bisection method find the smallest positive root of x3 – x – 4 = 0 which is correct to
two decimal places.
● Solution:
𝑓 1 1 1 4 4
𝑓 2 2 2 4 2
A root of f (x) = x3 – x – 4 = 0 lies in between 1 and 2.
1 2
𝑥 1.5
2
𝑓 1.5 1.5 1.5 4 2.125
the root lies in between 1.5 and 2.
1.5 2
𝑥 1.75
2
𝑓 1.75 1.75 1.75 4 0.390625
the root lies in between 1.75 and 2.
1.75 2
𝑥 1.875
2
⋮
𝑥 1.8125
𝑥 1.78125
𝑥 1.796875
1
CE 501 Numerical Analysis
Q2) Obtain a root correct to three decimal places of x3 – 18 = 0, using Bisection Method.
● Solution:
𝑓 3 3 18 9
𝑓 2.5 2.5 18 2
A root of f (x) = x3 – 18 = 0 lies in between 2.5 and 3.
2.5 3
𝑥 2.75
2
𝑓 2.75 2.75 18 2.796875
the root lies in between 2.5 and 2.75.
𝑥 2.625
⋮
𝑥 2.5625
𝑥 2.59375
𝑥 2.609375
𝑥 2.6171875
𝑥 2.61059375
2
CE 501 Numerical Analysis
Q3) Find a root of the equation xex – 1 = 0 which lies in (0, 1), using Bisection Method.
● Solution:
𝑓 0 0 𝑒 1 1
𝑓 1 1 𝑒 1 1.718
0 1
𝑥 0.5
2
.
𝑓 0.5 0.5 𝑒 1 0.175
the root lies in between 0.5 and 1.
𝑥 0.75
⋮
𝑥 0.625
𝑥 0.5625
𝑥 0.59375
𝑥 0.578125
𝑥 0.5703125
𝑥 0.56640625
𝑥 0.568359375
𝑥 0.5673828125
3
CE 501 Numerical Analysis
Q4) Using Method of False position, obtain a root of x3 +x2 + x + 7 = 0, correct to three decimal
places.
● Solution:
𝑓 2 1 𝑎𝑛𝑑 𝑓 3 14
the root lies in between -2 and -3.
Take a = -2 and b = -3
𝑎𝑓 𝑏 𝑏𝑓 𝑎 2 14 3 1
𝑥 2.066666667
𝑓 𝑏 𝑓 𝑎 14 1
𝑓 2.066666667 0.377481481
𝑓 2.091171379 0.13713865
⋮
𝑥 2.103134581
𝑥 2.104254777
𝑥 2.104653115
𝑥 2.104794711
4
CE 501 Numerical Analysis
Q5) Find the root of x3 – 2x2 + 3x – 5 = 0, which lies between 1 and 2, using Regula False
method.
● Solution:
𝑓 1 3 𝑎𝑛𝑑 𝑓 2 1
the root lies in between 1 and 2.
Take a = 1 and b = 2
𝑎𝑓 𝑏 𝑏𝑓 𝑎 1 1 2 3
𝑥 1.75
𝑓 𝑏 𝑓 𝑎 1 3
𝑓 1.75 0.515625
𝑓 1.835051546 0.050295122
𝑥 1.842950376
⋮
𝑥 1.843663675
𝑥 1.84372792
𝑥 1.843733705
5
CE 501 Numerical Analysis
Q6) Compute the real root of x log x – 1.2 = 0, by the Method of False position.
● Solution:
𝑓 2 0.59794 𝑎𝑛𝑑 𝑓 3 0.231364
𝑓 2.721014456 0.017091075
𝑓 2.740205722 0.000384056
𝑥 2.740636257
𝑥 2.740645876
𝑥 2.740646091
6
CE 501 Numerical Analysis
Q7) Find the root of the equation cos x – x e x = 0, correct to four decimal places by Method of
False position
● Solution:
𝑓 0 1 𝑎𝑛𝑑 𝑓 1 2.17798
𝑓 0.314665338 0.519871174
𝑓 0.446728145 0.203544778
𝑥 0.494015337
⋮
𝑥 0.50994614
𝑥 0.51520101
𝑥 0.51692221
𝑥 0.517484677
𝑥 0.517668345
𝑥 0.517728305
𝑥 0.517747878
𝑥 0.517754267
𝑥 0.517756353
7
CE 501 Numerical Analysis
Q12) Find a root of x4 – x – 10 = 0 by Newton – Raphson Method.
● Solution:
𝑓 𝑥 𝑥 – 𝑥 – 10
𝑓′ 𝑥 4𝑥 – 1
𝑙𝑒𝑡 𝑥 1
𝑓 1 1 – 1 – 10 10
𝑓 1 4 1 –1 3
𝑓 𝑥 10
𝑥 𝑥 1 4.333333
𝑓 𝑥 3
𝑓 4.333333 4.333333 – 4.333333 – 10 338.2716
𝑓 𝑥 338.2716
𝑥 𝑥 4.333333 3.290834
𝑓 𝑥 324.4815
𝑥 2.556206
⋮
𝑥 2.098236
𝑥 1.895609
𝑥 1.856882
𝑥 1.855586
𝑥 1.855585
8
CE 501 Numerical Analysis
Q13) Find a real root of x – cos x = 0 by Newton – Raphson Method.
● Solution:
𝑓 𝑥 𝑥 – 𝑐𝑜𝑠 𝑥
𝑓 𝑥 1 sin 𝑥
𝑙𝑒𝑡 𝑥 1
𝑓 1 0.459698
𝑓 1 1.841471
𝑓 𝑥 0.459698
𝑥 𝑥 1 0.750364
𝑓 𝑥 1.841471
𝑓 0.750364 0.018923
𝑓 0.750364 1.681905
𝑓 𝑥 0.018923
𝑥 𝑥 0.750364 0.739113
𝑓 𝑥 1.681905
𝑥 0.739085
9
CE 501 Numerical Analysis
Q14) Find a root of 2x – 3 sin x – 5= 0 by Newton – Raphson Method.
● Solution:
𝑓 𝑥 2𝑥 – 3 𝑠𝑖𝑛 𝑥 – 5
𝑓 𝑥 2 3 cos 𝑥
𝑙𝑒𝑡 𝑥 2
𝑓 2 3.72789
𝑓 2 3.248441
𝑓 𝑥 3.72789
𝑥 𝑥 2 3.147594
𝑓 𝑥 3.248441
𝑓 3.147594 1.313194
𝑓 3.147594 4.999946
𝑓 𝑥 1.313194
𝑥 𝑥 3.147594 2.884953
𝑓 𝑥 4.999946
𝑥 2.8832371
𝑥 2.88323687
10
CE 501 Numerical Analysis
Q15) Find a smallest positive root of tan x = x by Newton – Raphson Method.
● Solution:
𝑓 𝑥 𝑡𝑎𝑛 𝑥 𝑥
𝑓 𝑥 𝑠𝑒𝑐 𝑥 1
𝑙𝑒𝑡 𝑥 4.5
𝑓 4.5 0.137332
𝑓 4.5 21.50485
𝑓 𝑥 0.137332
𝑥 𝑥 4.5 4.493613903
𝑓 𝑥 21.50485
𝑓 4.493613903 0.004132
𝑓 4.493613903 20.22972
𝑓 𝑥 0.004132
𝑥 𝑥 4.493613903 4.493409655
𝑓 𝑥 20.22972
𝑥 4.493409458
11