Solving System Of Linear Equations 线性方程组 4x  5y  7  2x  4y  5 二元一次方程组  a11x1  a12 x 2  ...

Download Report

Transcript Solving System Of Linear Equations 线性方程组 4x  5y  7  2x  4y  5 二元一次方程组  a11x1  a12 x 2  ...

Solving System Of Linear Equations

线性方程组

4  2 x x   5 4 y y   二元一次方程组 7 5   a a 11 x 1 21 x 1   a a 12 x 22 x 2 2  ...

 a 1 n x n  ...

 a 2 n x n   b 1 b 2   a n 1 x 1  a n 2 x 2  ...

 a nn x n  b n

Solve the following system of linear equations:

1.

4  2 x x  5 y  4 y  7  5

2(2)

 4 4 x x   8 5 y y   7 10

(2’) -(1)

4 x  5 3 y y   7 3  4 x  5 y y   1 7

Elimination

加减消元法 x  1 / 2 y  1 Substitution 代入消元法

2.

   2 3 x x x    7 2 5 y y y    3 8 z z 13 z    9 21 32

Gaussian Elimination

消元法   2 3 x x x    7 2 5 y y y    3 8 z z 13 z    9 21 32    x  2 y  3 z y y   2 4 z z   3 5  9    x  2 y  3 z y  2 2 z z   2 3  9    x  2 y  y 2 z  3 z z   1  3 9 z = 1, y = 1, x = 4

Alternative

Alternative –

  2 3 x x x    7 2 y y 5 y    3 8 z z 13 z    9 21 32 Elementary row transformations •Interchanging 2 rows: R i  R j •Multiply a row by a constant: R i  kR i •Add to a row a multiple of another row :R i  kR j +R i      1 2 3 2 5 7 3 8 13 R 2  R 3  – 2R 1 + R 2 – 3R 1 + R 2 1   0 0 9 21 32      2 1 1 3 2 4

Algorithm

Coefficient Matrix Augmented Matrix 9 3 5   R 3  –R 2 +R 3 1   0 0

Practice

系数矩阵 增广矩阵 2 3 9 R 3  0.5R

3  1 2 3 9 1 0 2 2    x  2 y y  3 2   2  2 z z 3 z   2  3 9   0 0 1 0 2 1 3 1   z = 1, y = 1, x = 4

ALGORITHM

     1 2 3 2 5 7 3 8 13 9 21 32      1   0 0 2 1 1 3 2 4 9 3 5     1 0 0 2 1 0 3 2 2 9 3 2   1   0 0 2 1 0 3 2 1 9 3 1   R 1  R 2  – 3R 3 + R 1 – 2R 3 +R 2  1   0 0 2 1 0 0 0 1 6 1 1   R 1  – 2R 2 + R 1 1   0 0 0 1 0 0 0 1 4 1 1   x = 4, y = 1, z = 1 The matrix can be simplified further

Computer Simulation

1.

PRACTICE

   7 5 x x x    3 6 y y y    3 z 17 22 z  z  1  1 14 2.

3.

   7 4 x 11 x x    2 3 y y y    5 3 z 8 z z    3 6 11    6 8 4 x x x    5 3 y y y    z 3 z 2 z    10 0 13

In general, how many solution(s) can a system of linear equations have?

BACK

Solution

1.

SOLUTION

1   5 7  1  6  3 3 17 22 1 1 1 14      0 0  1  1 4 3 2 1 1 1  7 4      0 0  1  1 0 3 2 9 1   4 9     x  y  3 z  1  y  2 z   4 z   1 z   1 , y  2 , x  6 2.

7   4 11 2 1 3  5  3  8 6  1 3 11      4  1 0 1 0 1  3 1 0 3 2       1 4 0 0 1 0 1  3 0 0 3 2  

BACK

0z=2 no solution 3.

8 3  1 10 20 0   4 6 4 x  1 5 2 x  y   3 2  z 3  0 13   1    4 26 z  0  1 0 z=  ,  10  3  13 10 2 0 13      4 2 0  1 0  1  3  1 1 2 0 1      4 0 0  1 0  1  3 0 x = (1+  )/2, y = 4x – 3 z = 2 –  where  IR 1 0 0  

Computer program

1. Solving linear equations in 3 variables http://www.mkaz.com/math/js_lalg3.html

2. Step by Step Illustration All steps shown http://www1.minn.net/~dchristo/GElim/GElim.html

With final score http://wims.unice.fr/wims/wims.cgi?lang=cn&cmd=new&module=U1%2Falgebra%2Fvisgauss.cn&type=system&size=3&field=Q

Further points of discussion

1. How can the

ALGORITHM

described above be applied to 4 linear equations in 4 variables? n linear equations in n variables?

2. What are the limitations of the above computer programs?

Websites

http://cos.cumt.edu.cn/math/shuxuekejian/xianxingdaishu/charp1/124.htm

http://ws1.hkcampus.net/~ws1-kcy/al_pmath.html

A Mathematical Problem

Amy, Ben and Calvin play a game as follows. The player who loses each round must give each of the other players as much money as the player has at that time. In round 1, Amy loses and gives Ben and Calvin as much money as they each have. In round 2, Ben loses, and gives Amy and Calvin as much money as they each then have. Calvin loses in round 3 and gives Amy and Ben as much money as they each have. They decide to quit at this point and discover that they each have $24. How much money did they each start with?

Approach: (1) top down strategy (2) bottom up strategy

Method 1 – Top down strategy

Let Amy, Ben and Calvin each had $x, $y and $z initially.

Amy Ben Calvin At start After round 1 After round 2 After round 3 $x x – y – z 2(x – y – z) 4(x – y – z) $y 2y 3y – x – z 2(3y – x – z) $z 2z 4z 7z – x – y x – y – z = 6, 3y – x – z = 12 and 7z – x – y = 24; from which x, y and z can be solved.

x=39, y=21, z=12

NEXT

Method 2 – Bottom up strategy

Instead of considering how much money Amy, Ben and Calvin had originally, work backwards from the moment when each of them has $24 each. Complete the following table and see how easily you can reach exactly the same conclusion as in method 1. Amy $x Ben $y Calvin $z At start After round 1 After round 2 After round 3

BACK