13
B3001/UNIT9/1 Prepared by : Siti Sharmila Osmin Page 1 Unit 9 NUMERICAL METHOD Understand and solve linear simultaneous equations using numerical methods At the end of this unit, students will be able to: 1. Solve linear simultaneous equations using Gaussian Elimination Specific Objectives General Objectives

BA201 Engineering Mathematic UNIT9 - Numerical Method

Embed Size (px)

DESCRIPTION

BA201 Engineering Mathematic

Citation preview

Page 1: BA201 Engineering Mathematic UNIT9 - Numerical Method

B3001/UNIT9/1

Prepared by : Siti Sharmila Osmin Page 1

Unit

9

NUMERICAL METHOD

Understand and solve linear simultaneous

equations using numerical methods

At the end of this unit, students will be able to:

1. Solve linear simultaneous equations

using Gaussian Elimination

Specific Objectives

General Objectives

Page 2: BA201 Engineering Mathematic UNIT9 - Numerical Method

B3001/UNIT9/2

Prepared by : Siti Sharmila Osmin Page 2

9.0 INTRODUCTION

The objective of this unit is to introduce two more methods in order to solve simultaneous

equations by using Gaussian Elimination and LU Decomposition method.

9.1 GAUSSIAN ELIMINATION METHOD

Gaussian elimination is an algorithm that can be used to solve a system of linear equations.

Elementary row operations are used throughout the algorithm. In this unit we only discuss three-

equation linear systems.

The following is a set of 3 equations ;

a11x1 + a12x2 + a13x3 = b1

a21x1 + a22x2 + a23x3 = b2

a31x1 + a32x2 + a33x3 = b3

Then change the equation into matrix form

333231

232221

131211

aaa

aaa

aaa

3

2

1

x

x

x

=

3

2

1

b

b

b

INPUT

Page 3: BA201 Engineering Mathematic UNIT9 - Numerical Method

B3001/UNIT9/3

Prepared by : Siti Sharmila Osmin Page 3

Next, the Gaussian Elimination algorithm is applied to the augmented matrix of the system above

which, at the end of the first part of the algorithm looks like this:

''

33

'

23

'

21

131211

a00

aa0

aaa

3

2

1

x

x

x

''

3

'

2

1

b

b

b

The zero elements in this matrix are eliminated using Gaussian Elimination method. The process to

eliminate those elements is known as Transformation. There are two steps in Transformation. Only the

second and the third row of the matrix are involved in the first transformation. But, in the second

transformation process only the third row of the matrix is involved.

Transformation I:

0a

aaaa

11

211121

'

21

11

211222

'

22a

aaaa

11

211323

'

23a

aaaa

11

2112

'

2a

abbb

11

31

1131

'

31a

aaaa = 0

11

31

1232

'

32a

aaaa

11

31

1333

'

33a

aaaa

and

11

31

13

'

3a

abbb

Page 4: BA201 Engineering Mathematic UNIT9 - Numerical Method

B3001/UNIT9/4

Prepared by : Siti Sharmila Osmin Page 4

So, the results of the first are:

'

33

'

32

'

23

'

22

131211

0

0

aa

aa

aaa

3

2

1

x

x

x

'

3

'

2

1

b

b

b

Transformation II:

0a

aaaa

'

22

'

32'

22

'

32

''

32

'

22

'

32'

23

'

33

''

33a

aaaa

and

'

22

'

32'

2

'

3

''

3a

abbb

So, after the second transformation process the results are:

''

33

'

23

'

22

131211

a00

aa0

aaa

3

2

1

x

x

x

''

3

'

2

1

b

b

b

Then we will be able to get''33

''3

3a

bx . The value of 2x and 1x can be retrieved by substituting the

value of 3x and 2x in the linear equation that we get from the matrix equations.

''

33

''

3

3a

bx

'

22

3

'

23

'

2

2a

xabx

11

3132121

1a

xaxabx

Page 5: BA201 Engineering Mathematic UNIT9 - Numerical Method

B3001/UNIT9/5

Prepared by : Siti Sharmila Osmin Page 5

Example 9.1:

Solve this linear equation by using Gauss Elimination Method:

x + y + z = 8

3x + 2y + z = 49

5x – 3y + z = 0

Solution:

Step 1: Transform the linear equation form to matrix form

0

49

8

z

y

x

135

123

111

Step 2: Transformation I,

01

313

a

aaaa

11

211121

'

21

11

312

a

aaaa

11

211222

'

22

21

311

a

aaaa

11

211323

'

23

251

3849

a

abbb

11

2112

'

2

01

515

a

aaaa

11

31

1131

'

31

81

513

a

aaaa

11

31

1232

'

32

41

511

a

aaaa

11

31

1333

'

33

401

580

a

abbb

11

31

13

'

3

Page 6: BA201 Engineering Mathematic UNIT9 - Numerical Method

B3001/UNIT9/6

Prepared by : Siti Sharmila Osmin Page 6

Result for first Transformation I,

40

25

8

z

y

x

480

210

111

Step 3: Transformation II:

01

818

a

aaaa

'

22

'

32'

22

'

32

''

32

121

824

a

aaaa

'

22

'

32'

23

'

33

''

33

2401

82540

a

abbb

'

22

'

32'

2

'

3

''

3

Result for Transformation II,

240

25

8

z

y

x

1200

210

111

So, 240z12

2012

240z

25z2y

25202y

15y

8zyx

zy8x

20158x

13x

So, x = 13, y = 15 and z = -20

Page 7: BA201 Engineering Mathematic UNIT9 - Numerical Method

B3001/UNIT9/7

Prepared by : Siti Sharmila Osmin Page 7

Example 9.2:

Solve this linear equation using Gauss Elimination Method:

x + 3y + 3z = 4

2x –3y –2z= 2

3x + y + 2z = 5

Solution:

Step 1: Transform the linear equation to matrix form

z

y

x

=

5

2

4

Step 2: Transformation I,

01

212

a

aaaa

11

211121

'

21

91

233

a

aaaa

11

211222

'

22

81

232

a

aaaa

11

211323

'

23

61

242

a

abbb

11

2112

'

2

01

313

a

aaaa

11

31

1131

'

31

81

331

a

aaaa

11

31

1232

'

32

71

332

a

aaaa

11

31

1333

'

33

71

345

a

abbb

11

31

13

'

3

213

232

331

Page 8: BA201 Engineering Mathematic UNIT9 - Numerical Method

B3001/UNIT9/8

Prepared by : Siti Sharmila Osmin Page 8

Result for Transformation I,

7

6

4

z

y

x

780

890

331

Step 3: Transformation II:

09

898

a

aaaa

'

22

'

32'

22

'

32

''

32

9

1

9

887

a

aaaa

'

22

'

32'

23

'

33

''

33

9

15

9

8)6(7

a

abbb

'

22

'

32'

2

'

3

''

3

Result for Transformation II,

915

6

4

z

y

x

9100

890

331

So, 9

15z

9

1

1599

15z

6z8y9

z86y9

9

)15(86y

14y

4z3y3x

z3y34x

Page 9: BA201 Engineering Mathematic UNIT9 - Numerical Method

B3001/UNIT9/9

Prepared by : Siti Sharmila Osmin Page 9

153)14(34x

7x

So, x = 7, y = 14 and z = -15.

Page 10: BA201 Engineering Mathematic UNIT9 - Numerical Method

B3001/UNIT9/10

Prepared by : Siti Sharmila Osmin Page 10

ACTIVITY 9a

9a.1 Solve this linear equation using Gauss Elimination Method:

a) x + 2y – 3z = 3

2x – y – z = 11

3x + 2y + z = -5

b) x –4y – 2z = 21

2x + y + 2z = 3

3x + 2y – z = -2

Page 11: BA201 Engineering Mathematic UNIT9 - Numerical Method

B3001/UNIT9/11

Prepared by : Siti Sharmila Osmin Page 11

ANSWER 9a

9a.1 a) x = 2

y = -4

z = -3

b) x = 3

y = -5

z = 1

Page 12: BA201 Engineering Mathematic UNIT9 - Numerical Method

B3001/UNIT9/12

Prepared by : Siti Sharmila Osmin Page 12

SELF ASSESSMENT

9.1 Solve this linear equation by using Gauss Elimination Method:

a- 3x + 6y –2z = 8

2y –x + 4z = 21

x + y – 4z = 14

b- 2t + 3s – u = 3

t – 3s + 3u = 15

-2t – 5s + 3u = -2

Page 13: BA201 Engineering Mathematic UNIT9 - Numerical Method

B3001/UNIT9/13

Prepared by : Siti Sharmila Osmin Page 13

ANSWER

9.1 a) x =1.5

y = 4

z = -2

b) t = -1.6

s = 2.4

u = 1.8