Top Banner

of 45

MT Sistem Persamaan Linear.pdf

Nov 04, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • SISTEM PERSAMAAN LINEAR Systems of Linear Algebraic Equations

    http://istiarto.staff.ugm.ac.id

  • http://istiarto.staff.ugm.ac.id

    Sistem Persamaan Linear 2

    q Acuan q Chapra, S.C., Canale R.P., 1990, Numerical Methods for Engineers,

    2nd Ed., McGraw-Hill Book Co., New York. n Chapter 7, 8, dan 9, hlm. 201-290.

  • http://istiarto.staff.ugm.ac.id

    Sistem Persamaan Linear 3

    q Serangkaian n persamaan linear:

    nnnnnn

    nn

    nn

    cxaxaxa

    cxaxaxa

    cxaxaxa

    =+++

    =+++

    =+++

    ...

    .

    .

    .

    ...

    ...

    2211

    22222121

    11212111

    Sejumlah n persamaan linear ini harus diselesaikan secara simultan untuk mendapatkan x1, x2,, xn yang memenuhi setiap persamaan tsb.

  • http://istiarto.staff.ugm.ac.id

    Metode Penyelesaian

    q Penyelesaian q Grafis

    q Cramer

    q Eliminasi

    q Penyelesaian langsung q Eliminasi Gauss

    q Gauss-Jordan

    q Iteratif q Jacobi

    q Gauss-Seidel

    q Successive Over Relaxation

    4

    Jml. pers. sedikit, n Jml. pers. banyak, n

  • http://istiarto.staff.ugm.ac.id

    Metode Grafis 5

    x2 =

    x1 =

    x2

    x1

  • http://istiarto.staff.ugm.ac.id

    Metode Grafis 6

    x2

    x1

    x2

    x1

    x2

    x1 ill-conditioned system singular system singular system

    sejajar berimpit hampir sejajar

  • http://istiarto.staff.ugm.ac.id

    Metode Cramer 7

    q Variabel tak diketahui, xi, merupakan perbandingan dua determinan matriks q Penyebut : determinan, D, matriks koefisien sistem persamaan

    q Pembilang : determinan matriks koefisien sistem persamaan seperti penyebut, namun koefisien kolom ke i diganti dengan koefisien ci

    q Contoh q 3 persamaan linear

    3333232131

    2323222121

    1313212111

    cxaxaxa

    cxaxaxa

    cxaxaxa

    =++

    =++

    =++

  • http://istiarto.staff.ugm.ac.id

    Metode Cramer 8

    [ ]

    ==

    333231

    232221

    131211

    aaa

    aaa

    aaa

    A A

    333231

    232221

    131211

    det

    aaa

    aaa

    aaa

    D == A

    D

    aac

    aac

    aac

    x 33233

    23222

    13121

    1 =D

    aca

    aca

    aca

    x 33331

    23221

    13111

    2 = D

    aaa

    caa

    caa

    x 32331

    22221

    11211

    3 =

  • http://istiarto.staff.ugm.ac.id

    Determinan Matriks 9

    q Matriks bujur sangkar: n n

    q Mencari determinan matriks q Hitungan manual

    q MSExcel, dengan fungsi =MDETERM()

    q Contoh hitungan determinan matriks 2 2 dan 3 3

    [ ]

    ==

    2221

    1211

    aa

    aaA A [ ]

    ==

    333231

    232221

    131211

    aaa

    aaa

    aaa

    B B

  • http://istiarto.staff.ugm.ac.id

    Determinan Matriks 10

    211222112221

    1211det aaaaaa

    aaD === A

    ( ) ( ) ( )312232211331233321123223332211

    3231

    222113

    3331

    232112

    3332

    232211

    333231

    232221

    131211

    det

    aaaaaaaaaaaaaaa

    aa

    aaa

    aa

    aaa

    aa

    aaa

    aaa

    aaa

    aaa

    D

    +=

    +=== B

  • http://istiarto.staff.ugm.ac.id

    Metode Cramer 11

    4.71102.03.0

    3.193.071.0

    85.72.01.03

    321

    321

    321

    =+

    =+

    =

    xxx

    xxx

    xxx

    q Contoh: 3 persamaan linear

    =

    =

    4.71

    3.19

    85.7

    102.03.0

    3.071.0

    2.01.03

    3

    2

    1

    x

    x

    x

    CXA

    ( ) ( )( ) ( )( )[ ] ( ) ( )( ) ( )( )[ ]( ) ( )( ) ( )( )[ ]

    353.210

    3.072.01.02.0

    3.03.0101.01.02.03.01073det

    =

    +=A

  • http://istiarto.staff.ugm.ac.id

    Metode Cramer 12

    [ ]

    =

    102.04.71

    3.073.19

    2.01.085.7

    1A [ ]

    =

    104.713.0

    3.03.191.0

    2.085.73

    2A [ ]

    =

    4.712.03.0

    3.1971.0

    85.71.03

    3A

    059.631det 1 == A1A 883.525det 2 == A2A 471.1472det 3 == A3A

    3353.210059.631

    detdet

    1 === AA1x 5.2

    353.210883.525

    detdet

    2 =

    ==AA2x 7

    353.210471.1472

    detdet

    3 === AA3x

  • http://istiarto.staff.ugm.ac.id

    Metode Eliminasi 13

    q Contoh: 2 persamaan linear

    [ ][ ] 11221122111212222121111222121

    21122112121111212111211212111

    acxaaxaacxaxaacxaxa

    acxaaxaacxaxaacxaxa

    =+=+=+

    =+=+=+

    2111122211221122 acacxaaxaa =

    21121122

    2111122 aaaa

    acacx

    =

    21121122

    1212221 aaaa

    acacx

    =

  • http://istiarto.staff.ugm.ac.id

    Eliminasi Gauss 14

    q Strategi q Forward elimination

    q Back substitution

    q Contoh q 3 persamaan linear

    3333232131

    2323222121

    1313212111

    cxaxaxa

    cxaxaxa

    cxaxaxa

    =++

    =++

    =++ (1)

    (2)

    (3)

  • http://istiarto.staff.ugm.ac.id

    Eliminasi Gauss 15

    111

    313313

    11

    3133212

    11

    3132

    111

    212313

    11

    2123212

    11

    2122

    1313212111

    caa

    cxaaa

    axaaa

    a

    caa

    cxaaa

    axaaa

    a

    cxaxaxa

    =

    +

    =

    +

    =++

    3333232

    2323222

    1313212111

    cxaxa

    cxaxa

    cxaxaxa

    =+

    =+

    =++

    q Forward elimination #1 q Hilangkan x1 dari pers. kedua dan ketiga dengan operasi perkalian koefisien dan

    pengurangan dengan pers. pertama. pivot equation

    pivot coefficient

    (1)

    (2')

    (3')

  • http://istiarto.staff.ugm.ac.id

    Eliminasi Gauss 16

    222

    323323

    22

    3233

    2323222

    1313212111

    caa

    cxaaa

    a

    cxaxa

    cxaxaxa

    =

    =+

    =++

    q Forward elimination #2 q Hilangkan x2 dari pers. ketiga dengan operasi perkalian koefisien dan

    pengurangan dengan pers. kedua.

    pivot equation pivot coefficient

    (1)

    (2')

    (3'') 3333

    2323222

    1313212111

    cxa

    cxaxa

    cxaxaxa

    =

    =+

    =++

  • http://istiarto.staff.ugm.ac.id

    Eliminasi Gauss 17

    q Back substitution q Hitung x3 dari pers. (3''), hitung x2 dari pers. (2), dan x1 dari pers. (1)

    33

    33 ac

    x

    =22

    32322 a

    xacx

    =11

    31321211 a

    xaxacx

    =

  • http://istiarto.staff.ugm.ac.id

    Eliminasi Gauss 18

    q Forward elimination

    11

    22323

    22323222

    11313212111

    .

    .

    .

    ...

    ...

    ...

    =

    =++

    =+++

    =++++

    nnn

    nnn

    nn

    nn

    nn

    cxa

    cxaxa

    cxaxaxa

    cxaxaxaxa

    1,...,2,1,11

    11

    1

    1

    =

    =

    =

    +=

    nni

    a

    xacx

    ac

    x

    iii

    ijj

    iij

    ii

    i

    nnn

    nn

    n

    q Back substitution

  • http://istiarto.staff.ugm.ac.id

    Eliminasi Gauss 19

    4.71102.03.0)3(

    3.193.071.0)2(

    85.72.01.03)1(

    321

    321

    321

    =+

    =+

    =

    xxx

    xxx

    xxx

    q Contoh: 3 persamaan linear

  • http://istiarto.staff.ugm.ac.id

    Eliminasi Gauss 20

    q Forward elimination q Eliminasi x2 dari Pers. 2 dan 3, Pers. 1 sebagai pivot

    q Eliminasi x3 dari Pers. 3, Pers. 2 sebagai pivot

    0843.700120.1000)3(

    5617.192933.00033.70)2(

    85.72.01.03)1(

    321

    321

    321

    =++

    =+

    =

    xxx

    xxx

    xxx

    615.7002.1019.00)3(

    5617.192933.00033.70)2(

    85.72.01.03)1(

    321

    321

    321

    =+

    =+

    =

    xxx

    xxx

    xxx

  • http://istiarto.staff.ugm.ac.id

    Eliminasi Gauss 21

    q Back substitution q Menghitung x3 dari Pers. 3''

    70120.100843.70

    3 ==x

    q Substitusi x3 ke Pers. 2' untuk menghitung x2 ( )

    5.20033.7

    72933.05617.192 =

    +=x

    q Substitusi x3 dan x2 ke Pers. 1 untuk menghitung x1 ( ) ( )

    33

    5.21.072.085.71 =

    ++=x

  • http://istiarto.staff.ugm.ac.id

    Metode Eliminasi 22

    q Strategi q Eliminasi variabel tak diketahui, xi, dengan penggabungan dua persamaan.

    q Hasil eliminasi adalah satu persamaan yang dapat diselesaikan untuk mendapatkan satu variabel xi.

  • http://istiarto.staff.ugm.ac.id

    Kelemahan Metode Eliminasi 23

    q Pembagian dengan nol q Pivot coefficient sama dengan nol ataupun sangat kecil.

    q Pembagian dengan nol dapat terjadi selama proses eliminasi ataupun substitusi.

    q Round-off errors q Selama proses eliminasi maupun substitusi, setiap langkah hitungan bergantung pada

    langkah hitungan sebelumnya dan setiap kali terjadi kesalahan; kesalahan dapat berakumulasi, terutama apabila jumlah persamaan sangat banyak.

    q Ill-conditioned systems q Ill-condition adalah situasi dimana perubahan kecil pada satu atau beberapa

    koefisien berakibat perubahan yang besar pada hasil hitungan.

  • http://istiarto.staff.ugm.ac.id

    Perbaikan 24

    q Pemilihan pivot (pivoting) q Urutan persamaan dipilih sedemikian hingga yang menjadi pivot equation

    adalah persamaan yang memberikan pivot coefficient terbesar.

  • http://istiarto.staff.ugm.ac.id

    Metode Penyelesaian 25

    q Matriks Inversi q Gauss-Jordan

    q Metode Iteratif q Jacobi

    q Gauss-Seidel

  • http://istiarto.staff.ugm.ac.id

    Metode Gauss-Jordan 26

    q Mirip dengan metode eliminasi Gauss, tetapi tidak diperlukan back substitution.

    q Contoh q 3 persamaan linear

    4.71102.03.0

    3.193.071.0

    85.72.01.03

    321

    321

    321

    =+

    =+

    =

    xxx

    xxx

    xxx

  • http://istiarto.staff.ugm.ac.id

    Metode Gauss-Jordan 27

    4.71

    3.19

    85.7

    101.03.0

    3.071.0

    2.01.03

    4.71

    3.19

    385.7

    101.03.0

    3.071.0

    32.031.033

    4.71

    3.19

    6167.2

    101.03.0

    3.071.0

    0667.00333.01

    6150.70

    5617.19

    6167.2

    0200.101900.00

    2933.00033.70

    0667.00333.01

  • http://istiarto.staff.ugm.ac.id

    0843.70

    7931.2

    5236.2

    0120.1000

    0419.010

    0681.001

    Metode Gauss-Jordan 28

    6150.70

    5617.19

    6167.2

    0200.101900.00

    2933.00033.70

    0667.00333.01

    6150.70

    0033.7/5617.19

    6167.2

    0200.101900.00

    0033.7/2933.00033.7/0033.70033.7/0

    0667.00333.01

    6150.70

    7931.2

    6167.2

    0200.101900.00

    0419.010

    0667.00333.01

  • http://istiarto.staff.ugm.ac.id

    7

    7931.2

    5236.2

    100

    0419.010

    0681.001

    0120.10/0843.70

    7931.2

    5236.2

    0120.10/0120.100120.10/00120.10/0

    0419.010

    0681.001

    Metode Gauss-Jordan 29

    7

    5.2

    3

    100

    010

    001

    =

    7

    5.2

    3

    3

    2

    1

    x

    x

    x

  • http://istiarto.staff.ugm.ac.id

    Gauss-Jordan vs Eliminasi Gauss 30

    q Metode Gauss-Jordan q Jumlah operasi lebih banyak (50%)

    q Memiliki kelemahan yang sama dengan eliminasi Gauss n Pembagian dengan nol n Round-off error

  • http://istiarto.staff.ugm.ac.id

    Matriks Inversi 31

    [ ] { } { } { } [ ] { }CAXCXA == 1

    100

    010

    001

    333131

    232221

    131211

    aaa

    aaa

    aaa

    133

    132

    131

    123

    122

    121

    113

    112

    111

    100

    010

    001

    aaa

    aaa

    aaa

  • http://istiarto.staff.ugm.ac.id

    Matriks Inversi 32

    4.71102.03.0)3(

    3.193.071.0)2(

    85.72.01.03)1(

    321

    321

    321

    =+

    =+

    =

    xxx

    xxx

    xxx

    q Contoh: 3 persamaan linear

  • http://istiarto.staff.ugm.ac.id

    Matriks Inversi 33

    [ ]

    =

    100

    010

    001

    102.03.0

    3.071.0

    2.01.03

    A [ ]

    =

    100

    010

    003333.0

    102.03.0

    3.071.0

    0667.00333.01

    A

    [ ]

    =

    100999.0

    010333.0

    003333.0

    0200.101900.00

    2933.00033.70

    0667.00333.01

    A

  • http://istiarto.staff.ugm.ac.id

    Matriks Inversi 34

    [ ]

    =

    100999.0

    01422.00047.0

    003333.0

    0200.101900.00

    0417.010

    0667.00333.01

    A

    [ ]

    =

    10270.01009.0

    01422.00047.0

    00047.03318.0

    0121.1000

    0417.010

    0681.001

    A

  • http://istiarto.staff.ugm.ac.id

    Matriks Inversi 35

    [ ]

    =

    0999.00027.00101.0

    01422.00047.0

    00047.03318.0

    100

    0417.010

    0681.001

    A

    [ ]

    =

    0999.00027.00101.0

    0042.01423.00052.0

    0068.00049.03325.0

    100

    010

    001

    A

    [ ] 1A

  • http://istiarto.staff.ugm.ac.id

    Matriks Inversi 36

    { } [ ] { }

    =

    =

    =

    0002.7

    4881.2

    0004.3

    4.71

    3.19

    85.7

    0999.00027.00101.0

    0042.01423.00052.0

    0068.00049.03325.0

    3

    2

    1

    3

    2

    1

    1

    x

    x

    x

    x

    x

    x

    CAX

  • http://istiarto.staff.ugm.ac.id

    Metode Iteratif: Jacobi 37

    3333232131

    2323222121

    1313212111

    cxaxaxa

    cxaxaxa

    cxaxaxa

    =++

    =++

    =++

    33

    23213133

    22

    32312122

    11

    31321211

    axaxac

    x

    axaxac

    x

    axaxac

    x

    =

    =

    =

    33

    0232

    013131

    3

    22

    0323

    012121

    2

    11

    0313

    021211

    1

    axaxac

    x

    axaxac

    x

    axaxac

    x

    =

    =

    =

    0

    0

    0

    03

    02

    01

    =

    =

    =

    x

    x

    x

    33

    232131313

    22

    323121212

    11

    313212111

    axaxac

    x

    axaxac

    x

    axaxac

    x

    nnn

    nnn

    nnn

    =

    =

    =

    +

    +

    +

    nilai awal, biasanya xi0 = 0 iterasi diteruskan

    sampai konvergen xin+1 xin, xi

  • http://istiarto.staff.ugm.ac.id

    Metode Iteratif: Jacobi 38

    4.71102.03.0)3(

    3.193.071.0)2(

    85.72.01.03)1(

    321

    321

    321

    =+

    =+

    =

    xxx

    xxx

    xxx

    q Contoh: 3 persamaan linear

  • http://istiarto.staff.ugm.ac.id

    Metode Iteratif: Gauss-Seidel 39

    33

    1232

    113131

    3

    22

    0323

    112121

    2

    11

    0313

    021211

    1

    axaxac

    x

    axaxac

    x

    axaxac

    x

    =

    =

    =

    33

    1232

    113131

    3

    22

    3231

    121212

    11

    313212111

    axaxac

    x

    axaxac

    x

    axaxac

    x

    nnn

    nnn

    nnn

    +++

    ++

    +

    =

    =

    =

    iterasi diteruskan sampai konvergen

    xin+1 xin, xi

  • http://istiarto.staff.ugm.ac.id

    Metode Iteratif: Gauss-Seidel 40

    4.71102.03.0)3(

    3.193.071.0)2(

    85.72.01.03)1(

    321

    321

    321

    =+

    =+

    =

    xxx

    xxx

    xxx

    q Contoh: 3 persamaan linear

  • http://istiarto.staff.ugm.ac.id

    Jacobi vs Gauss-Seidel 41

    ( )( )( ) 3312321131313

    220323

    11212

    12

    110313

    02121

    11

    axaxacx

    axaxacx

    axaxacx

    =

    =

    =

    ( )( )( ) 3322322131323

    221323

    21212

    22

    111313

    12121

    21

    axaxacx

    axaxacx

    axaxacx

    =

    =

    =

    ( )( )( ) 3302320131313

    220323

    01212

    12

    110313

    02121

    11

    axaxacx

    axaxacx

    axaxacx

    =

    =

    =

    ( )( )( ) 3312321131323

    221323

    11212

    22

    111313

    12121

    21

    axaxacx

    axaxacx

    axaxacx

    =

    =

    =

    Jacobi Gauss-Seidel

  • http://istiarto.staff.ugm.ac.id

    Successive Over-relaxation Method 42

    q Dalam setiap iterasi, nilai variabel terbaru (yang baru saja dihitung), xn+1, tidak langsung dipakai pada iterasi selanjutnya

    q Pada iterasi selanjutnya, nilai tsb dimodifikasi dengan memasukkan pengaruh nilai variabel lama (pada iterasi sebelumnya), xn

    q faktor relaksasi dimaksudkan untuk mempercepat konvergensi hitungan (iterasi)

    q under-relaxation: 0 < < 1

    q over-relaxation: 1 < < 2

    ( ) nininew xxx += + 111

  • http://istiarto.staff.ugm.ac.id

    Successive Over-relaxation Method 43

    ( )[ ]

    ( )[ ] ( )[ ]33

    21

    23211

    131313

    22

    32311

    121212

    11

    313212111

    11

    1

    axxaxxac

    x

    axaxxac

    x

    axaxac

    x

    nnnnn

    nnnn

    nnn

    ++=

    +=

    =

    +++

    ++

    +

  • http://istiarto.staff.ugm.ac.id

    Successive Over-relaxation Method 44

    4.71102.03.0)3(

    3.193.071.0)2(

    85.72.01.03)1(

    321

    321

    321

    =+

    =+

    =

    xxx

    xxx

    xxx

    q Contoh: 3 persamaan linear

  • http://istiarto.staff.ugm.ac.id 45