0% found this document useful (0 votes)
131 views

Numerical Methods

The document describes three numerical methods for finding the root of a function: incremental search method, fixed point iteration method, and bisection method. It provides examples of applying each method to different functions, beginning with setting the initial values and tolerance values, then showing the iterative calculations and results. Tables show the iteration values, function values at each iteration, and convergence to the root.

Uploaded by

Inhinyero Sibil
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
131 views

Numerical Methods

The document describes three numerical methods for finding the root of a function: incremental search method, fixed point iteration method, and bisection method. It provides examples of applying each method to different functions, beginning with setting the initial values and tolerance values, then showing the iterative calculations and results. Tables show the iteration values, function values at each iteration, and convergence to the root.

Uploaded by

Inhinyero Sibil
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 45

EXAMPLE 1.

1:
Consider the deflection of a horizontal cantilever beam

f() = 4 - 43 + 62 2.25
Solution

0 =

-0.05

f(i)

0
1
2
3
4

0.51
0.507
0.504
0.501
0.498

-0.032348
-0.003926
0.0245241
0.0530015
0.081506

-0.003
-0.003
-0.003
-0.003
-0.003

to get
x = x1 - ((x*f(x1))/(f(x1) - f(x1-x)

f(i)

0.49
0.5
0.51
0.52
0.53
0.54
0.55

0.157648
0.0625
-0.032348
-0.126884
-0.221095
-0.314969
-0.408494

i-x
0.513
0.51
0.507
0.504
0.501

f(i-x)
-1.141751
-1.152352
-1.162927
-1.173476
-1.183999


0.509913
0.50699
0.504062
0.50113
0.498193

Column B
Linear (Column B)

EXAMPLE 1.1:
Consider the deflection of a horizontal cantilever beam

f() = 4 - 43 + 62 2.25
Solution

0 =

-0.05

f(i)

0
1
2
3
4

1
0.95
0.9
0.85
0.8

0.75
0.5500063
0.3501
0.1505063
-0.0484

-0.05
-0.05
-0.05
-0.05
-0.05

to get
x = x1 - ((x*f(x1))/(f(x1) - f(x1-x)

f(i)

0.78
0.79
0.8
0.81
0.82
0.83
0.84

-0.127657
-0.088055
-0.0484
-0.008697
0.0310498
0.0708352
0.1106554

i-x

f(i-x)

1.05 0.950006
1
0.75
0.95 0.550006
0.9
0.3501
0.85 0.150506


0.812506
0.812494
0.812434
0.812297
0.812167

Column B
Linear (Column B)

a0 =

-0.05
i
0
1
2
3
4

ai
1
0.95
0.9
0.85
0.8

0
1
2
3
4

0.5
0.669266
0.735807
0.769239
0.787462

5
6
7
8
9
10
11
12
13

0.797777
0.803732
0.807207
0.809247
0.81045
0.81116
0.81158
0.811828
0.811975

f(ai)
0.75
0.55000625
0.3501
0.15050625
-0.0484

e=0.00005
i+1=g(i)

0.6692657668
0.7358070201
0.7692390172
0.7874621996
0.7977772202

0.803731895
0.8072069431
0.8092474874
0.8104499827
0.811160096
0.8115799562
0.8118283816
0.8119754342
0.8120625024

a=

0.812167

i+1-i

0.1692657668
0.0665412533
0.0334319971
0.0182231824
0.0103150206

0.0059546748
0.0034750481
0.0020405443
0.0012024953
0.0007101133
0.0004198602
0.0002484254
0.0001470526
8.7068135E-005

a0 =

0.05

i
0
1

ai
5.55
5.5

0
1
2
3
4

5
-0.48493
0.538294
0.681902
0.741855

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

0.772467
0.78927
0.798815
0.804336
0.807561
0.809456
0.810573
0.811233
0.811623
0.811854
0.81199
0.812071
0.812119
0.812148
0.812165
0.812174
0.81218

22
23

0.812184
0.812186

f(ai)
0.0303087829
-0.0153351609

i+1=g(i)

-0.484929087
0.5382944035
0.6819023939
0.7418554496
0.7724673182

0.7892702351
0.798814966
0.8043355411
0.807560741
0.8094557539
0.8105728924
0.81123274
0.8116229291
0.8118538156
0.8119904922
0.8120714189
0.8121193426
0.8121477247
0.8121645343
0.8121744903
0.8121803872
0.8121838799

0.8121859486
0.8121871739

i+1-i

-5.484929087
1.0232234906
0.1436079904
0.0599530557
0.0306118686

0.0168029169
0.0095447308
0.0055205751
0.0032251999
0.0018950129
0.0011171385
0.0006598476
0.0003901891
0.0002308865
0.0001366766
8.0926725E-005
4.7923664E-005
2.8382051E-005
1.6809651E-005
0.000009956
5.8968625E-006
3.4926917E-006

2.0687219E-006
1.2253087E-006

(_ )=
(_ )=

_= 0
_= 1
i
0
1
2
3
4
5
6
7
8
9
10
11
12
13

_
0
0.5
0.75
0.75
0.75
0.78125
0.796875
0.8046875
0.80859375
0.81054688
0.81152344
0.81201172
0.81201172
0.81213379

_
1
1
1
0.875
0.8125
0.8125
0.8125
0.8125
0.8125
0.8125
0.8125
0.8125
0.81225586
0.81225586

14
15

0.81213379 0.81219482
0.81216431 0.81219482

-2.25
0.75
_
0.5
0.75
0.875
0.8125
0.78125
0.796875
0.8046875
0.80859375
0.81054688
0.81152344
0.81201172
0.81225586
0.81213379
0.81219482

(_)
-1.1875
-0.246094
0.2502441
0.001236
-0.12271
-0.060798
-0.029795
-0.014283
-0.006524
-0.002644
-0.000704
0.0002658
-0.000219
2.33E-005

1
0.5
0.25
0.125
0.0625
0.03125
0.015625
0.007813
0.003906
0.001953
0.000977
0.000488
0.000244
0.000122

0.81216431 -9.8E-005 6.10E-005


0.81217957 -3.7E-005 3.05E-005

f() = 4 - 43 + 62 2.25

_=
_=
i
0
1
2

0.5
1
_
0.5
0.8065
0.8122

_
1
1
1

(_ )=
(_ )=

(_ )=
(_ )=
_
0.80645161
0.81215952
0.81218881

-1.1875
0.75
(_)
-0.022790224
-0.000116976
-5.8225E-007

f() = 4 - 43 + 62 2.25

i
0
1
2
3

f() = 4 - 4
f () = 43

0.5
0.83928571
0.81222087
0.81218895

f() = 4 - 43 + 62 2.25
f () = 43 - 122 + 12
(_)
(_)
-1.1875
3.5
0.10781 3.983396
0.000127 3.973515
2.2E-010 3.973501

f() = 4 - 43 + 62 2.25
_=
1
i
0
2
3
4

_
1
1.5
0.8181818
0.8123579

(_ )=

xi = xb {(xb xa) f(xb) / [f(xb)


f(xa)]}

0.75

(_)
_
1.5
2.8125
0.8181818182 0.0238201
0.8123579252 0.0006714
0.8121890068 2.10E-007

_
0.8181818182
0.8123579252
0.8121890068

a) The incremental search method (E = 0.12, M = 2.3)

0 =

-0.05

f(i)

i-x

0
1
2
3
4
5
6
7

2.38
2.3801
2.3802
2.3803
2.3804
2.3805
2.3806
2.3807

-0.002809
-0.0027
-0.002592
-0.002483
-0.002374
-0.002266
-0.002157
-0.002048

0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001

2.3799
2.38
2.3801
2.3802
2.3803
2.3804
2.3805
2.3806

x = x1 - ((x*f(x1))/(f(x1) - f(x1-x)

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

2.3808
2.3809
2.381
2.3811
2.3812
2.3813
2.3814
2.3815
2.3816
2.3817
2.3818
2.3819
2.382
2.3821
2.3822
2.3823
2.3824
2.3825
2.3826
2.3827

-0.001939
-0.001831
-0.001722
-0.001613
-0.001505
-0.001396
-0.001287
-0.001179
-0.00107
-0.000961
-0.000853
-0.000744
-0.000635
-0.000526
-0.000418
-0.000309
-0.0002
-9.2E-005
1.71E-005
0.0001258

0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001

2.3807
2.3808
2.3809
2.381
2.3811
2.3812
2.3813
2.3814
2.3815
2.3816
2.3817
2.3818
2.3819
2.382
2.3821
2.3822
2.3823
2.3824
2.3825
2.3826

b) The Fixed Point Iteration Method (E = 0.12 , M = 5.6)


c) The Bisection Method (E = 0.23 , M = 5.6)

a =
b =

5
6

f(a) =
f(b) =

-0.379447
7.5647268

E=
M=

i
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

a
5
5
5.25
5.375
5.375
5.40625
5.421875
5.421875
5.4257813
5.4257813
5.4257813
5.4257813
5.4260254
5.4260254
5.4260864
5.4261169

b
6
5.5
5.5
5.5
5.4375
5.4375
5.4375
5.4296875
5.4296875
5.4277344
5.4267578
5.4262695
5.4262695
5.4261475
5.4261475
5.4261475

m
5.5
5.25
5.375
5.4375
5.40625
5.421875
5.4296875
5.4257813
5.4277344
5.4267578
5.4262695
5.4260254
5.4261475
5.4260864
5.4261169
5.4261322

f(m)
0.0622742749
-0.1524450665
-0.0436706035
0.0096379332
-0.0169300043
-0.0036247347
0.0030118886
-0.0003050962
0.0013537274
0.0005243985
0.0001096719
-0.000097707
5.983730E-006
-4.58613E-005
-1.99387E-005
-6.97747E-006

0.23
5.6
E
0.23
0.23
0.23
0.23
0.23
0.23
0.23
0.23
0.23
0.23
0.23
0.23
0.23
0.23
0.23
0.23

16

5.4261322 5.4261475 5.4261398 -4.96864E-007

d) The False Position Method (E = 0.23 , M = 5.6)


a =
b =
i
0
1
2
3
4

5
6
a
5
5.4497352
5.4249712
5.4261988
5.4261375

b
6
6
6
6
6

f(a) =
f(b) =

-0.3794474168
0.4642655646

i
5.4497352
5.4249712
5.4261988
5.4261375
5.4261406

f(i)
0.0199939251
-0.0009933104
4.961763E-005
-2.47784E-006
1.237415E-007

e) The Newton Rhapson Method (E = 0.23 , M = 7.8)


i
0
1
2
3

i
8
8.0285749
8.0284769
8.0284769

f(i)
-0.029531
0.0001019
-3.3E-008
1.10E-011

f'(i)
1.033465
1.0399527
1.0399305
1.0399306

f) The Secant Method (E = 0.23 , M = 7.8)


a =
i
0
1
2
3

f(a) =

a
b
f(b)
8
9
1.1052127
9
8.0243231 -0.002348
8.0243231 8.0263916 -0.000198
8.0263916 8.0265826 4.89E-008

-0.0275523967
i
8.0243231325
8.0263915969
8.0265825711
8.0265825241

3) Using Bisection Method


fa =
fb =

0.01
0.02

f(fa) =
f(fb) =

-0.3463085932
0.0368468353

0.23

i
0
1
2
3
4
5
6
7
8
9
10
11

fa
0.01
0.015
0.0175
0.01875
0.01875
0.01875
0.0189063
0.0189063
0.0189063
0.0189063
0.0189063
0.0189063

fb
0.02
0.02
0.02
0.02
0.019375
0.0190625
0.0190625
0.0189844
0.0189453
0.0189258
0.018916
0.0189111

fm
0.015
0.0175
0.01875
0.019375
0.0190625
0.0189063
0.0189844
0.0189453
0.0189258
0.018916
0.0189111
0.0189087

f(fm)
-0.1401792712
-0.0488324714
-0.0053544061
0.0158983028
0.0053108627
-1.19277E-005
0.0026519139
0.0013206065
0.000654493
0.0003213211
0.0001547063
7.139171E-005

4) Using Bisection Method

5) Using Bisection Method


xa =
xb =

0
1

i
0
1
2
3
4
5
6

fa
0
0.5
0.5
0.5
0.5
0.5
0.5

x4 - 10x + 5=0
f(fa) =
f(fb) =

fb
fm
1
0.5
1
0.75
0.75
0.625
0.625
0.5625
0.5625
0.53125
0.53125 0.515625
0.515625 0.5078125

5
-4
f(fm)
0.0625
-2.18359375
-1.0974121094
-0.524887085
-0.2328481674
-0.0855636001
-0.0116262399

f(i-x)
-0.002918
-0.002809
-0.0027
-0.002592
-0.002483
-0.002374
-0.002266
-0.002157

2.3799034
2.3800036
2.3801037
2.3802039
2.380304
2.3804042
2.3805044
2.3806047

-0.002048
-0.001939
-0.001831
-0.001722
-0.001613
-0.001505
-0.001396
-0.001287
-0.001179
-0.00107
-0.000961
-0.000853
-0.000744
-0.000635
-0.000526
-0.000418
-0.000309
-0.0002
-9.2E-005
1.71E-005

M
5.6
5.6
5.6
5.6
5.6
5.6
5.6
5.6
5.6
5.6
5.6
5.6
5.6
5.6
5.6
5.6

2.3807049
2.3808052
2.3809055
2.3810058
2.3811062
2.3812067
2.3813072
2.3814078
2.3815085
2.3816094
2.3817105
2.3818119
2.3819136
2.382016
2.3821193
2.3822244
2.3823333
2.3824522
2.3826206
2.3822123

5.6

You might also like