numeric methode

download numeric methode

of 26

Transcript of numeric methode

  • 8/21/2019 numeric methode

    1/60

    Systems of Linear Equations:

    An Introduction

    11 22 33 44 55 66

    66

    55

    44

    33

    22

    11

     –  – 11

     y y

     x x

    (2, 3)(2, 3)

    2 1 x y 2 1 x y

    3 2 12 x y 3 2 12 x y

  • 8/21/2019 numeric methode

    2/60

    Systems of Equations

    Recall that a

    system of two linear equations in twovariables

    may be written in the general form

    where

    a

    ,

    b

    ,

    c

    ,

    ,

    h

    , and

    are

    real numbers

    and neithera

    and

    b

    nor

    c

    and

    are both zero.

    Recall that the graph of each equation in the system is a

    straight line

    in the plane, so that geometrically, the

    solution

    to the system is the

    point(s) of intersection

    of thetwo straight lines

     L

    1

    and

     L

    2

    , represented by the first and

    second equations of the system.

    ax by h

    cx dy k  

  • 8/21/2019 numeric methode

    3/60

    Systems of Equations

    Given the two straight lines

     L

    1

    and

     L

    2

    ,

    one and only one

    ofthe following may occur:

    1.

     L

    1

    and

     L

    2

    intersect at

    exactly one point

    .

     y

     x

     L

    1

     L

    2

    Unique

    solution(

     x

    1

    ,

     y

    1

    )(

     x

    1

    ,

     y

    1

    )

     x

    1

     y

    1

  • 8/21/2019 numeric methode

    4/60

    Systems of Equations

    Given the two straight lines

     L

    1

    and

     L

    2

    ,

    one and only one

    ofthe following may occur:

    2.

     L

    1

    and

     L

    2

    are

    coincident

    .

     y

     x

     L

    1

    ,

     L

    2

    Infinitely

    many

    solutions

  • 8/21/2019 numeric methode

    5/60

    Systems of Equations

    Given the two straight lines

     L

    1

    and

     L

    2

    ,

    one and only one

    ofthe following may occur:

    3.

     L

    1

    and

     L

    2

    are

    parallel

    .

     y

     x

     L

    1

     L

    2

    No

    solution

  • 8/21/2019 numeric methode

    6/60

    Example:

    A System of Equations With Exactly One Solution

    Consider the system

    Solving

    the

    first equation

    for

     y

    in terms of

     x

    , we obtain

    Substituting

    this expression for

     y

    into the

    second equation

    yields

    2 1

    3 2 12

     x y

     x y

    2 1 y x

    3 2(2 1) 12

    3 4 2 12

    7 14

    2

     x x

     x x

     x

     x

  • 8/21/2019 numeric methode

    7/60

    Example:

    A System of Equations With Exactly One Solution

    Finally, substituting this value of x into the expression for y

    obtained earlier gives

    Therefore, the unique solution of the system is given by

     x = 2 and y = 3.

    2 1

    2(2) 1

    3

     y x

  • 8/21/2019 numeric methode

    8/60

    1 2 3 4 5 6

    6

    5

    4

    3

    2

    1

     – 1

    Example:

    A System of Equations With Exactly One Solution

    Geometrically, the two lines represented by the two

    equations that make up the system intersect at the

    point (2, 3):

     y

     x

    (2, 3)

    2 1 x y

    3 2 12 x y

  • 8/21/2019 numeric methode

    9/60

    Example:

    A System of Equations With Infinitely Many Solutions

    Consider the system

    Solving the first equation for y in terms of x, we obtain

    Substituting this expression for y into the second equationyields

    which is a true statement.

    This result follows from the fact that the second equation

    is equivalent to the first.

    2 1

    6 3 3

     x y

     x y

    2 1 y x

    6 3(2 1) 3

    6 6 3 3

    0 0

     x x

     x x

  • 8/21/2019 numeric methode

    10/60

    Example:

    A System of Equations With Infinitely Many Solutions

    Thus, any order pair of numbers ( x, y) satisfying theequation  y = 2 x – 1 constitutes a solution to the system.

    By assigning the value t to x, where t is any real number,

    we find that  y = 2t – 1 and so the ordered pair (t , 2t – 1)

    is a solution to the system. The variable t is called a parameter.

     For example: 

    ✦ Setting t = 0, gives the point (0, – 1) as a solution of the

    system.

    ✦ Setting t = 1, gives the point (1, 1) as another solution of

    the system.

  • 8/21/2019 numeric methode

    11/60

    6

    5

    4

    3

    2

    1

     – 11 2 3 4 5 6

    Example:

    A System of Equations With Infinitely Many Solutions

    Since t represents any real number, there are infinitely

    many solutions of the system.

    Geometrically, the two equations in the system representthe same line, and all solutions of the system are pointslying on the line:

     y

     x

    2 1

    6 3 3

     x y

     x y

  • 8/21/2019 numeric methode

    12/60

    Example:

    A System of Equations That Has No Solution

    Consider the system

    Solving the first equation for y in terms of x, we obtain

    Substituting this expression for y into the second equationyields

    which is clearly impossible.

    Thus, there is no solution to the system of equations.

    2 1

    6 3 12

     x y

     x y

     

    2 1 y x

    6 3(2 1) 12

    6 6 3 12

    0 9

     x x

     x x

  • 8/21/2019 numeric methode

    13/60

    1 2 3 4 5 6

    Example:

    A System of Equations That Has No Solution

    To interpret the situation geometrically, cast both

    equations in the slope-intercept form, obtaining

     y = 2 x – 1 and  y = 2 x – 4

    which shows that the lines are parallel.

    Graphically:

    6

    5

    4

    3

    2

    1

     – 1

     y

     x

    2 1 x y

    6 3 12 x y

  • 8/21/2019 numeric methode

    14/60

    Systems of Linear Equations:

    Unique Solutions

    3 2 8 9

    2 2 1 3

    1 2 3 8

     

    3 2 8 9

    2 2 1 3

    1 2 3 8

     

    3 2 8 9

    2 2 3

    2 3 8

     

     x y z 

     x y z 

     x y z 

    3 2 8 9

    2 2 3

    2 3 8

     

     x y z 

     x y z 

     x y z 

    1 0 0 3

    0 1 0 4

    0 0 1 1

     

    1 0 0 3

    0 1 0 4

    0 0 1 1

     

  • 8/21/2019 numeric methode

    15/60

    The Gauss-Jordan Method

    The Gauss-Jordan elimination method is a technique forsolving systems of linear equations of any size.

    The operations of the Gauss-Jordan method are

    1. Interchange any two equations.

    2. Replace an equation by a nonzero constant multiple of

    itself.

    3. Replace an equation by the sum of that equation and aconstant multiple of any other equation.

  • 8/21/2019 numeric methode

    16/60

    Example 

    Solve the following system of equations:

    Solution First, we transform this system into an equivalent system

    in which the coefficient of x in the first equation is 1:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    Multiply the

    equation by 1/2

  • 8/21/2019 numeric methode

    17/60

    Example 

    Solve the following system of equations:

    Solution

    First, we transform this system into an equivalent systemin which the coefficient of x in the first equation is 1:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    2 3 11

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    Multiply the first

    equation by 1/2

  • 8/21/2019 numeric methode

    18/60

    Example 

    Solve the following system of equations:

    Solution

    Next, we eliminate the variable x from all equations exceptthe first:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    2 3 11

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    Replace by the sum of

     – 3 X the first equation

    + the second equation

  • 8/21/2019 numeric methode

    19/60

    Example 

    Solve the following system of equations:

    Solution

    Next, we eliminate the variable x from all equations exceptthe first:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    2 3 11

    2 4 6

    2 2 

     x y z 

     y z 

     x y z 

    Replace by the sum of

     – 3 ☓ the first equation

    + the second equation

  • 8/21/2019 numeric methode

    20/60

    Example 

    Solve the following system of equations:

    Solution

    Next, we eliminate the variable x from all equations exceptthe first:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    2 3 11

    2 4 6

    2 2 

     x y z 

     y z 

     x y z 

    Replace by the sumof the first equation

    + the third equation

  • 8/21/2019 numeric methode

    21/60

    Example 

    Solve the following system of equations:

    Solution

    Next, we eliminate the variable x from all equations exceptthe first:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    2 3 11

    2 4 6

    3 5 13

     x y z 

     y z 

     y z 

    Replace by the sum

    of the first equation

    + the third equation

  • 8/21/2019 numeric methode

    22/60

    Example 

    Solve the following system of equations:

    Solution

    Then we transform so that the coefficient of  y in thesecond equation is 1:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    2 3 11

    2 4 6

    3 5 13

     x y z 

     y z 

     y z 

    Multiply the second

    equation by 1/2

  • 8/21/2019 numeric methode

    23/60

    Example 

    Solve the following system of equations:

    Solution

    Then we transform so that the coefficient of  y in thesecond equation is 1:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    2 3 11

    2 3

    3 5 13

     x y z 

     y z 

     y z 

    Multiply the second

    equation by 1/2

  • 8/21/2019 numeric methode

    24/60

    Example 

    Solve the following system of equations:

    Solution

    We now eliminate y from all equations except the second:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    2 3 11

    2 3

    3 5 13

     x y z 

     y z 

     y z 

    Replace by the sum of

    the first equation +

    ( – 2) ☓ the second equation

  • 8/21/2019 numeric methode

    25/60

    Example 

    Solve the following system of equations:

    Solution

    We now eliminate y from all equations except the second:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    7 17

    2 3

    3 5 13

      x z 

     y z 

     y z 

    Replace by the sum of

    the first equation +

    ( – 2) ☓ the second equation

  • 8/21/2019 numeric methode

    26/60

    Example 

    Solve the following system of equations:

    Solution

    We now eliminate y from all equations except the second:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    7 17

    2 3

    3 5 13

      x z 

     y z 

     y z 

    Replace by the sum of

    the third equation +

    ( – 3) ☓ the second equation

  • 8/21/2019 numeric methode

    27/60

    Example 

    Solve the following system of equations:

    Solution

    We now eliminate y from all equations except the second:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    7 17

    2 3

    11 22

      x z 

     y z 

     z 

    Replace by the sum of

    the third equation +

    ( – 3) ☓ the second equation

  • 8/21/2019 numeric methode

    28/60

    Example 

    Solve the following system of equations:

    Solution

    Now we transform so that the coefficient of  z in the thirdequation is 1:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    7 17

    2 3

    11 22

      x z 

     y z 

     z 

    Multiply the third

    equation by 1/11

  • 8/21/2019 numeric methode

    29/60

    Example 

    Solve the following system of equations:

    Solution

    Now we transform so that the coefficient of  z in the thirdequation is 1:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    7 17

    2 3

    2

      x z 

     y z 

     z 

    Multiply the third

    equation by 1/11

  • 8/21/2019 numeric methode

    30/60

    Example 

    Solve the following system of equations:

    Solution

    We now eliminate z from all equations except the third:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    Replace by the sum of

    the first equation +

    ( – 7) ☓ the third equation

    7 17

    2 3

    2

      x z 

     y z 

     z 

  • 8/21/2019 numeric methode

    31/60

    Example 

    Solve the following system of equations:

    Solution

    We now eliminate z from all equations except the third:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    3

    2 3

    2

      x

     y z 

     z 

    Replace by the sum of

    the first equation +( – 7) ☓ the third equation

  • 8/21/2019 numeric methode

    32/60

    Example 

    Solve the following system of equations:

    Solution

    We now eliminate z from all equations except the third:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    3

    2 3

    2

      x

     y z 

     z 

    Replace by the sum of

    the second equation +

    2 ☓ the third equation

  • 8/21/2019 numeric methode

    33/60

    Example 

    Solve the following system of equations:

    Solution

    We now eliminate z from all equations except the third:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    3

    1

    2

      x

     y

     z 

    Replace by the sum of

    the second equation +

    2 ☓ the third equation

  • 8/21/2019 numeric methode

    34/60

    Example 

    Solve the following system of equations:

    Solution

    Thus, the solution to the system is x = 3, y = 1, and z = 2.

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    3

    1

    2

      x

     y

     z 

  • 8/21/2019 numeric methode

    35/60

    Augmented Matrices

    Matrices are rectangular arrays of numbers that can aid

    us by eliminating the need to write the variables at eachstep of the reduction.

    For example, the system

    may be represented by the augmented matrixCoefficient

    Matrix

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    2 4 6 22

    3 8 5 27

    1 1 2 2

     

  • 8/21/2019 numeric methode

    36/60

    Matrices and Gauss-Jordan

    Every step in the Gauss-Jordan elimination method can be

    expressed with matrices, rather than systems of equations,

    thus simplifying the whole process:

    Steps expressed as systems of equations:

    Steps expressed as augmented matrices:

    2 4 6 22

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

    2 4 6 22

    3 8 5 27

    1 1 2 2

     

  • 8/21/2019 numeric methode

    37/60

    Matrices and Gauss-Jordan

    Every step in the Gauss-Jordan elimination method can be

    expressed with matrices, rather than systems of equations,

    thus simplifying the whole process:

    Steps expressed as systems of equations:

    Steps expressed as augmented matrices:

    1 2 3 11

    3 8 5 27

    1 1 2 2

     

    2 3 11

    3 8 5 27

    2 2 

     x y z 

     x y z 

     x y z 

  • 8/21/2019 numeric methode

    38/60

    Matrices and Gauss-Jordan

    Every step in the Gauss-Jordan elimination method can be

    expressed with matrices, rather than systems of equations,

    thus simplifying the whole process:

    Steps expressed as systems of equations:

    Steps expressed as augmented matrices:

    1 2 3 11

    0 2 4 6

    1 1 2 2

     

    2 3 11

    2 4 6

    2 2 

     x y z 

     y z 

     x y z 

  • 8/21/2019 numeric methode

    39/60

    Matrices and Gauss-Jordan

    Every step in the Gauss-Jordan elimination method can be

    expressed with matrices, rather than systems of equations,

    thus simplifying the whole process:

    Steps expressed as systems of equations:

    Steps expressed as augmented matrices:

    1 2 3 11

    0 2 4 6

    0 3 5 13

     

    2 3 11

    2 4 6

    3 5 13

     x y z 

     y z 

     y z 

  • 8/21/2019 numeric methode

    40/60

    Matrices and Gauss-Jordan

    Every step in the Gauss-Jordan elimination method can be

    expressed with matrices, rather than systems of equations,

    thus simplifying the whole process:

    Steps expressed as systems of equations:

    Steps expressed as augmented matrices:

    1 2 3 11

    0 1 2 3

    0 3 5 13

     

    2 3 11

    2 3

    3 5 13

     x y z 

     y z 

     y z 

  • 8/21/2019 numeric methode

    41/60

    Matrices and Gauss-Jordan

    Every step in the Gauss-Jordan elimination method can be

    expressed with matrices, rather than systems of equations,

    thus simplifying the whole process:

    Steps expressed as systems of equations:

    Steps expressed as augmented matrices:

    1 0 7 17

    0 1 2 3

    0 3 5 13

     

    7 17

    2 3

    3 5 13

      x z 

     y z 

     y z 

  • 8/21/2019 numeric methode

    42/60

    Matrices and Gauss-Jordan

    Every step in the Gauss-Jordan elimination method can be

    expressed with matrices, rather than systems of equations,

    thus simplifying the whole process:

    Steps expressed as systems of equations:

    Steps expressed as augmented matrices:

    1 0 7 17

    0 1 2 3

    0 0 11 22

     

    7 17

    2 3

    11 22

      x z 

     y z 

     z 

  • 8/21/2019 numeric methode

    43/60

    Matrices and Gauss-Jordan

    Every step in the Gauss-Jordan elimination method can be

    expressed with matrices, rather than systems of equations,

    thus simplifying the whole process:

    Steps expressed as systems of equations:

    Steps expressed as augmented matrices:

    1 0 7 17

    0 1 2 3

    0 0 1 2

     

    7 17

    2 3

    2

      x z 

     y z 

     z 

    i G

  • 8/21/2019 numeric methode

    44/60

    Matrices and Gauss-Jordan

    Every step in the Gauss-Jordan elimination method can be

    expressed with matrices, rather than systems of equations,

    thus simplifying the whole process:

    Steps expressed as systems of equations:

    Steps expressed as augmented matrices:

    1 0 0 3

    0 1 2 3

    0 0 1 2

     

    3

    2 3

    2

      x

     y z 

     z 

    M i d G

    J d

  • 8/21/2019 numeric methode

    45/60

    Matrices and Gauss-Jordan

    Every step in the Gauss-Jordan elimination method can be

    expressed with matrices, rather than systems of equations,

    thus simplifying the whole process:

    Steps expressed as systems of equations:

    Steps expressed as augmented matrices:

    1 0 0 3

    0 1 0 1

    0 0 1 2

     

    3

    1

    2

      x

     y

     z 

    Row Reduced Form

    of the Matrix

  • 8/21/2019 numeric methode

    46/60

    Row-Reduced Form of a Matrix

    Each row consisting entirely of zeros lies below all

    rows having nonzero entries.

    The first nonzero entry in each nonzero row is 1

    (called a leading 1).

    In any two successive (nonzero) rows, the leading 1

    in the lower row lies to the right of the leading 1 in

    the upper row.

    If a column contains a leading 1, then the otherentries in that column are zeros.

  • 8/21/2019 numeric methode

    47/60

    Row Operations

    1. Interchange any two rows.

    2. Replace any row by a nonzero constant

    multiple of itself.

    3. Replace any row by the sum of that rowand a constant multiple of any other row.

  • 8/21/2019 numeric methode

    48/60

    Terminology for the

    Gauss-Jordan Elimination Method

    Unit Column

    A column in a coefficient matrix is in unit form

    if one of the entries in the column is a 1 and the

    other entries are zeros.

    Pivoting

    The sequence of row operations that transforms

    a given column in an augmented matrix into a

    unit column.

  • 8/21/2019 numeric methode

    49/60

    Notation for Row Operations

    Letting Ri denote the ith row of a matrix, we write

    Operation 1:  Ri ↔ R j to mean:

    Interchange row i with row j.

    Operation 2: cRi to mean:

    replace row i with c times row i.

    Operation 3:  Ri + aR j to mean:

    Replace row i with the sum of row i

    and a times row j.

  • 8/21/2019 numeric methode

    50/60

    Example 

    Pivot the matrix about the circled element

    Solution

    3 5 9

    2 3 5 

    3 5 9

    2 3 5 

    1

    13 R   5

    3  31

    52 3 

    2 12 R R

      5

    3

    1

    3

    1   3

    0   1 

     

  • 8/21/2019 numeric methode

    51/60

    The Gauss-Jordan Elimination Method

    1. Write the augmented matrix corresponding tothe linear system.

    2. Interchange rows, if necessary, to obtain an

    augmented matrix in which the first entry in

    the first row is nonzero. Then pivot the matrixabout this entry.

    3. Interchange the second row with any row below

    it, if necessary, to obtain an augmented matrix

    in which the second entry in the second row is

    nonzero. Pivot the matrix about this entry.

    4. Continue until the final matrix is in row-

    reduced form.

  • 8/21/2019 numeric methode

    52/60

    Example 

    Use the Gauss-Jordan elimination method to solve the

    system of equations

    Solution

    3 2 8 9

    2 2 3

    2 3 8

     

     x y z 

     x y z 

     x y z 

    3 2 8 9

    2 2 1 3

    1 2 3 8

     

    1 2 R R

  • 8/21/2019 numeric methode

    53/60

    Example 

    Use the Gauss-Jordan elimination method to solve the

    system of equations

    Solution

    3 2 8 9

    2 2 3

    2 3 8

     

     x y z 

     x y z 

     x y z 

    1 0 9 12

    2 2 1 3

    1 2 3 8

     

    2 12 R R

    3 1 R R

    1 2 R R

  • 8/21/2019 numeric methode

    54/60

    Example 

    Use the Gauss-Jordan elimination method to solve the

    system of equations

    Solution

    3 2 8 9

    2 2 3

    2 3 8

     

     x y z 

     x y z 

     x y z 

    1 0 9 12

    0 2 19 27

    0 2 12 4

     

    2 12 R R

    3 1 R R

    2 3 R R

  • 8/21/2019 numeric methode

    55/60

    Example 

    Use the Gauss-Jordan elimination method to solve the

    system of equations

    Solution

    3 2 8 9

    2 2 3

    2 3 8

     

     x y z 

     x y z 

     x y z 

    2 3 R R

    1

    22 R

    1 0 9 12

    0 2 12 4

    0 2 19 27

     

  • 8/21/2019 numeric methode

    56/60

    Example 

    Use the Gauss-Jordan elimination method to solve the

    system of equations

    Solution

    3 2 8 9

    2 2 3

    2 3 8

     

     x y z 

     x y z 

     x y z 

    1

    22 R

    1 0 9 12

    0 1 6 2

    0 2 19 27

     

      3 2 R R

  • 8/21/2019 numeric methode

    57/60

    Example 

    Use the Gauss-Jordan elimination method to solve the

    system of equations

    Solution

    3 2 8 9

    2 2 3

    2 3 8

     

     x y z 

     x y z 

     x y z 

    1 0 9 12

    0 1 6 2

    0 0 31 31

     

    3 2 R R

    1

    331 R

  • 8/21/2019 numeric methode

    58/60

    Example 

    Use the Gauss-Jordan elimination method to solve the

    system of equations

    Solution

    3 2 8 9

    2 2 3

    2 3 8

     

     x y z 

     x y z 

     x y z 

    1 0 9 12

    0 1 6 2

    0 0 1 1

      1

    331

     R

    1 39 R R

    2 36 R R

  • 8/21/2019 numeric methode

    59/60

    Example 

    Use the Gauss-Jordan elimination method to solve the

    system of equations

    Solution

    3 2 8 9

    2 2 3

    2 3 8

     

     x y z 

     x y z 

     x y z 

    1 0 0 3

    0 1 0 4

    0 0 1 1

     

      2 36 R R

    1 39 R R

    E l

  • 8/21/2019 numeric methode

    60/60

    Example 

    Use the Gauss-Jordan elimination method to solve the

    system of equations

    Solution

    The solution to the system is thus x = 3, y = 4, and z = 1.

    3 2 8 9

    2 2 3

    2 3 8

     

     x y z 

     x y z 

     x y z 

    1 0 0 3

    0 1 0 4

    0 0 1 1