Chapter 4 BMCU 2072

download Chapter 4 BMCU 2072

of 140

Transcript of Chapter 4 BMCU 2072

  • 8/13/2019 Chapter 4 BMCU 2072

    1/140

    Gaussian Elimination

  • 8/13/2019 Chapter 4 BMCU 2072

    2/140

  • 8/13/2019 Chapter 4 BMCU 2072

    3/140

    !orward Elimination

    =

    2.279

    2.177

    8.106

    112144

    1864

    1525

    3

    2

    1

    x

    x

    x

    The (oal of forward elimination is to transform the$oeffi$ient matri) into an upper trian(ular matri)

    =

    735.0

    21.96

    8.106

    7.000

    56.18.40

    1525

    3

    2

    1

    x

    x

    x

  • 8/13/2019 Chapter 4 BMCU 2072

    4/140

    !orward Elimination* &tep 1

    [ ] [ ]56.28.126456.21525 = [ ]

    [ ]

    [ ]56.18.40

    56.28.1264

    1864

    112144

    1864

    1525

    112144

    56.18.40

    1525

    +ivide Equation 1 ', "- and

    multipl, it ', ./0 56.225

    64=

    &u'tra$t the result from

    Equation "

    &u'stitute new equation for

    Equation "

  • 8/13/2019 Chapter 4 BMCU 2072

    5/140

    !orward Elimination* &tep 1 $ont2

    [ ] [ ]76.58.2814476.51525 =[ ]

    [ ]

    [ ]76.48.160

    76.58.28144

    112144

    76.48.160

    56.18.40

    1525

    112144

    56.18.40

    1525

    +ivide Equation 1 ', "- and

    multipl, it ', 1//0 76.525

    144=

    &u'tra$t the result from

    Equation 3

    &u'stitute new equation for

    Equation 3

  • 8/13/2019 Chapter 4 BMCU 2072

    6/140

    !orward Elimination* &tep "

    76.48.160

    56.18.401525

    [ ]( ) [ ]46.58.1605.356.18.40 =[ ]

    [ ]

    [ ]7.000

    46.58.160

    76.48.160

    7.000

    56.18.40

    1525

    +ivide Equation " ', 4/5

    and multipl, it ', 41.50

    5.38.4

    8.16=

    &u'tra$t the result from

    Equation 3

    &u'stitute new equation for

    Equation 3

  • 8/13/2019 Chapter 4 BMCU 2072

    7/140

    !orward Elimination

    A set of nequations and nun%nowns

    11313212111 ... bxaxaxaxa nn =++++

    22323222121 ... bxaxaxaxa nn =++++

    nnnnnnn bxaxaxaxa =++++ ...332211

    n612 steps of forward elimination

  • 8/13/2019 Chapter 4 BMCU 2072

    8/140

    !orward Elimination

    Step 1!or Equation "0 divide Equation 1 ', and

    multipl, ',

    )...( 1131321211111

    21 bxaxaxaxaa

    ann =++++

    111

    21

    111

    21

    21211

    21

    121

    ... ba

    axa

    a

    axa

    a

    axa

    nn

    =+++

    11a

    21a

  • 8/13/2019 Chapter 4 BMCU 2072

    9/140

    !orward Elimination

    1

    11

    211

    11

    21212

    11

    21121 ... b

    a

    axa

    a

    axa

    a

    axa nn =+++

    1

    11

    2121

    11

    212212

    11

    2122 ... b

    a

    abxa

    a

    aaxa

    a

    aa nnn =

    ++

    '

    2

    '

    22

    '

    22 ... bxaxa nn =++

    22323222121 ... bxaxaxaxa nn =++++&u'tra$t the result from Equation "

    47777777777777777777777777777777777777777777777777

    or

  • 8/13/2019 Chapter 4 BMCU 2072

    10/140

    !orward Elimination

    8epeat this pro$edure for the remainin(equations to redu$e the set of equations as

    11313212111 ... bxaxaxaxa nn =++++'

    2

    '

    23

    '

    232

    '

    22 ... bxaxaxa nn =+++'

    3

    '

    33

    '

    332

    '

    32 ... bxaxaxa nn =+++

    ''

    3

    '

    32

    '

    2 ... nnnnnn bxaxaxa =+++

    End of Step 1

  • 8/13/2019 Chapter 4 BMCU 2072

    11/140

    Step 28epeat the same pro$edure for the 3rdterm of

    Equation 3

    !orward Elimination

    11313212111 ... bxaxaxaxa nn =++++

    '

    2

    '

    23

    '

    232

    '

    22 ... bxaxaxa nn =+++

    "

    3

    "

    33

    "

    33 ... bxaxa nn =++

    ""

    3

    "

    3 ... nnnnn bxaxa =++

    End of Step 2

  • 8/13/2019 Chapter 4 BMCU 2072

    12/140

    !orward Elimination

    At the end of n612 !orward Elimination steps0 the s,stem

    of equations will loo% li%e

    '

    2

    '

    23

    '

    232

    '

    22 ... bxaxaxa nn =+++"

    3

    "

    33

    "

    33 ... bxaxa nn =++

    ( ) ( )11 = nnnn

    nn bxa

    11313212111 ... bxaxaxaxa nn =++++

    End of Step (n-1)

  • 8/13/2019 Chapter 4 BMCU 2072

    13/140

    9atri) !orm at End of !orward

    Elimination

    =

    )(n-

    n

    "

    '

    n

    )(n

    nn

    "n

    "

    '

    n

    ''

    n

    b

    b

    b

    b

    x

    x

    x

    x

    a

    aa

    aaa

    aaaa

    1

    3

    2

    1

    3

    2

    1

    1

    333

    22322

    1131211

    0000

    00

    0

  • 8/13/2019 Chapter 4 BMCU 2072

    14/140

    !orward Elimination* &tep 1

    [ ] [ ]56.28.126456.21525 = [ ]

    [ ]

    [ ]56.18.40

    56.28.1264

    1864

    112144

    1864

    1525

    112144

    56.18.40

    1525

    +ivide Equation 1 ', "- and

    multipl, it ', ./0 56.225

    64=

    &u'tra$t the result from

    Equation "

    &u'stitute new equation for

    Equation "

  • 8/13/2019 Chapter 4 BMCU 2072

    15/140

    !orward Elimination* &tep 1 $ont2

    [ ] [ ]76.58.2814476.51525 =[ ]

    [ ]

    [ ]76.48.160

    76.58.28144

    112144

    76.48.160

    56.18.40

    1525

    112144

    56.18.40

    1525

    +ivide Equation 1 ', "- and

    multipl, it ', 1//0 76.525

    144=

    &u'tra$t the result from

    Equation 3

    &u'stitute new equation for

    Equation 3

  • 8/13/2019 Chapter 4 BMCU 2072

    16/140

    !orward Elimination* &tep "

    76.48.160

    56.18.401525

    [ ]( ) [ ]46.58.1605.356.18.40 =[ ]

    [ ]

    [ ]7.000

    46.58.160

    76.48.160

    7.000

    56.18.40

    1525

    +ivide Equation " ', 4/5

    and multipl, it ', 41.50

    5.38.4

    8.16=

    &u'tra$t the result from

    Equation 3

    &u'stitute new equation for

    Equation 3

  • 8/13/2019 Chapter 4 BMCU 2072

    17/140

    #a$% &u'stitution

    &olve ea$h equation startin( from the last equation

    E)ample of a s,stem of 3 equations

    =

    735.0

    21.96

    8.106

    7.00056.18.40

    1525

    3

    2

    1

    xx

    x

  • 8/13/2019 Chapter 4 BMCU 2072

    18/140

    #a$% &u'stitution &tartin( Eqns

    '

    2

    '

    23

    '

    232

    '

    22 ... bxaxaxa nn =+++

    "

    3

    "

    3

    "

    33

    ... bxaxann

    =++

    ( ) ( )11 = n

    nn

    n

    nn bxa

    11313212111 ... bxaxaxaxa nn =++++

  • 8/13/2019 Chapter 4 BMCU 2072

    19/140

    #a$% &u'stitution

    &tart with the last equation 'e$ause it has onl, one un%nown

    )1(

    )1(

    =n

    nn

    n

    n

    na

    bx

  • 8/13/2019 Chapter 4 BMCU 2072

    20/140

    #a$% &u'stitution

    ( ) ( )

    ( ) 1,...,1for

    1

    1

    11

    =

    =+=

    nia

    xab

    xi

    ii

    n

    ij j

    i

    ij

    i

    i

    i

    )1(

    )1(

    =

    n

    nn

    nnn

    a

    bx

    ( ) ( ) ( ) ( )

    ( ) 1,...,1for...

    1

    1

    ,2

    1

    2,1

    1

    1,

    1

    ==

    +

    ++

    +

    nia

    xaxaxabxi

    ii

    n

    i

    nii

    i

    iii

    i

    ii

    i

    ii

  • 8/13/2019 Chapter 4 BMCU 2072

    21/140

    E)ample* Thermal Coeffi$ient

    A trunnion of diameter 1"3.3:

    has to 'e $ooled from a room

    temperature of 5;

    The equation that (ives the

    diametri$ $ontra$tion0 +0 of the

    trunnion in dr,6i$e>al$ohol

    mi)ture 'oilin( temperature is

    41;5

    slid throu(h the hu' after$ontra$tin(

  • 8/13/2019 Chapter 4 BMCU 2072

    22/140

    E)ample* Thermal Coeffi$ient

    The e)pression for the thermal e)pansion $oeffi$ient0

    is o'tained usin( re(ression anal,sis and hen$e solvin( the followin(

    simultaneous linear equations*

    !ind the values of usin( Nave Gauss Elimination

    =

    567992

    10041621

    100571

    102435751086472110267

    10864721102672860

    102672860242

    4

    3

    2

    1

    1085

    85

    5

    .

    .

    .

    a

    a

    a

    ...

    ..

    .

    2

    321 TaTaa ++=

    321 and,, aaa

  • 8/13/2019 Chapter 4 BMCU 2072

    23/140

    E)ample* Thermal Coeffi$ient

    !orward Elimination* &tep 1

    ?ields

    ( )=

    2860

    24

    12

    RowRow

    =

    567992

    1017972

    100571

    1024351086472110267

    109957910851830

    102672860243

    4

    3

    2

    1

    1085

    75

    5

    .

    .

    .

    a

    a

    a

    ...

    ..

    .

  • 8/13/2019 Chapter 4 BMCU 2072

    24/140

  • 8/13/2019 Chapter 4 BMCU 2072

    25/140

  • 8/13/2019 Chapter 4 BMCU 2072

    26/140

    E)ample* Thermal Coeffi$ient

    #a$% &u'stitution* &olve for a3usin( the third equation

    11

    9

    2

    3

    2

    3

    9

    1040661

    1053494

    1037886

    10378861053494

    =

    =

    =

    .

    .

    .a

    .a.

  • 8/13/2019 Chapter 4 BMCU 2072

    27/140

    E)ample* Thermal Coeffi$ient

    #a$% &u'stitution* &olve for a"usin( the se$ond equation

    3

    3

    7

    2

    5 101797.2)109957.9(108518.3 =+ aa

    ( )

    ( ) ( )

    9

    5

    1173

    5

    3

    73

    2

    1000872

    1085183

    1040661109957.91017972

    1085183109957.91017972

    =

    =

    =

    .

    .

    ..

    .a.a

  • 8/13/2019 Chapter 4 BMCU 2072

    28/140

    E)ample* Thermal Coeffi$ient

    #a$% &u'stitution*&olve for a1usin( the first equation

    ( ) 435

    21 10057110267286024 =++ .a.aa

    ( )

    ( ) ( ) ( )

    6

    11594

    3

    5

    2

    4

    1

    100690524

    10406611026710008722860100571

    24

    102672860100571

    =

    =

    =

    .

    ....

    a.a.a

  • 8/13/2019 Chapter 4 BMCU 2072

    29/140

    =

    11

    9

    6

    3

    2

    1

    1040661

    1000872

    1006905

    .

    .

    .

    a

    a

    a

    E)ample* Thermal Coeffi$ient

    &olution*The solution ve$tor is

    The pol,nomial that passes throu(h the three data

    points is then*

    ( ) 2321 TaTaaT ++=

    21196 104066110008721006905 T.T.. +=

  • 8/13/2019 Chapter 4 BMCU 2072

    30/140

    Nave Gauss Elimination

    @itfalls

  • 8/13/2019 Chapter 4 BMCU 2072

    31/140

    @itfalls of Nave Gauss Elimination

    @ossi'le division ', Bero

    ar(e round6off errors

  • 8/13/2019 Chapter 4 BMCU 2072

    32/140

    955

    11326

    3710

    321

    321

    32

    =+

    =++=

    xxx

    xxx

    xx

    @itfallD1 +ivision ', Bero

    =

    9

    11

    3

    515

    326

    7100

    3

    2

    1

    x

    x

    x

  • 8/13/2019 Chapter 4 BMCU 2072

    33/140

    s division ', Bero an issue hereF

    955

    14356

    1571012

    321

    321

    321

    =+

    =++

    =+

    xxx

    xxx

    xxx

    =

    9

    14

    15

    515

    356

    71012

    3

    2

    1

    x

    x

    x

  • 8/13/2019 Chapter 4 BMCU 2072

    34/140

    s division ', Bero an issue hereF

    ?E&

    28524

    14356

    1571012

    321

    321

    321

    =+

    =++

    =+

    xxx

    xxx

    xxx

    =

    28

    14

    15

    5124

    356

    71012

    3

    2

    1

    x

    x

    x

    =

    2

    5.6

    15

    192112

    5.600

    71012

    3

    2

    1

    x

    x

    x

    +ivision ', Bero is a possi'ilit, at an, step

    of forward elimination

  • 8/13/2019 Chapter 4 BMCU 2072

    35/140

    @itfallD" ar(e 8ound6off Errors

    =

    9

    751.145

    315

    7249.23101520

    3

    2

    1

    x

    x

    x

    E)a$t &olution

    =

    1

    1

    1

    3

    2

    1

    x

    x

    x

  • 8/13/2019 Chapter 4 BMCU 2072

    36/140

    @itfallD" ar(e 8ound6off Errors

    =

    9

    751.145

    315

    7249.23101520

    3

    2

    1

    x

    x

    x

    &olve it on a $omputer usin( .si(nifi$ant di(its with $hoppin(

    =

    999995.0

    05.1

    9625.0

    3

    2

    1

    x

    x

    x

  • 8/13/2019 Chapter 4 BMCU 2072

    37/140

    @itfallD" ar(e 8ound6off Errors

    =

    9

    751.145

    315

    7249.23101520

    3

    2

    1

    x

    x

    x

    &olve it on a $omputer usin( -si(nifi$ant di(its with $hoppin(

    =

    99995.0

    5.1

    625.0

    3

    2

    1

    x

    x

    x

    s there a wa, to redu$e the round off errorF

  • 8/13/2019 Chapter 4 BMCU 2072

    38/140

    Avoidin( @itfalls

    n$rease the num'er of si(nifi$ant di(its

    +e$reases round6off error

    +oes not avoid division ', Bero

  • 8/13/2019 Chapter 4 BMCU 2072

    39/140

    Avoidin( @itfalls

    Gaussian Elimination with @artial @ivotin(

    Avoids division ', Bero

    8edu$es round off error

  • 8/13/2019 Chapter 4 BMCU 2072

    40/140

    Gauss Elimination with@artial @ivotin(

  • 8/13/2019 Chapter 4 BMCU 2072

    41/140

    hat is +ifferent A'out @artial

    @ivotin(F

    pka

    At the 'e(innin( of the kthstep of forward elimination0

    find the ma)imum of

    nkkkkk aaa .......,,........., ,1+

    f the ma)imum of the values is

    in thep throw0 ,npk then swit$h rowspand k

  • 8/13/2019 Chapter 4 BMCU 2072

    42/140

    9atri) !orm at #e(innin( of "nd

    &tep of !orward Elimination

    =

    '

    '3

    2

    1

    3

    2

    1

    ''

    4

    '

    32

    '3

    '3332

    22322

    1131211

    0

    0

    0

    n

    '

    nnnnn

    '

    n

    n'

    '

    n

    ''

    n

    b

    b

    b

    b

    x

    x

    x

    x

    aaaa

    aaa

    aaa

    aaaa

  • 8/13/2019 Chapter 4 BMCU 2072

    43/140

    E)ample "ndstep of !E2

    =

    3

    9

    8

    6

    5

    431112170

    862390

    1111240

    21670

    67.31.5146

    5

    4

    3

    2

    1

    x

    x

    x

    x

    x

    hi$h two rows would ,ou swit$hF

  • 8/13/2019 Chapter 4 BMCU 2072

    44/140

    E)ample "ndstep of !E2

    =

    6

    9

    8

    3

    5

    21670

    862390

    1111240

    431112170

    67.31.5146

    5

    4

    3

    2

    1

    x

    x

    x

    x

    x

    &wit$hed 8ows

  • 8/13/2019 Chapter 4 BMCU 2072

    45/140

    Gaussian Elimination

    with @artial @ivotin(

    A method to solve simultaneous linear

    equations of the form [A][X]=[C]

    Two steps

    1 !orward Elimination

    " #a$% &u'stitution

  • 8/13/2019 Chapter 4 BMCU 2072

    46/140

    !orward Elimination

    &ame as nave Gauss elimination method

    e)$ept that we swit$h rows 'efore eachof

    the n612 steps of forward elimination

  • 8/13/2019 Chapter 4 BMCU 2072

    47/140

    E)ample* 9atri) !orm at #e(innin(

    of "nd

    &tep of !orward Elimination

    =

    '

    '

    3

    2

    1

    3

    2

    1

    ''4

    '32

    '

    3

    '

    3332

    22322

    1131211

    0

    00

    n

    '

    nnnnn'n

    n

    '

    '

    n

    ''

    n

    b

    bb

    b

    x

    xx

    x

    aaaa

    aaaaaa

    aaaa

  • 8/13/2019 Chapter 4 BMCU 2072

    48/140

    9atri) !orm at End of !orward

    Elimination

    =

    )(n-n

    "

    '

    n)(n

    nn

    "

    n

    "

    '

    n

    ''

    n

    b

    bb

    b

    x

    xx

    x

    a

    aaaaa

    aaaa

    1

    3

    2

    1

    3

    2

    1

    1

    333

    22322

    1131211

    0000

    000

  • 8/13/2019 Chapter 4 BMCU 2072

    49/140

    #a$% &u'stitution &tartin( Eqns

    '

    2

    '

    23

    '

    232

    '

    22 ... bxaxaxa nn =+++

    "

    3

    "

    3

    "

    33 ... bxaxa nn =++

    ( ) ( )11 = n

    nn

    n

    nn bxa

    11313212111 ... bxaxaxaxa nn =++++

  • 8/13/2019 Chapter 4 BMCU 2072

    50/140

    #a$% &u'stitution

    ( ) ( )

    ( ) 1,...,1for11

    11

    =

    =

    +=

    nia

    xab

    xi

    ii

    n

    ijj

    iij

    ii

    i

    )1(

    )1(

    =

    n

    nn

    nn

    na

    bx

  • 8/13/2019 Chapter 4 BMCU 2072

    51/140

    Gauss Elimination with

    @artial @ivotin(E)ample 1

  • 8/13/2019 Chapter 4 BMCU 2072

    52/140

    E)ample "

    =

    2279

    2177

    8106

    112144

    1864

    1525

    3

    2

    1

    .

    .

    .

    a

    a

    a

    &olve the followin( set of equations

    ', Gaussian elimination with partialpivotin(

  • 8/13/2019 Chapter 4 BMCU 2072

    53/140

    E)ample " Cont

    =

    2279

    2177

    8106

    112144

    1864

    1525

    3

    2

    1

    .

    .

    .

    a

    a

    a

    1 !orward Elimination

    " #a$% &u'stitution

    2.279112144

    2.1771864

    8.1061525

  • 8/13/2019 Chapter 4 BMCU 2072

    54/140

    !orward Elimination

  • 8/13/2019 Chapter 4 BMCU 2072

    55/140

    Num'er of &teps of !orward

    Elimination

    Num'er of steps of forward elimination is

    n12=312="

  • 8/13/2019 Chapter 4 BMCU 2072

    56/140

    !orward Elimination* &tep 1 E)amine a'solute values of first $olumn0 first row

    and 'elow

    144,64,25

    ar(est a'solute value is 1// and e)ists in row 3

    &wit$h row 1 and row 3

    8.1061525

    2.1771864

    2.279112144

    2.279112144

    2.1771864

    8.1061525

  • 8/13/2019 Chapter 4 BMCU 2072

    57/140

    !orward Elimination* &tep 1 $ont2

    [ ] [ ]1.1244444.0333.599.634444.02.279112144

    =

    8.1061525

    2.1771864

    2.279112144

    [ ]

    [ ]

    [ ]10.53.55560667.20

    124.10.44445.33363.99

    177.21864

    8.1061525

    10.535556.0667.20

    2.279112144

    +ivide Equation 1 ', 1// and

    multipl, it ', ./0 4444.0144

    64=

    &u'tra$t the result from

    Equation "

    &u'stitute new equation for

    Equation "

  • 8/13/2019 Chapter 4 BMCU 2072

    58/140

    !orward Elimination* &tep 1 $ont2

    [ ] [ ]47.481736.0083.200.251736.0279.2112144 =

    [ ]

    [ ]

    [ ]33.588264.0917.20

    48.470.17362.08325

    106.81525

    8.1061525

    10.535556.0667.20

    2.279112144

    33.588264.0917.20

    10.535556.0667.20

    2.279112144

    +ivide Equation 1 ', 1// and

    multipl, it ', "-0 1736.0144

    25=

    &u'tra$t the result from

    Equation 3

    &u'stitute new equation for

    Equation 3

  • 8/13/2019 Chapter 4 BMCU 2072

    59/140

    !orward Elimination* &tep " E)amine a'solute values of se$ond $olumn0 se$ond row

    and 'elow

    2.917,667.2

    ar(est a'solute value is "H1I and e)ists in row 3

    &wit$h row " and row 3

    10.535556.0667.20

    33.588264.0917.20

    2.279112144

    33.588264.0917.20

    10.535556.0667.20

    2.279112144

    ! d Eli i ti &t " t 2

  • 8/13/2019 Chapter 4 BMCU 2072

    60/140

    !orward Elimination* &tep " $ont2

    [ ] [ ]33.537556.0667.209143.058.330.82642.9170 =

    10.535556.0667.20

    33.588264.0917.20

    2.279112144

    [ ]

    [ ]

    [ ]23.02.000

    53.330.75562.6670

    53.100.55562.6670

    23.02.000

    33.588264.0917.20

    2.279112144

    +ivide Equation " ', "H1I and

    multipl, it ', "..I0.9143.0

    917.2

    667.2=

    &u'tra$t the result from

    Equation 3

    &u'stitute new equation for

    Equation 3

  • 8/13/2019 Chapter 4 BMCU 2072

    61/140

    #a$% &u'stitution

  • 8/13/2019 Chapter 4 BMCU 2072

    62/140

    #a$% &u'stitution

    1.15

    2.0

    23.0

    23.02.0

    3

    3

    =

    =

    =

    a

    a

    &olvin( for a3

    =

    2303358

    2279

    2000

    8264091720

    112144

    23.02.000

    33.588264.0917.20

    2.279112144

    3

    2

    1

    .

    .

    .

    a

    a

    a

    .

    ..

  • 8/13/2019 Chapter 4 BMCU 2072

    63/140

    #a$% &u'stitution $ont2

    &olvin( for a2

    6719.

    917.2

    15.18264.033.58917.2

    8264.033.58

    33.588264.0917.2

    32

    32

    =

    =

    =

    =+a

    a

    aa

    =

    23033582279

    2000

    8264091720112144

    3

    2

    1

    .

    ..

    a

    aa

    .

    ..

  • 8/13/2019 Chapter 4 BMCU 2072

    64/140

    #a$% &u'stitution $ont2

    &olvin( for a1

    2917.0

    144

    15.167.19122.279144

    122.279

    2.27912144

    321

    321

    =

    =

    =

    =++

    aaa

    aaa

    =

    230

    33582279

    2000

    8264091720112144

    3

    2

    1

    .

    ..

    a

    aa

    .

    ..

    Gaussian Elimination with @artial

  • 8/13/2019 Chapter 4 BMCU 2072

    65/140

    @ivotin( &olution

    =

    2279

    2177

    8106

    112144

    1864

    1525

    3

    2

    1

    .

    .

    .

    a

    a

    a

    =

    15.1

    67.19

    2917.0

    3

    2

    1

    a

    a

    a

    23.02.000

    33.588264.0917.20

    2.279112144

    Gaussian Elimination without

  • 8/13/2019 Chapter 4 BMCU 2072

    66/140

    =

    2.279

    2.1778.106

    112144

    18641525

    3

    2

    1

    x

    xx

    =

    735.0

    21.96

    8.106

    7.000

    56.18.40

    1525

    3

    2

    1

    x

    x

    x

    @artial @ivotin( &olution

    =

    05.1

    7025.19

    1705.8

    3

    2

    1

    a

    a

    a

  • 8/13/2019 Chapter 4 BMCU 2072

    67/140

    Gaussian Elimination withPartial Pivoting Solution

    Gaussian Elimination

    without Partial Pivoting

    Solution

    =

    05.1

    7025.19

    1705.8

    3

    2

    1

    a

    a

    a

    =

    15.1

    67.19

    2917.0

    3

    2

    1

    a

    a

    a

  • 8/13/2019 Chapter 4 BMCU 2072

    68/140

    Gauss Elimination with

    @artial @ivotin(E)ample "

  • 8/13/2019 Chapter 4 BMCU 2072

    69/140

    @artial @ivotin(* E)ampleConsider the s,stem of equations

    655

    901.36099.23

    7710

    321

    321

    21

    =+

    =++

    =

    xxx

    xxx

    xx

    n matri) form

    515

    6099.23

    0710

    3

    2

    1

    x

    x

    x

    6

    901.3

    7

    =

    &olve usin( Gaussian Elimination with @artial @ivotin( usin( five

    si(nifi$ant di(its with $hoppin(

  • 8/13/2019 Chapter 4 BMCU 2072

    70/140

    @artial @ivotin(* E)ample!orward Elimination* &tep 1

    E)aminin( the values of the first $olumn

    J1;J0 J63J0 and J-J or 1;0 30 and -

    The lar(est a'solute value is 1;0 whi$h means0 to

    follow the rules of @artial @ivotin(0 we swit$hrow1 with row1

    =

    6

    901.3

    7

    515

    6099.23

    0710

    3

    2

    1

    x

    x

    x

    =

    5.2

    001.6

    7

    55.20

    6001.00

    0710

    3

    2

    1

    x

    x

    x

    @erformin( !orward Elimination

  • 8/13/2019 Chapter 4 BMCU 2072

    71/140

    @artial @ivotin(* E)ample

    !orward Elimination* &tep "

    E)aminin( the values of the first $olumn

    J6;;;1J and J"-J or ;;;;1 and "-

    The lar(est a'solute value is "-0 so row " isswit$hed with row 3

    =

    5.2

    001.67

    55.20

    6001.000710

    3

    2

    1

    x

    xx

    =

    001.6

    5.27

    6001.00

    55.200710

    3

    2

    1

    x

    xx

    @erformin( the row swap

  • 8/13/2019 Chapter 4 BMCU 2072

    72/140

    @artial @ivotin(* E)ample

    !orward Elimination* &tep "

    @erformin( the !orward Elimination results in*

    =

    002.6

    5.2

    7

    002.600

    55.20

    0710

    3

    2

    1

    x

    x

    x

  • 8/13/2019 Chapter 4 BMCU 2072

    73/140

    @artial @ivotin(* E)ample

    #a$% &u'stitution

    &olvin( the equations throu(h 'a$% su'stitution

    1

    002.6

    002.63 ==x

    15.2

    55.2 32 =

    =

    xx

    010

    077 321 =

    +=

    xxx

    =

    002.6

    5.2

    7

    002.600

    55.20

    0710

    3

    2

    1

    x

    x

    x

  • 8/13/2019 Chapter 4 BMCU 2072

    74/140

    @artial @ivotin(* E)ample

    [ ]

    =

    =

    1

    1

    0

    3

    2

    1

    x

    x

    x

    X exact[ ]

    =

    =

    1

    1

    0

    3

    2

    1

    x

    x

    x

    X calculated

    Compare the $al$ulated and e)a$t solution

    The fa$t that the, are equal is $oin$iden$e0 'ut it

    does illustrate the advanta(e of @artial @ivotin(

  • 8/13/2019 Chapter 4 BMCU 2072

    75/140

    K +e$omposition

  • 8/13/2019 Chapter 4 BMCU 2072

    76/140

    K +e$omposition

    K +e$omposition is another method to solve a set of

    simultaneous linear equations

    hi$h is 'etter0 Gauss Elimination or K +e$ompositionF

    To answer this0 a $loser loo% at K de$omposition isneeded

  • 8/13/2019 Chapter 4 BMCU 2072

    77/140

    9ethod

    !or most non6sin(ular matri) [A] that one $ould $ondu$t Nave Gauss

    Elimination forward elimination steps0 one $an alwa,s write it as

    [A] = [L][U]where

    [L] = lower trian(ular matri)

    [U] = upper trian(ular matri)

    K +e$omposition

  • 8/13/2019 Chapter 4 BMCU 2072

    78/140

    Low does K +e$omposition wor%F

  • 8/13/2019 Chapter 4 BMCU 2072

    79/140

    K +e$omposition

    Low $an this 'e usedF

    Given [A][X] = [C]

    1 +e$ompose [A] into [L] and[U]

    " &olve [L][] = [C] for []

    3 &olve [U][X] = [] for [X]

  • 8/13/2019 Chapter 4 BMCU 2072

    80/140

    9ethod* [A] +e$ompose to [] and [K]

    [ ] [ ][ ]

    ==

    33

    2322

    131211

    3231

    21

    00

    0

    1

    01

    001

    u

    uu

    uuu

    ULA

    [U] is the same as the $oeffi$ient matri) at the end of the forward

    elimination step

    [L] is o'tained usin( the multipliersthat were used in the forwardelimination pro$ess

  • 8/13/2019 Chapter 4 BMCU 2072

    81/140

    !indin( the [U] matri)Ksin( the !orward Elimination @ro$edure of Gauss Elimination

    112144

    1864

    1525

    ( )

    112144

    56.18.40

    1525

    56.212;56.225

    64

    == RowRow

    ( )

    76.48.160

    56.18.40

    1525

    76.513;76.525

    144

    == RowRow

    &tep 1*

  • 8/13/2019 Chapter 4 BMCU 2072

    82/140

    !indin( the [K] 9atri)

    &tep "*

    76.48.160

    56.18.40

    1525

    ( )

    7.000

    56.18.40

    1525

    5.323;5.38.4

    8.16

    ==

    RowRow

    [ ]

    =

    7.000

    56.18.40

    1525

    U

    9atri) after &tep 1*

  • 8/13/2019 Chapter 4 BMCU 2072

    83/140

    !indin( the [L] matri)

    Ksin( the multipliers used durin( the !orward Elimination @ro$edure

    1

    01

    001

    3231

    21

    56.225

    64

    11

    2121 ===

    a

    a

    76.525

    144

    11

    31

    31 ===a

    a

    !rom the first step

    of forward

    elimination 1121441864

    1525

  • 8/13/2019 Chapter 4 BMCU 2072

    84/140

    !indin( the [] 9atri)

    [ ]

    = 15.376.50156.2

    001

    L

    !rom the se$ond

    step of forward

    elimination

    76.48.160

    56.18.40

    1525

    5.38.4

    8.16

    22

    3232 =

    ==

    a

    a

  • 8/13/2019 Chapter 4 BMCU 2072

    85/140

    +oes [][K] = [A]F

    [ ] [ ] =

    =7.000

    56.18.40

    1525

    15.376.5

    0156.2

    001

    UL F

    E l Th l C ffi i t

  • 8/13/2019 Chapter 4 BMCU 2072

    86/140

    E)ample* Thermal Coeffi$ient

    A trunnion of diameter 1"3.3:

    has to 'e $ooled from a room

    temperature of 5;

    The equation that (ives the

    diametri$ $ontra$tion + of

    the trunnion in dr,6

    i$e>al$ohol 'oilin(

    temperature is 41;5

    throu(h the hu' after

    $ontra$tin(

  • 8/13/2019 Chapter 4 BMCU 2072

    87/140

    E)ample* Thermal Coeffi$ient

    The e)pression for the thermal e)pansion $oeffi$ient0 a ! a"# a

    $T # a

    %T$

    is o'tained usin( re(ression anal,sis and hen$e solvin( the followin(

    simultaneous linear equations*

    !ind the values of a"& a

    $&and a

    %usin( K +e$omposition

    =

    56799.2

    1004162.1

    10057.1

    1024357.51086472.11026.7

    1086472.11026.72860

    1026.72860242

    4

    3

    2

    1

    1085

    85

    5

    a

    a

    a

  • 8/13/2019 Chapter 4 BMCU 2072

    88/140

    E)ample* Thermal Coeffi$ient

    Kse !orward Elimination to find the [K] matri)

    1085

    85

    5

    1024357.51086472.11026.7

    1086472.11026.72860

    1026.7286024

    ( )

    102436.5108647.11026.7

    109957.9108518.30

    1026.7286024

    17.11912;17.11924

    2860

    1085

    75

    5

    ==

    RowRow

    ( )

    100474.3109957.90

    109957.9108518.30

    1026.7286024

    3025013;3025024

    10267

    107

    75

    5

    5

    ==

    RowRow.

    &tep 1

  • 8/13/2019 Chapter 4 BMCU 2072

    89/140

    E)ample* Thermal Coeffi$ient

    ( )

    105349.400

    109957.9108518.30

    1026.7286024

    50.25923;50.259108518.3

    109957.9

    9

    75

    5

    5

    7

    ==

    RowRow

    [ ]

    =9

    75

    5

    105349.400

    109957.9108518.30

    1026.7286024

    U

    100474.3109957.90

    109957.9108518.30

    1026.7286024

    107

    75

    5

    This is the matri)

    after the 1ststep

    &tep "

  • 8/13/2019 Chapter 4 BMCU 2072

    90/140

    E)ample* Thermal Coeffi$ient

    Kse the multipliers from !orward Elimination

    1

    01

    001

    3231

    21

    1711924

    2860

    11

    2121 .

    a

    a=

    ==

    3025024

    10267 5

    11

    3131 =

    == .

    a

    a

    !rom the first step of forward elimination

    1085

    85

    5

    1024357.51086472.11026.71086472.11026.72860

    1026.7286024

  • 8/13/2019 Chapter 4 BMCU 2072

    91/140

    E)ample* Thermal Coeffi$ient

    [ ]

    =

    150.25930250

    0117.119

    001

    L

    !rom the se$ond step of forward elimination

    502591085183109957.9

    5

    7

    22

    3232 .

    .aa ===

    96

    65

    5

    104742.3010957.990

    10957.991085183.30

    1026.7286024

  • 8/13/2019 Chapter 4 BMCU 2072

    92/140

    E)ample* Thermal Coeffi$ient

    +oes [][K] = [A]F

    [ ] [ ] ?

    105323.400

    109957.9108518.30

    1026.7286024

    150.25930250

    0117.119

    001

    9

    75

    5

    =

    =UL

  • 8/13/2019 Chapter 4 BMCU 2072

    93/140

    E)ample* Thermal Coeffi$ient

    &et [][M] = [C]

    =

    567992

    10041621

    100571

    15025930250

    0117119

    0012

    4

    3

    2

    1

    .

    .

    .

    .

    .

    ( ) 56799250259302501004162117119

    10057.1

    31

    221

    4

    1

    .'.'

    .''.

    '

    =++=+

    =

    &olve for [M]

  • 8/13/2019 Chapter 4 BMCU 2072

    94/140

    E)ample* Thermal Coeffi$ient

    4

    1 10057.1 ='

    ( )

    ( )

    00217970

    1005711711910041621

    1711910041621

    42

    1

    2

    2

    .

    ...

    '..'

    ==

    =

    ( )

    ( )

    0637880

    002179705025910057130250567992

    5025930250567992

    4

    213

    .

    ....

    ..

    =

    =

    =

    [ ]

    =

    =

    0637880

    00217970

    100571 4

    3

    2

    1

    .

    .

    .

    &olve for [M]

  • 8/13/2019 Chapter 4 BMCU 2072

    95/140

    E)ample* Thermal Coeffi$ient

    &et [K][A] = [M]

    =

    0637880

    00217970

    100571

    105349400

    109957.910851830

    10267286024 4

    3

    2

    1

    9

    75

    5

    .

    .

    .

    a

    a

    a

    .

    .

    .

    ( )

    ( )06378801053484

    0021797.0109957.9108518.3

    10057.11026.7286024

    3

    9

    3

    7

    2

    5

    4

    3

    5

    21

    .a.

    aa

    aaa

    =

    =+

    =++

    &olve for A

    The 3 equations 'e$ome

  • 8/13/2019 Chapter 4 BMCU 2072

    96/140

    E)ample* Thermal Coeffi$ient

    11

    93

    1040661

    1053494

    0637880

    =

    =

    .

    .

    .a

    ( )

    ( ) ( )

    9

    5

    117

    5

    3

    7

    2

    1000872

    1085183

    1040661109957.900217970

    1085183

    109957.900217970

    =

    =

    =

    .

    .

    ..

    .

    a.a

    &olve for A

  • 8/13/2019 Chapter 4 BMCU 2072

    97/140

    E)ample* Thermal Coeffi$ient

    ( )

    ( ) ( )

    6

    11594

    3

    5

    2

    4

    1

    1006905

    24

    10406611026710008722860100571

    24

    102672860100571

    =

    =

    =

    .

    ....

    a.a.a

    =

    11

    9

    6

    3

    2

    1

    1040661

    1000872

    1006905

    .

    .

    .

    a

    a

    a

  • 8/13/2019 Chapter 4 BMCU 2072

    98/140

    E)ample* Thermal Coeffi$ient

    The solution

    ve$tor is

    The pol,nomial that passes throu(h the three

    data points is then*

    =

    11

    9

    6

    3

    2

    1

    1040661

    1000872

    1006905

    .

    .

    .

    a

    a

    a

    ( )21196

    2321

    104066110008721006905 T.T..

    TaTaaT +=

    ++=

  • 8/13/2019 Chapter 4 BMCU 2072

    99/140

    !indin( the inverse of a square matri)

    The inverse [#] of a square matri) [A] is defined as

    [A][)] = [*] = [)][A]

  • 8/13/2019 Chapter 4 BMCU 2072

    100/140

    !indin( the inverse of a square matri)

    Low $an K +e$omposition 'e used to find the inverseF

    Assume the first $olumn of [B] to 'e [b11 b12 bn1]T

    Ksin( this and the definition of matri) multipli$ation

    !irst $olumn of [B] &e$ond $olumn of [B]

    [ ]

    =

    0

    0

    1

    1

    21

    11

    nb

    b

    b

    A [ ]

    =

    0

    1

    0

    2

    22

    12

    nb

    b

    b

    A

    The remainin( $olumns in [B] $an 'e found in the same manner

  • 8/13/2019 Chapter 4 BMCU 2072

    101/140

    E)ample* nverse of a 9atri)

    !ind the inverse of a square matri) [A]

    [ ]

    =

    112144

    1864

    1525

    A

    [ ] [ ] [ ]

    ==

    7000

    561840

    1525

    153765

    01562

    001

    .

    ..

    ..

    .ULA

    Ksin( the de$omposition pro$edure0 the [L] and [U] matri$es are found to 'e

  • 8/13/2019 Chapter 4 BMCU 2072

    102/140

    E)ample* nverse of a 9atri)

    &olvin( for the ea$h $olumn of [B] requires two steps

    12&olve [L] [Z] = [C] for [Z]

    "2&olve [U] [X] = [Z] for [X]

    &tep 1* [ ][ ] [ ]

    =

    =

    0

    01

    15.376.5

    0156.2001

    3

    2

    1

    '

    ''

    CL

    This (enerates the equations*

    05.376.5

    056.21

    321

    21

    1

    =++

    =+ =

    '''

    '''

  • 8/13/2019 Chapter 4 BMCU 2072

    103/140

    E)ample* nverse of a 9atri)

    &olvin( for [Z]

    ( )

    ( ) ( )23

    5625317650

    537650

    562

    15620

    5620

    1

    213

    12

    1

    ....

    '.'.'

    .

    .

    '.'

    '

    = =

    ====

    =

    [ ]

    =

    =23

    562

    1

    3

    2

    1

    .

    .

    '

    '

    '

  • 8/13/2019 Chapter 4 BMCU 2072

    104/140

    E)ample* nverse of a 9atri)

    &olvin( [U][X] = [Z] for [X]

    =

    3.2

    2.56

    1

    7.000

    56.18.40

    1525

    31

    21

    11

    b

    b

    b

    2.37.0

    56.256.18.4

    1525

    31

    3121

    312111

    =

    =

    =++

    b

    bb

    bbb

  • 8/13/2019 Chapter 4 BMCU 2072

    105/140

    E)ample* nverse of a 9atri)

    Ksin( #a$%ward &u'stitution

    ( )

    ( )04762.0

    25

    571.49524.05125

    51

    9524.08.4

    571.4560.156.2

    8.4

    560.156.2

    571.47.0

    2.3

    312111

    31

    21

    31

    =

    =

    =

    =

    +=

    +

    =

    ==

    bbb

    b

    b

    b &o the first $olumn ofthe inverse of [A] is*

    =

    571.4

    9524.0

    04762.0

    31

    21

    11

    b

    b

    b

  • 8/13/2019 Chapter 4 BMCU 2072

    106/140

    E)ample* nverse of a 9atri)

    8epeatin( for the se$ond and third $olumns of the inverse

    &e$ond Column Third Column

    =

    0

    1

    0

    112144

    1864

    1525

    32

    22

    12

    b

    b

    b

    =

    000.5

    417.1

    08333.0

    32

    22

    12

    b

    b

    b

    =

    1

    0

    0

    112144

    1864

    1525

    33

    23

    13

    b

    b

    b

    =

    429.1

    4643.0

    03571.0

    33

    23

    13

    b

    b

    b

  • 8/13/2019 Chapter 4 BMCU 2072

    107/140

    E)ample* nverse of a 9atri)

    The inverse of [A] is

    [ ]

    =

    429.1000.5571.44643.0417.19524.0

    03571.008333.004762.01

    A

    To $he$% ,our wor% do the followin( operation

    [A][A]61= [*] = [A]61[A]

  • 8/13/2019 Chapter 4 BMCU 2072

    108/140

    Gauss6&eidel 9ethod

    Gauss6&eidel 9ethod

  • 8/13/2019 Chapter 4 BMCU 2072

    109/140

    Gauss6&eidel 9ethod

    An iterativemethod

    #asi$ @ro$edure*

    6Al(e'rai$all, solve ea$h linear equation for )i

    6Assume an initial (uess solution arra,

    6&olve for ea$h )iand repeat

    6Kse a'solute relative appro)imate error after ea$h iteration

    to $he$% if error is within a pre6spe$ified toleran$e

  • 8/13/2019 Chapter 4 BMCU 2072

    110/140

    Gauss6&eidel 9ethod

  • 8/13/2019 Chapter 4 BMCU 2072

    111/140

    Gauss6&eidel 9ethod

    Al(orithmA set of nequations and nun%nowns*

    11313212111 ... bxaxaxaxa nn =++++

    2323222121 ... bxaxaxaxa n$n =++++

    nnnnnnn bxaxaxaxa =++++ ...332211

    f*the dia(onal elements arenon6Bero

    8ewriteea$h equation solvin(for the $orrespondin( un%nown

    e)*

    !irst equation0 solve for )1

    &e$ond equation0 solve for )"

    Gauss6&eidel 9ethod

  • 8/13/2019 Chapter 4 BMCU 2072

    112/140

    Gauss6&eidel 9ethod

    Al(orithm8ewritin( ea$h equation

    11

    13132121

    1a

    xaxaxacx nn

    =

    nn

    nnnnnn

    n

    nn

    nnnnnnnnn

    n

    nn

    a

    xaxaxacx

    a

    xaxaxaxacx

    a

    xaxaxacx

    11,2211

    1,1

    ,122,122,111,11

    1

    22

    232312122

    =

    =

    =

    !rom Equation 1

    !rom equation "

    !rom equation n61

    !rom equation n

    Gauss6&eidel 9ethod

  • 8/13/2019 Chapter 4 BMCU 2072

    113/140

    Gauss &eidel 9ethod

    Al(orithmGeneral !orm of ea$h equation

    11

    1

    1

    11

    1a

    xac

    x

    n

    j

    j

    jj

    =

    =

    22

    21

    22

    2a

    xac

    x

    j

    n

    jj

    j=

    =

    1,1

    1

    1

    ,11

    1

    =

    =nn

    n

    nj

    j

    jjnn

    na

    xac

    x

    nn

    n

    njj

    jnjn

    na

    xac

    x

    =

    =1

    Gauss6&eidel 9ethod

  • 8/13/2019 Chapter 4 BMCU 2072

    114/140

    Gauss &eidel 9ethod

    Al(orithmGeneral !orm for an, row iO

    .,,2,1,1

    nia

    xac

    xii

    n

    ijj

    jiji

    i =

    ==

    Low or where $an this equation 'e usedF

  • 8/13/2019 Chapter 4 BMCU 2072

    115/140

  • 8/13/2019 Chapter 4 BMCU 2072

    116/140

    E)ample* Thermal Coeffi$ient

  • 8/13/2019 Chapter 4 BMCU 2072

    117/140

    E)ample* Thermal Coeffi$ient

    A trunnion of diameter 1"3.3:

    has to 'e $ooled from a room

    temperature of 5;

    The equation that (ives the

    diametri$ $ontra$tion + of

    the trunnion in dr,6i$e>al$ohol

    'oilin( temperature is 41;5

    is (iven ',*

    =108

    80

    )(363.12 dTTD

    Figure 1 Trunnion to 'e slid

    throu(h the hu' after$ontra$tin(

    E)ample* Thermal Coeffi$ient

  • 8/13/2019 Chapter 4 BMCU 2072

    118/140

    E)ample* Thermal Coeffi$ient

    The e)pression for the thermal e)pansion $oeffi$ient0

    is o'tained usin( re(ression anal,sis and hen$e solvin( the followin(

    simultaneous linear equations*

    !ind the values of a"& a

    $&and a

    %usin( Gauss6&eidel 9ethod

    =

    56799.2

    1004162.1

    10057.1

    1024357.51086472.11026.7

    1086472.11026.72860

    1026.72860242

    4

    3

    2

    1

    1085

    85

    5

    a

    a

    a

    2321 TaTaa ++=

    E)ample* Thermal Coeffi$ient

  • 8/13/2019 Chapter 4 BMCU 2072

    119/140

    E)ample* Thermal Coeffi$ient

    The s,stem of equations is*

    nitial Guess*

    Assume an initial (uess of

    =

    56799.2

    1004162.1

    10057.1

    1024357.51086472.11026.7

    1086472.11026.72860

    1026.72860242

    4

    3

    2

    1

    1085

    85

    5

    a

    a

    a

    =

    0

    0

    0

    3

    2

    1

    a

    a

    a

    E)ample* Thermal Coeffi$ient

  • 8/13/2019 Chapter 4 BMCU 2072

    120/140

    E)ample* Thermal Coeffi$ient

    8ewritin( ea$h equationteration 1

    =

    56799.2

    1004162.1

    10057.1

    1024357.51086472.11026.7

    1086472.11026.72860

    1026.72860242

    4

    3

    2

    1

    1085

    85

    5

    a

    a

    a

    ( ) 654

    1 104042424

    01026702860100571

    =

    = ...

    a

    ( ) ( ) 95862

    2 100024310267

    0108647211040424286010041621

    =

    = ..

    ...a

    ( ) 1210

    9865

    3 103269110243575

    100024310864721104042410267567992

    =

    = .

    .

    .....a

    E)ample* Thermal Coeffi$ient

  • 8/13/2019 Chapter 4 BMCU 2072

    121/140

    E)ample* Thermal Coeffi$ient

    !indin( the a'solute relative appro)imate error

    %100100103269.1

    0103269.1

    %100100100024.3

    0100024.3

    %100100104042.4

    0104042.4

    100

    12

    12

    3

    9

    9

    2

    6

    6

    1

    =

    =

    =

    =

    = =

    =

    a

    a

    a

    new

    i

    old

    i

    new

    i

    ia x

    xx At the end of the first iteration

    The ma)imum a'solute

    relative appro)imate error is

    1;;P

    =

    12

    9

    6

    3

    2

    1

    1032691

    1000243

    1040424

    .

    .

    .

    a

    a

    a

    E)ample* Thermal Coeffi$ient

  • 8/13/2019 Chapter 4 BMCU 2072

    122/140

    E)ample* Thermal Coeffi$ient

    teration "

    Ksin( from teration 1 the values of aiare found*

    =

    12

    9

    6

    3

    2

    1

    1032691

    1000243

    1040424

    .

    .

    .

    a

    a

    a

    ( ) ( )

    6

    12594

    1

    1080214

    24

    10326911026710002432860100571

    =

    =

    .

    ....a

    ( ) ( ) ( )

    9

    5

    12862

    2

    102291410267

    1032691108647211080214286010041621

    =

    =

    ..

    ....a

    ( )

    12

    10

    9865

    3

    1047382

    10243575

    102291410864721108021410267567992

    =

    =

    .

    .

    .....a

    E)ample* Thermal Coeffi$ient

  • 8/13/2019 Chapter 4 BMCU 2072

    123/140

    E)ample* Thermal Coeffi$ient

    !indin( the a'solute relative appro)imate error

    At the end of the se$ond iteration The ma)imum a'soluterelative appro)imate error is

    /.3.;P

    %360.46100104738.2

    )103269.1(104738.2

    %007.291001022911.4

    100024.310221.4

    %2864.8100108021.4

    104042.4108021.4

    12

    1212

    3

    9

    99

    2

    6

    66

    1

    =

    =

    =

    =

    =

    =

    a

    a

    a

    =

    12

    9

    6

    3

    2

    1

    1047382

    1022914

    1080214

    .

    .

    .

    a

    a

    a

    E)ample* Thermal Coeffi$ient

  • 8/13/2019 Chapter 4 BMCU 2072

    124/140

    Itrat!on a" a$ a%

    1

    "

    3

    /

    -

    .

    //;/"Q1;4.

    /5;"1Q1;4.

    /H53;Q1;4.

    -;.3.Q1;4.

    -;H5;Q1;4.

    -111"Q1;4.

    100

    8.2864

    3.6300

    1.5918

    0.6749

    0.2593

    3;;"/Q1;4H

    /""H1Q1;4H

    /./I1Q1;4H

    /I;"3Q1;4H

    /.;33Q1;4H

    ///1HQ1;4H

    100

    29.0073

    8.9946

    1.1922

    2.1696

    3.6330

    413".HQ1;41"

    4"/I35Q1;41"

    43/H1IQ1;41"

    4//;53Q1;41"

    4-"3HHQ1;41"

    4-HHI"Q1;41"

    100

    46.3605

    29.1527

    20.7922

    15.8702

    12.6290

    E)ample* Thermal Coeffi$ient

    8epeatin( more iterations0 the followin( values are o'tained

    %1a

    %2a

    %3a

    R Noti$e S After si) iterations0 the a'solute relative

    appro)imate errors are de$reasin(0 'ut are still hi(h

    E)ample* Thermal Coeffi$ient

  • 8/13/2019 Chapter 4 BMCU 2072

    125/140

    Itrat!on a" a$ a%

    I-I.

    -;.H"Q1;4.

    -;.H1Q1;4.""--HQ1;4/

    ";.3;Q1;4/";13HQ1;4H

    ";13-Q1;4H;;"/"5;;"""1

    41/;/HQ1;411

    41/;-1Q1;411;;11"-;;1;"H

    E)ample* Thermal Coeffi$ient

    8epeatin( more iterations0 the followin( values are o'tained

    %1a

    %2a

    %3a

    The value of $losel, approa$hes the true value of

    =

    11

    9

    6

    3

    2

    1

    1040511

    1001352

    1006915

    .

    .

    .

    a

    a

    a

    =

    11

    9

    6

    3

    2

    1

    1040661

    1000872

    1006905

    .

    .

    .

    a

    a

    a

    from Gauss elimination2

    E)ample* Thermal Coeffi$ient

  • 8/13/2019 Chapter 4 BMCU 2072

    126/140

    a p e e a Coe $ e t

    The pol,nomial that passes throu(h the three data points is then

    ( ) 2321 TaTaaT ++=

    21196 104051.11000135.21006915.5 TT +=

    Gauss6&eidel 9ethod* @itfall

  • 8/13/2019 Chapter 4 BMCU 2072

    127/140

    Even thou(h done $orre$tl,0 the answer ma, not $onver(in( to the

    $orre$t answer

    This is a pitfall of the Gauss6&iedel method* not all s,stems of

    equations will $onver(e

    s there a fi)F

    ne $lass of s,stem of equations alwa,s $onver(es* ne with a diagonally

    dominant$oeffi$ient matri)

    +ia(onall, dominant* [A] in [A] [X] = [C] is dia(onall, dominant if*

    =

    n

    jj

    ijaa

    !1

    !! =

    >n

    ijj

    ijii aa1

    for all iO and for at least one iO

    G & id l 9 th d @itf ll

  • 8/13/2019 Chapter 4 BMCU 2072

    128/140

    Gauss6&eidel 9ethod* @itfall

    [ ]

    =

    116123

    14345

    3481.52

    +ia(onall, dominant* The $oeffi$ient on the dia(onal must 'e at leastequal to the sum of the other $oeffi$ients in that row and at least one row

    with a dia(onal $oeffi$ient (reater than the sum of the other $oeffi$ients

    in that row

    =

    1293496

    55323

    5634124

    ]#[

    hi$h $oeffi$ient matri) is dia(onall, dominantF

    9ost ph,si$al s,stems do result in simultaneous linear equations that

    have dia(onall, dominant $oeffi$ient matri$es

    Gauss6&eidel 9ethod* E)ample "

  • 8/13/2019 Chapter 4 BMCU 2072

    129/140

    p

    Given the s,stem of equations

    15312 321 x-xx =+

    2835 321 xxx =++

    761373 321 =++ xxx

    =

    1

    0

    1

    3

    2

    1

    x

    x

    x

    ith an initial (uess of

    The $oeffi$ient matri) is*

    [ ]

    =

    1373

    351

    5312

    A

    ill the solution $onver(e usin( the

    Gauss6&iedel methodF

    Gauss6&eidel 9ethod* E)ample "

  • 8/13/2019 Chapter 4 BMCU 2072

    130/140

    p

    [ ]

    =

    1373

    351

    5312

    A

    Che$%in( if the $oeffi$ient matri) is dia(onall, dominant

    43155 232122 =+=+== aaa

    10731313 323133 =+=+== aaa

    8531212 131211 =+=+== aaa

    The inequalities are all true and at least one row is stritly(reater than*

    Therefore* The solution should $onver(e usin( the Gauss6&iedel 9ethod

    Gauss6&eidel 9ethod* E)ample "

  • 8/13/2019 Chapter 4 BMCU 2072

    131/140

    p

    =

    76

    28

    1

    1373

    351

    5312

    %

    $

    a

    a

    a

    8ewritin( ea$h equation

    12

    531 321

    xxx

    +=

    5

    328 312

    xx

    x

    =

    13

    7376 213

    xxx

    =

    ith an initial (uess of

    =

    1

    0

    1

    3

    2

    1

    x

    x

    x

    ( ) ( )50000.0

    12

    150311 =

    +=x

    ( ) ( )9000.4

    5

    135.028

    2

    =

    =x

    ( ) ( )0923.3

    13

    9000.4750000.03763 =

    =x

    Ga ss &eidel 9ethod E ample "

  • 8/13/2019 Chapter 4 BMCU 2072

    132/140

    Gauss6&eidel 9ethod* E)ample "

    The a'solute relative appro)imate error

    %00.10010050000.0

    0000.150000.01

    =

    =a

    %00.1001009000.4

    09000.42a

    ==

    %662.671000923.3

    0000.10923.3

    3a

    =

    =

    The ma)imum a'solute relative error after the first iteration is 1;;P

    Gauss6&eidel 9ethod* E)ample "

  • 8/13/2019 Chapter 4 BMCU 2072

    133/140

    p

    =

    8118.3

    7153.3

    14679.0

    3

    2

    1

    x

    x

    x

    After teration D1

    ( ) ( )14679.0

    12

    0923.359000.4311 =

    +=x

    ( ) ( ) 7153.35

    0923.3314679.0282 ==x

    ( ) ( )8118.3

    13

    900.4714679.03763 =

    =x

    &u'stitutin( the ) values into the

    equationsAfter teration D"

    =

    0923.3

    9000.4

    5000.0

    3

    2

    1

    x

    x

    x

    Gauss6&eidel 9ethod* E)ample "

  • 8/13/2019 Chapter 4 BMCU 2072

    134/140

    p

    teration D" a'solute relative appro)imate error

    %61.24010014679.0

    50000.014679.01a

    =

    =

    %889.311007153.3

    9000.47153.32a ==

    %874.181008118.3

    0923.38118.33a

    =

    =

    The ma)imum a'solute relative error after the first iteration is "/;.1P

    This is mu$h lar(er than the ma)imum a'solute relative error o'tained in

    iteration D1 s this a pro'lemF

    Gauss &eidel 9ethod* E)ample "

  • 8/13/2019 Chapter 4 BMCU 2072

    135/140

    Itrat!on a1 a2 a3

    12

    3456

    0.500000.14679

    0.742750.946750.991770.99919

    100.00240.61

    80.23621.5464.53910.74307

    4.90003.7153

    3.16443.02813.00343.0001

    100.0031.889

    17.4084.49960.824990.10856

    3.09233.8118

    3.97083.99714.00014.0001

    67.66218.876

    4.00420.657720.0743830.00101

    Gauss6&eidel 9ethod* E)ample "

    8epeatin( more iterations0 the followin( values are o'tained

    %1a

    %2a

    %3a

    =

    4

    31

    3

    2

    1

    x

    xx

    =

    0001.4

    0001.399919.0

    3

    2

    1

    x

    xx

    The solution o'tained is $lose to the e)a$t solution of

    Gauss &eidel 9ethod* E)ample 3

  • 8/13/2019 Chapter 4 BMCU 2072

    136/140

    Gauss6&eidel 9ethod* E)ample 3

    Given the s,stem of equations

    761373 321 =++ xxx

    2835 321 =++ xxx

    15312 321 =+ xxx

    ith an initial (uess of

    =

    1

    0

    1

    3

    2

    1

    x

    x

    x

    8ewritin( the equations

    3

    13776 321

    xx

    x

    =

    5

    328 312

    xxx

    =

    5

    3121 213

    =

    xxx

    Gauss6&eidel 9ethod* E)ample 3

  • 8/13/2019 Chapter 4 BMCU 2072

    137/140

    Itrat!on a1 A2 a3

    12

    3456

    21.000$196.15

    $1995.0$20149

    2.0364105

    $2.0579105

    95.238110.71

    109.83109.90109.89109.89

    0.8000014.421

    $116.021204.6$12140

    1.2272105

    100.0094.453

    112.43109.63109.92109.89

    50.680$462.30

    4718.1$47636

    4.8144105

    $4.8653106

    98.027110.96

    109.80109.90109.89109.89

    Condu$tin( si) iterations0 the followin( values are o'tained

    %1a

    %2a

    %3a

    The values are not $onver(in(

    +oes this mean that the Gauss6&eidel method $annot 'e usedF

    Gauss6&eidel 9ethod

  • 8/13/2019 Chapter 4 BMCU 2072

    138/140

    The Gauss6&eidel 9ethod $an still 'e used

    The $oeffi$ient matri) is not

    dia(onall, dominant [ ]

    =

    5312

    351

    1373

    A

    #ut this is the same set of

    equations used in e)ample D"0

    whi$h did $onver(e [ ]

    =

    1373

    351

    5312

    A

    f a s,stem of linear equations is not dia(onall, dominant0 $he$% to see if

    rearran(in( the equations $an form a dia(onall, dominant matri)

    Gauss6&eidel 9ethod

  • 8/13/2019 Chapter 4 BMCU 2072

    139/140

    Not ever, s,stem of equations $an 'e rearran(ed to have a

    dia(onall, dominant $oeffi$ient matri)

    'serve the set of equations

    3321 =++ xxx9432 321 =++ xxx

    97 321 =++ xxx

    hi$h equations2 prevents this set of equation from havin( a

    dia(onall, dominant $oeffi$ient matri)F

    Gauss6&eidel 9ethod

  • 8/13/2019 Chapter 4 BMCU 2072

    140/140

    &ummar,

    6Advanta(es of the Gauss6&eidel 9ethod

    6Al(orithm for the Gauss6&eidel 9ethod

    6@itfalls of the Gauss6&eidel 9ethod