Solusi Akar Persamaan - 2013

download Solusi Akar Persamaan - 2013

of 38

description

tpms

Transcript of Solusi Akar Persamaan - 2013

  • METODE NUMERIK UNTUK SOLUSI (AKAR) PERSAMAAN

  • Banyak permasalahan keteknikan dalam bentuk persamaan non-linier, CONTOH:Koefisien gesek pada saluranPENYELESAIAN PERSAMAAN

  • Dalam menyelesaikan persamaan implisit mencari akar persamaan:PENYELESAIAN PERSAMAAN

  • Akar suatu persamaan merupakan bilangan yang memenuhi suatu persamaanPada persamaan-persamaan linier atau persamaan kuadrat, akar dari persamaan dapat dicari dengan mudah:

    AKAR PERSAMAAN

  • What Goes Wrong?*CSE 330: Numerical Methods*Tangent point:very difficult to findSingularity:brackets dont surround rootPathological case:infinite number of roots e.g. sin(1/x)Find the root of an equation

    CSE 330: Numerical Methods

  • *CSE 330: Numerical Methods*Different approaches to solve these equations:Bisection MethodIteration (fixed point) MethodNewton-Raphson Method

    Find the root of an equation

  • METODE NUMERIK UNTUK MENCARI AKAR (1 VARIABEL)

  • Metode Ini lebih sederhana, akan tetapi memerlukan iterasi yang lebih banyak (konvergensi lebih lama)ALGORITMA sbb:Menetapkan dua batas nilai. Batas tidak boleh melalui dua titik potong pada absis. Uji f(bawah) dan f(atas), f dari batas tersebut harus berbeda tanda. Jika f(bawah)>f(atas) maka fungsi turun Hitung beda/2 dan nilai tengahHitung f (n tengah)Hitung beda baru = beda lama/2Untuk f(x) naik ketika memotong, maka apabila f(ntengah) < 0 maka ntengah baru = ntengah lama + beda jika f (ntengah)>0 maka ntengah lama - bedaUntuk f(x) turun ketika memotong, maka apabila f(ntengah) < 0 maka ntengah baru = ntengah lama - beda jika f (ntengah)>0 maka ntengah lama + beda1. Bisection method

  • *CSE 330: Numerical Methods*Bisection Methodf(b) is positivef(a) negativeThe root of this equationf(x) is continuous between xa and xb

  • *CSE 330: Numerical Methods*Bisection Methodf(b) is positivef(a) negativexc= (a+b)/2What will be the next interval?f(c) negative

  • Selesaikan x3+6x-3=0 dengan metode bi-section

    Contoh 1:

  • *CSE 330: Numerical Methods*Theorem:If function f(x) in f(x)=0 does not change sign between two points, roots may still exist between the two points.Bisection Method

    CSE 330: Numerical Methods

    x

    f(x)

    xu

    x

  • *CSE 330: Numerical Methods*Theorem:If the function f(x) in f(x)=0 does not change sign between two points, there may not be any roots between the two points.Bisection Method

    CSE 330: Numerical Methods

    x

    f(x)

    xu

    x

    x

    f(x)

    xu

    x

  • *CSE 330: Numerical Methods*Theorem:If the function f(x) in f(x)=0 changes sign between two points, more than one root may exist between the two points.Bisection Method

    CSE 330: Numerical Methods

    x

    f(x)

    xu

    x

  • *CSE 330: Numerical Methods*If the function f(x) is not continuous between a and b, but f(a) and f(b) has opposite signs, then there may not exist any root between a and b.Bisection Method

    CSE 330: Numerical Methods

    Chart4

    10

    5

    3.3333333333

    2.5

    2

    1

    0.5

    0.3333333333

    0.25

    0.2

    0.1666666667

    0.1428571429

    0.125

    0.1111111111

    0.1

    -10

    -5

    -3.3333333333

    -2.5

    -2

    -1

    -0.5

    -0.3333333333

    -0.25

    -0.2

    -0.1666666667

    -0.1428571429

    -0.125

    -0.1111111111

    -0.1

    f(x)

    x

    Sheet1

    00

    11

    24

    39

    416

    525

    636

    749

    864

    981

    10100

    -11

    -24

    -39

    -416

    -525

    -636

    -749

    -864

    -981

    -10100

    0.110

    0.25

    0.33.3333333333

    0.42.5

    0.52

    11

    20.5

    30.3333333333

    40.25

    50.2

    60.1666666667

    70.1428571429

    80.125

    90.1111111111

    100.1

    -0.1-10

    -0.2-5

    -0.3-3.3333333333

    -0.4-2.5

    -0.5-2

    -1-1

    -2-0.5

    -3-0.3333333333

    -4-0.25

    -5-0.2

    -6-0.1666666667

    -7-0.1428571429

    -8-0.125

    -9-0.1111111111

    -10-0.1

    Sheet1

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    f(x)

    x

    Sheet2

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    f(x)

    x

    Sheet3

  • *CSE 330: Numerical Methods*Advantages: Simple and easy to implement One function evaluation per iteration No knowledge of the derivative is neededDisadvantages: We need two initial guesses a and b which bracket the root. Slowest method to converge to the solution. When an interval contains more than one root, the bisection method can find only one of them.Bisection Method

    CSE 330: Numerical Methods

  • *CSE 330: Numerical Methods*2. Iteration Method (fixed point method) Suppose we have an equation in the form g(x) = 0 Rewrite the equation in the form x = f(x). Start with an initial guess x0, which is an approximation of the root. Calculate x1, ..., xn,... such that x1 = f(x0) x2= f(x1) x3= f(x2) ... Iterate the same process until (xn xn-1) smaller than some specified tolerance.Geometrically, where the two graphs x and f(x) intersects, that is the real root of the equation.

  • *CSE 330: Numerical Methods*Iteration Method: Convergence Conditions The equation x = f(x) converges to the real root x, if f(x) is continuous If | f (x) | < 1 For all x in [a,b]

    The equation x = f(x) does not converges to the real root x if | f (x) | > 1 (TIDAK SELALU (Lihat contoh 2)), kecuali jika | f (x) | memang dalam bentuk yang tidak mungkin

  • Selesaikan x3+6x-3=0 dengan metode iterasi (fixed point)Gunakan nilai awal: 0,5; 2,2 dan 2,6Contoh 2:

  • *CSE 330: Numerical Methods*Convergence of xn+1 = f(xn), when | f (x) | < 1Iteration Method: Convergence ConditionsThe root of this equationy=f(x)

  • *CSE 330: Numerical Methods*xn+1 = f(xn) oscillates but ultimately converges, when | f (x) | < 1, but f (x) < 0 Iteration Method: Convergence ConditionsThe root of this equationy=f(x)

  • *CSE 330: Numerical Methods*xn+1 = f(xn) diverges, when f (x) > 1Iteration Method: Convergence ConditionsThe root of this equationy=f(x)

  • *CSE 330: Numerical Methods*xn+1 = f(xn) diverges, when f (x) > 1Iteration Method: Convergence ConditionsThe root of this equationy=f(x)

  • Gambarlah kurva y=x dan y=f(x) pada contoh 2Latihan

  • Find the real root of the equation using iterative method (till 4 decimal places).e-x = 10x

    Contoh 3:

    Answer: 0.091276527

  • This method is more efficient than the Bisection and Iteration methods. If x is the real root and x0 is an initial approximation of the real root of an equation f(x) = 0,f (x0) 0,f(x) has the same sign between x0 and x,

    Then, the tangent at f(x0) can lead to the real root x.

    Newton Raphson

  • *CSE 330: Numerical Methods*Newton-Raphson Method: Geometric Significancef(x0)f(x1)The initial guesstangent at f(x0)

  • *CSE 330: Numerical Methods*Newton-Raphson Method: Geometric SignificanceHere,The slope at x0 is tan (PTM)tan (PTM) = PM/TMtan (PTM) = f (x0)/hAgain, tan (PTM) = f (x0)Therefore, f (x0) = f (x0)/hOr, h = f (x0)/ f (x0)x1 = x0 hTherefore, x1 = x0 f (x0)/ f (x0)Similarly, x2 = x1 f (x1)/ f (x1)

    PTM

  • *CSE 330: Numerical Methods*Newton-Raphson Method Methodology Let x0 be an approximate root of f(x) = 0 and Let, x1 is the correct root such that x1 = x0 + h and f(x1) = 0. Expanding f(x0+h) by Taylors series, we obtain,

    Neglecting the second and higher order derivatives, we have

    Which gives

  • *CSE 330: Numerical Methods*Newton-Raphson Method (Contd.) A better approximation than x0 is therefore given by x1 where

    Successive approximation are given by x2, x3, .., xn, xn+1 where

    This formula is known as the Newton-Raphson formula.

  • Selesaikan x3+6x-3=0 dengan metode Newton Rahpson

    Contoh 4:

  • Dua metode diantaranya adalah:Substitusi suksesifNewton Raphson

    MENCARI AKAR UNTUK DUA VARIABEL ATAU LEBIH

  • Metode Newton-Raphson untuk variabel lebih dari satu3 persamaan, 3 variabelLangkah-langkah yang diperlukan adalah:Berikan nilai trial: x1t x2t. x3tHitung nilai f1,f2 dan f3.Hitung nilai turunan parsial pada x1t x2t. X3tGunakan ekspansi deret Taylor

  • Metode Newton-Raphson Jika x1c, x2c x3c benar makaSehingga persamaan dapat ditulis sebagai

  • Matriks suku pertama ruas kiri disebut Jacobian matriks atau JPecahkan matriks untuk mencari: (xit xic)

    Koreksi nilai x dengan

    Ulangi sampai x /x mendekati nol

  • Jika sistem operasi kipas dan saluran:SP=80+10.73Q1.8Q=15-(73.5x10-6)SP2Ket: SP = Tekanan statik (Pa) dan Q=debit (m3/s)Contoh:

  • Kemungkinan teknik ini untuk konvergen cukup tinggi Tidak perlu menyusun urutan persamaan seperti pada substitusi suksesifApabila nilai duga cukup jauh dari nilai sebenarnya:Dapat saja beda terhadap nilai yang sebenarnya membesar terlebih dahulu, kemudian baru konvergen.Dapat konvergen pada nilai yang tidak realistik secara fisikPada beberapa persamaan dapat tidak konvergen, dan perlu pengubahan bentuk persamaanKarakteristik Teknik Newton-Raphson

  • Contoh: Sistem pompaPompa1Pompa2Bak air bawahBak air atasw1w2ww40 mElevasi dan friksi oleh pipaPompa1Pompa2Mass balance