Numerical Methods

45
EXAMPLE 1.1: Consider the deflection of a horizontal cantilever beam Solution -0.05 i 0 0.51 -0.032348 -0.003 0.513 -1.141751 1 0.507 -0.003926 -0.003 0.51 -1.152352 2 0.504 0.0245241 -0.003 0.507 -1.162927 3 0.501 0.0530015 -0.003 0.504 -1.173476 4 0.498 0.081506 -0.003 0.501 -1.183999 f(αi) 0.49 0.157648 0.5 0.0625 0.51 -0.032348 0.52 -0.126884 0.53 -0.221095 0.54 -0.314969 0.55 -0.408494 f() = 4 - 4 3 + 6 2 – 2.25 α 0 = α i f(α i ) α 0 α i -Δx f(α i -Δx) to get α x = x 1 - ((Δx*f(x 1 ))/(f(x 1 ) - f(x 1 -Δx) α i

description

Non Linear in Numerical Methods

Transcript of Numerical Methods

EXAMPLE 1.1:Consider the deflection of a horizontal cantilever beam

Solution

-0.05

i0 0.51 -0.032348 -0.003 0.513 -1.1417511 0.507 -0.003926 -0.003 0.51 -1.1523522 0.504 0.0245241 -0.003 0.507 -1.1629273 0.501 0.0530015 -0.003 0.504 -1.1734764 0.498 0.081506 -0.003 0.501 -1.183999

f(αi)0.49 0.1576480.5 0.0625

0.51 -0.0323480.52 -0.1268840.53 -0.2210950.54 -0.3149690.55 -0.408494

f() = 4 - 43 + 62 – 2.25

α0 =

αi f(αi) α0 αi-Δx f(αi-Δx)

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

αi

Column B

Linear (Column B)

α0.509913

0.506990.504062

0.501130.498193

Column B

Linear (Column B)

EXAMPLE 1.1:Consider the deflection of a horizontal cantilever beam

Solution

-0.05

i0 1 0.75 -0.05 1.05 0.9500061 0.95 0.5500063 -0.05 1 0.752 0.9 0.3501 -0.05 0.95 0.5500063 0.85 0.1505063 -0.05 0.9 0.35014 0.8 -0.0484 -0.05 0.85 0.150506

f(αi)0.78 -0.1276570.79 -0.0880550.8 -0.0484

0.81 -0.0086970.82 0.03104980.83 0.07083520.84 0.1106554

f() = 4 - 43 + 62 – 2.25

α0 =

αi f(αi) α0 αi-Δx f(αi-Δx)

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

αi

Column B

Linear (Column B)

α0.8125060.8124940.8124340.8122970.812167

Column B

Linear (Column B)

a0 = -0.05

i ai0 11 0.952 0.93 0.854 0.8

i

0 0.51 0.6692662 0.7358073 0.7692394 0.787462

i

5 0.7977776 0.8037327 0.8072078 0.8092479 0.81045

10 0.8111611 0.8115812 0.81182813 0.811975

f(ai)0.75

0.550006250.3501

0.15050625-0.0484

e=0.00005

0.66926576680.73580702010.76923901720.78746219960.7977772202

i+1

=g(i)

0.8037318950.80720694310.80924748740.81044998270.8111600960.81157995620.81182838160.81197543420.8120625024

a= 0.812167

0.16926576680.06654125330.03343199710.01822318240.0103150206

i+1

-i

0.00595467480.00347504810.00204054430.00120249530.00071011330.00041986020.00024842540.0001470526

8.7068135E-005

a0 = 0.05

i ai0 5.551 5.5

i

0 51 -0.484932 0.5382943 0.6819024 0.741855

i

5 0.7724676 0.789277 0.7988158 0.8043369 0.807561

10 0.80945611 0.81057312 0.81123313 0.81162314 0.81185415 0.8119916 0.81207117 0.81211918 0.81214819 0.81216520 0.81217421 0.81218

22 0.81218423 0.812186

f(ai)0.0303087829-0.0153351609

-0.4849290870.53829440350.68190239390.74185544960.7724673182

i+1

=g(i)

0.78927023510.7988149660.80433554110.8075607410.80945575390.8105728924

0.811232740.81162292910.81185381560.81199049220.81207141890.81211934260.81214772470.81216453430.81217449030.81218038720.8121838799

0.81218594860.8121871739

-5.4849290871.02322349060.14360799040.05995305570.0306118686

i+1

-i

0.01680291690.00954473080.00552057510.00322519990.00189501290.00111713850.00065984760.00039018910.00023088650.0001366766

8.0926725E-0054.7923664E-0052.8382051E-0051.6809651E-005

0.0000099565.8968625E-0063.4926917E-006

2.0687219E-0061.2253087E-006

01

i0 0 11 0.5 12 0.75 13 0.75 0.8754 0.75 0.81255 0.78125 0.81256 0.796875 0.81257 0.8046875 0.81258 0.80859375 0.81259 0.81054688 0.8125

10 0.81152344 0.812511 0.81201172 0.812512 0.81201172 0.8122558613 0.81213379 0.81225586

∝_�=

∝_�

�(∝ )=_�

∝_�

∝_�= �(∝ )=_�

14 0.81213379 0.8121948215 0.81216431 0.81219482

-2.250.75

0.5 -1.1875 10.75 -0.246094 0.5

0.875 0.2502441 0.250.8125 0.001236 0.125

0.78125 -0.12271 0.06250.796875 -0.060798 0.03125

0.8046875 -0.029795 0.0156250.80859375 -0.014283 0.0078130.81054688 -0.006524 0.0039060.81152344 -0.002644 0.0019530.81201172 -0.000704 0.0009770.81225586 0.0002658 0.0004880.81213379 -0.000219 0.0002440.81219482 2.33E-005 0.000122

∝_� �(∝ )_�

0.81216431 -9.8E-005 6.10E-0050.81217957 -3.7E-005 3.05E-005

f() = 4 - 43 + 62 – 2.25

0.51

i0 0.5 11 0.8065 12 0.8122 1

∝_�=∝_�=

�(∝ )=_��(∝ )=_�

∝_�∝_�

-1.18750.75

0.80645161 -0.0227902240.81215952 -0.0001169760.81218881 -5.8225E-007

�(∝ )=_��(∝ )=_�

∝_� �(∝ )_�

f() = 4 - 43 + 62 – 2.25

i0 0.51 0.839285712 0.812220873 0.81218895

f() = 4 - 43 + 62 – 2.25

f () = 43 - 122 + 12 ∝_�

-1.1875 3.50.10781 3.983396

0.000127 3.9735152.2E-010 3.973501

f() = 4 - 43 + 62 – 2.25

f () = 43 - 122 + 12 �(∝ )_� ′� (∝ )_�

1

i0 12 1.53 0.81818184 0.8123579

f() = 4 - 43 + 62 – 2.25

∝_�

∝_�=

0.75

1.5 2.81250.8181818182 0.02382010.8123579252 0.00067140.8121890068 2.10E-007

xi = x

b – {(x

b – x

a) f(x

b) / [f(x

b) –

f(xa)]}

∝_� �(∝ )_��(∝ )_�

�(∝ )=_�

0.81818181820.81235792520.8121890068

∝_�

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

-0.05

i Δx0 2.38 -0.002809 0.0001 2.37991 2.3801 -0.0027 0.0001 2.382 2.3802 -0.002592 0.0001 2.38013 2.3803 -0.002483 0.0001 2.38024 2.3804 -0.002374 0.0001 2.38035 2.3805 -0.002266 0.0001 2.38046 2.3806 -0.002157 0.0001 2.38057 2.3807 -0.002048 0.0001 2.3806

Φ0 = x = x1 - ((Δx*f(x1))/(f(x1) - f(x1-Δx)

Φi f(Φi) Φi-Δx

8 2.3808 -0.001939 0.0001 2.38079 2.3809 -0.001831 0.0001 2.3808

10 2.381 -0.001722 0.0001 2.380911 2.3811 -0.001613 0.0001 2.38112 2.3812 -0.001505 0.0001 2.381113 2.3813 -0.001396 0.0001 2.381214 2.3814 -0.001287 0.0001 2.381315 2.3815 -0.001179 0.0001 2.381416 2.3816 -0.00107 0.0001 2.381517 2.3817 -0.000961 0.0001 2.381618 2.3818 -0.000853 0.0001 2.381719 2.3819 -0.000744 0.0001 2.381820 2.382 -0.000635 0.0001 2.381921 2.3821 -0.000526 0.0001 2.38222 2.3822 -0.000418 0.0001 2.382123 2.3823 -0.000309 0.0001 2.382224 2.3824 -0.0002 0.0001 2.382325 2.3825 -9.2E-005 0.0001 2.382426 2.3826 1.71E-005 0.0001 2.382527 2.3827 0.0001258 0.0001 2.3826

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

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

5 f(Φa) = -0.379447 E= 0.23Φb = 6 f(Φb) = 7.5647268 M= 5.6

i Φa Φb Φm f(Φm) E0 5 6 5.5 0.0622742749 0.231 5 5.5 5.25 -0.1524450665 0.232 5.25 5.5 5.375 -0.0436706035 0.233 5.375 5.5 5.4375 0.0096379332 0.234 5.375 5.4375 5.40625 -0.0169300043 0.235 5.40625 5.4375 5.421875 -0.0036247347 0.236 5.421875 5.4375 5.4296875 0.0030118886 0.237 5.421875 5.4296875 5.4257813 -0.0003050962 0.238 5.4257813 5.4296875 5.4277344 0.0013537274 0.239 5.4257813 5.4277344 5.4267578 0.0005243985 0.23

10 5.4257813 5.4267578 5.4262695 0.0001096719 0.2311 5.4257813 5.4262695 5.4260254 -0.000097707 0.2312 5.4260254 5.4262695 5.4261475 5.983730E-006 0.2313 5.4260254 5.4261475 5.4260864 -4.58613E-005 0.2314 5.4260864 5.4261475 5.4261169 -1.99387E-005 0.2315 5.4261169 5.4261475 5.4261322 -6.97747E-006 0.23

Φa =

16 5.4261322 5.4261475 5.4261398 -4.96864E-007 0.23

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

Φa = 5 f(Φa) = -0.3794474168Φb = 6 f(Φb) = 0.4642655646

i Φa Φb Φi0 5 6 5.4497352 0.01999392511 5.4497352 6 5.4249712 -0.00099331042 5.4249712 6 5.4261988 4.961763E-0053 5.4261988 6 5.4261375 -2.47784E-0064 5.4261375 6 5.4261406 1.237415E-007

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

i Φi0 8 -0.029531 1.0334651 8.0285749 0.0001019 1.03995272 8.0284769 -3.3E-008 1.03993053 8.0284769 1.10E-011 1.0399306

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

Φa = 8 -0.0275523967

i Φa Φb Φi0 8 9 1.1052127 8.02432313251 9 8.0243231 -0.002348 8.02639159692 8.0243231 8.0263916 -0.000198 8.02658257113 8.0263916 8.0265826 4.89E-008 8.0265825241

3) Using Bisection Methodfa = 0.01 f(fa) = -0.3463085932fb = 0.02 f(fb) = 0.0368468353

f(Φi)

f(Φi) f'(Φi)

f(Φa) =

f(Φb)

i fa fb fm f(fm)0 0.01 0.02 0.015 -0.14017927121 0.015 0.02 0.0175 -0.04883247142 0.0175 0.02 0.01875 -0.00535440613 0.01875 0.02 0.019375 0.01589830284 0.01875 0.019375 0.0190625 0.00531086275 0.01875 0.0190625 0.0189063 -1.19277E-0056 0.0189063 0.0190625 0.0189844 0.00265191397 0.0189063 0.0189844 0.0189453 0.00132060658 0.0189063 0.0189453 0.0189258 0.0006544939 0.0189063 0.0189258 0.018916 0.0003213211

10 0.0189063 0.018916 0.0189111 0.000154706311 0.0189063 0.0189111 0.0189087 7.139171E-005

4) Using Bisection Method

5) Using Bisection Method

xa = 0 f(fa) = 5xb = 1 f(fb) = -4

i fa fb fm f(fm)0 0 1 0.5 0.06251 0.5 1 0.75 -2.183593752 0.5 0.75 0.625 -1.09741210943 0.5 0.625 0.5625 -0.5248870854 0.5 0.5625 0.53125 -0.23284816745 0.5 0.53125 0.515625 -0.08556360016 0.5 0.515625 0.5078125 -0.0116262399

x4 - 10x + 5=0

Φ-0.002918 2.3799034-0.002809 2.3800036

-0.0027 2.3801037-0.002592 2.3802039-0.002483 2.380304-0.002374 2.3804042-0.002266 2.3805044-0.002157 2.3806047

f(Φi-Δx)

-0.002048 2.3807049-0.001939 2.3808052-0.001831 2.3809055-0.001722 2.3810058-0.001613 2.3811062-0.001505 2.3812067-0.001396 2.3813072-0.001287 2.3814078-0.001179 2.3815085-0.00107 2.3816094

-0.000961 2.3817105-0.000853 2.3818119-0.000744 2.3819136-0.000635 2.382016-0.000526 2.3821193-0.000418 2.3822244-0.000309 2.3823333

-0.0002 2.3824522-9.2E-005 2.38262061.71E-005 2.3822123

M5.65.65.65.65.65.65.65.65.65.65.65.65.65.65.65.6

5.6