NUMERICAL METHOD Flipbook PDF

Numerical Methods - Solving Linear and Non-linear Equation is a comprehensive step by step module for beginners and thos

10 downloads 124 Views 2MB Size

Recommend Stories

Story Transcript

NUMERICAL METHOD SOLVING LINEAR AND NON-LINEAR EQUATIONS: STEP BY STEP APPROACH MODULE

| ASNIZA ABU BAKAR | NAKSA AHMAD | | SITI NURADIBAH EDROS | Publisher Politeknik Ibrahim Sultan Pasir Gudang, Johor

i

DECL ARATION Published By: POLITEKNIK IBRAHIM SULTAN Km 10 Jalan Kong Kong 81700 Pasir Gudang, Johor Darul Takzim TEL: 6072612488 FAKS: 6072612402 www.pis.edu.my First Published 2021 Copyright @ Politeknik Ibrahim Sultan 2021

All right reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronics, mechanical, photocopying, recording or otherwise, without the prior written permission from the publisher. Perpustakaan Negara Malaysia

Cataloguing-in-Publication Data

Asniza Abu Bakar, 1970NUMERICAL METHOD: SOLVING LINEAR AND NON-LINEAR EQUATIONS: STEP BY STEP APPROACH MODULE / ASNIZA ABU BAKAR, NAKSA AHMAD, SITI NURADIBAH EDROS. Mode of access: Internet eISBN 978-967-2065-57-9 1. Numerical analysis. 2. Mathematical analysis. 3. Algebras, Linear. 4. Differential equations. 5. Government publications--Malaysia. 6. Electronic books. I. Naksa Ahmad, 1975-. II. Siti Nuradibah Edros, 1982-. III. Title. 518

ii

ACKNOWLEDGEMENT First, we would like to express our deepest gratitude to the Head of Department of Mathematics, Science and Computer, En. Nordin bin Zakariah for having the trust in us in creating this e-book and helping us review its content to make sure it is appropriate.

This e-book would not have been possible without the help of our friend Emy Zulyiana binti Mohd. Nor who has allowed us to use her ideas and materials for the benefits of our students.

An additional thanks to the staffs of Creative Design Centre especially Mr. Sarawanan a/l Lechumanan for the guidance in making this e-book a reality. Our sincere thanks also goes to Dr. Prasanna Kesavan as the proof reader for this e-book.

Finally, we want to thank our families for the love and support that have always made us eager to contribute more to the world of education.

iii

SYNOPSIS Numerical Methods - Solving Linear and Non-linear Equation is a comprehensive step by step module for beginners and those who need a clear understanding of basic numerical technique. The fundamental focus of this e-book is to guide students with step-by-step approach for each numerical method and then enhancing the concept with lots of tutorials. Therefore, it is also suitable for those who are undertaking independent studying. In writing this e-book, we have been particularly mindful of the learning outcomes that the students should achieved. To make sure of that, we have provided answers for all the tutorials so that students can figure out their own learning outcome achievement.

This e-book is divided into four simple sections. Section 1 gives a brief introduction about numerical methods. Section 2 contains the steps to solve simultaneous linear equations using various techniques of numerical methods. Section 3 provides the steps in using numerical methods to solve non-linear equation. Section 4 is an additional section for students to get some basic ideas on how numerical methods can be applied in solving problems related to engineering system. We sincerely hope that students will find this e-book helpful and useful in making their learning meaningful.

iv

TABLE OF CONTENT DECLARATION ……………………………………………………...i ACKNOWLEDGEMENT ……….…………...………………………ii SYNOPSIS …....................................................................………….iii INTRODUCTION ……………………….………………………..….1 SOLVING LINEAR EQUATIONS ……………………….………….4 Gauss Elimination Method …….………………………..……5 LU Decomposition : Doolittle Method …...…....…...…………8 LU Decomposition : Crout Method …….………….…..……12

Tutorial 1 …..……………………..….………………………...15 SOLVING NON-LINEAR EQUATION ……………….…….......…18 Fixed Point Iteration Method ..……………………………….19 Newton-Raphson Method ………...………………………....23

Tutorial 2 .………..………………………………..…………...27 APPLICATION OF NUMERICAL METHOD IN ENGINEERING PROBLEM …………………………………………………………29 ANSWERS ………………………………………………………....42 REFERENCES ……………………………………………………..45

1

INTRODUCTION Historical Background The oldest numerical algorithms were made by an Egyptian called Rhind Papyrus, who described a root-finding method for solving simple equation. Since then, ancient Greek mathematicians including Archimedes, have made many further advancements in numerical methods.

What Is Numerical Method? Numerical methods are mathematical methods that are used to approximate the solution of complicated problems so that the solution consists of only addition, subtraction, multiplication and division operations

source: pixabay.com

2

Numerical Solution to Linear System Of Equations In engineering, multi-component systems require solution of a set of mathematical equations that need to be solved simultaneously Consider a system of n linear equations with 𝑛 being unknown: 𝑎11 𝑥1 + 𝑎12 𝑥2 + … + 𝑎1𝑛 𝑥𝑛 = 𝑏1 𝑎21 𝑥1 + 𝑎22 𝑥2 + … + 𝑎2𝑛 𝑥𝑛 = 𝑏2 ...

𝑎’s : coefficients 𝑥’s : unknowns 𝑏’s : constants

𝑎𝑛1 𝑥1 + 𝑎𝑛2 𝑥2 + … + 𝑎𝑛𝑛 𝑥𝑛 = 𝑏𝑛

For small 𝑛’s (say, 𝑛 ≤ 2) this can be done mentally, but for large 𝑛, we need numerical technique Three different methods are explained in this module which are: ✓ Gaussian Elimination Method ✓ LU Decomposition : Doolittle Method ✓ LU Decomposition : Crout Method

source: pixabay.com

3

Numerical Solution to Non-Linear System Of Equations In engineering system, there are also non-linear components that require solution of non-linear equations. Computing roots of non-linear equations, especially of polynomials, is one of the classical problems of Mathematics. For polynomials, finding the roots for quadratic equation is quite easy. We can use the following formula: 𝑥1,2

−𝑏 ± 𝑏 2 − 4𝑎𝑐 = 2𝑎

But to solve higher degree polynomials, the solutions involve a number of steps that are quite tedious and may lead to mistakes. For equations involving trigonometric function, exponential function and logarithmic functions, roots cannot be determined explicitly. Under these circumstances we need numerical methods to find the roots. Two different methods are explained in this module which are: ✓

Fixed Point Iteration Method

✓ Newton-Raphson Method

4

SOLVING LINEAR EQUATIONS Learning Outcome : source: pixabay.com

At the end of this section, readers should be able to solve simultaneous linear equations using: i.

Gauss Elimination Method

ii. LU Decomposition : Doolittle Method iii. LU Decomposition : Crout Method

source: pixabay.com

5

GAUSS ELIMINATION METHOD Gauss elimination is a method for solving system of linear equations in matrix form of 𝐴 𝑥 = 𝑏 . It involves row reduction algorithm where a sequence of operations is performed on the corresponding augmented matrix. Let’s see an example on how the whole process of elimination work until the solution is derived.

EXAMPLE 1 source: pixabay.com

Using Gaussian Elimination Method, write the value of 𝑥, 𝑦 and 𝑧. 𝑥 + 2𝑦 + 3𝑧 = 5 3𝑥 − 𝑦 + 2𝑧 = 8 −6𝑦 – 4𝑧 + 4𝑥 = −2

Tips: Rearrange the equation in 𝑥, 𝑦 and 𝑧 order.

Solution : source: pixabay.com

STEP 1 : Rearrange the equation and write in the form of 𝑨 × 𝑿 = 𝑩.

𝑨

×

𝑿 =

𝑩

𝑥 1 2 3 5 3 −1 2 × 𝑦 = 8 𝑧 4 −6 −4 −2

STEP 2 : Compose the "augmented matrix equation“ C1 C2 C3 R1 R2 R3

1 3 4

2 3 5 −1 2 8 −6 −4 −2

Tips: R1 : Row 1 R2 : Row 2 R3 : Row 3 C1 : Column 1 C2 : Column 2 C3 : Column 3

6 STEP 3 : First Elimination i.

Eliminate the value of 3 at element 𝑎21 by referring R1 to replace with 0.

(𝑅2 × 𝑎11 ) − 𝑅1 × 𝑎21 = 𝑁𝑒𝑤 𝑅2 3 −1 2 8

ii.

1 −

1 2 3 5

3

=

0 −7 −7 −7

Eliminate the value of 4 at element 𝑎31 by referring R1 to replace with 0. (𝑅3 × 𝑎11 ) − 𝑅1 × 𝑎31 = 𝑁𝑒𝑤 𝑅3 4 −6 −4 2

1 −

1 2 3 5

4

=

0 −14 −16 −22

New Augmented Matrix for first elimination: 1 2 3 5 0 −7 −7 −7 0 −14 −16 −22

source: pixabay.com

7 STEP 4 : Second Elimination For new matrix, eliminate the value of −14 at element 𝑎32 by referring R2 to replace with 0.

(𝑅3 × 𝑎22 ) − 𝑅2 × 𝑎32 = 𝑁𝑒𝑤 𝑅3 0 −14 −16 −22

−7 −

0 −7 −7 −7

−14

=

New Augmented Matrix for second elimination: 1 2 3 5 0 −7 −7 −7 0 0 14 56

STEP 5 :

Solve the problem. 𝑥 + 2𝑦 + 3𝑧 = 5 − 7𝑦 − 7𝑧 = −7 14𝑧 = 56 ∴ 𝒙 = −𝟏 ; 𝒚 = −𝟑 ; 𝒛 = 𝟒

0 0 14 56

LU DECOMPOSITION : DOOLITTLE METHOD With Doolittle method, the solution of the system of linear equations still uses the matrix form of 𝐴 𝑥 = 𝑏 . But this time, coefficient matrix A is decomposed into the product of a lower triangular matrix L and an upper triangular matrix U. That is, 𝐴 = 𝐿 𝑈 . The solution is derived by solving the equation 𝐿 𝑦 = 𝑏 by forward substitution for y, and then solving the equations 𝑈 𝑥 = 𝑦 by backward substitution for x. Let’s work on an example to understand the whole process.

EXAMPLE 1 source: pixabay.com

Using LU Doolittle Method, write the value of 𝜃, 𝛼 and 𝛽.

3𝜃 + 2𝛼 − 𝛽 = 10 7𝜃 − 𝛼 + 6𝛽 = 8 3𝜃 + 2𝛽 = 5

Solution : source: pixabay.com

STEP 1 : Rearrange the equation and write in the form of 𝑨 × 𝑿 = 𝑩. 𝑨

× 𝑿 = 𝑩

𝜃 3 2 −1 10 7 −1 6 × 𝛼 = 8 𝛽 3 0 2 5

8

9

STEP 2 : Write in the form of 𝑨 = 𝑳 × 𝑼 and multiply the 𝑳 and 𝑼 𝑨

=

3 2 −1 1 7 −1 6 = 𝑎 3 0 2 𝑏 𝑑 3 2 −1 7 −1 6 = 𝑎𝑑 𝑏𝑑 3 0 2

𝑳

×

𝑼

𝑑 0 0 1 0 × 0 𝑐 1 0 𝑒 𝑎𝑒 + 𝑔 𝑏𝑒 + 𝑐𝑔

Tips: The value for matrix 𝐿 and 𝑈 area fix

𝑒 𝑔 0

𝑓 ℎ 𝑖

𝑓 𝑎𝑓 + ℎ 𝑏𝑓 + 𝑐ℎ + 𝑖

Calculate the value of 𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓, 𝑔, ℎ and 𝑖 :

𝑑=3

𝑒=2

𝑓 = −1

𝑎𝑑 = 7 𝑎(3) = 7 7 𝑎= 3

𝑎𝑒 + 𝑔 = −1 7 (2) + 𝑔 = −1 3 17 𝑔=− 3

𝑎𝑓 + ℎ = 6 7 −1 + ℎ = 6 3 25 ℎ= 3

𝑏𝑑 = 3 𝑏(3) = 3 𝑏=1

𝑏𝑒 + 𝑐𝑔 = 0

𝑏𝑓 + 𝑐ℎ + 𝑖 = 2 6 25 (1)(−1) + +𝑖 =2 17 3 1 𝑖= 17

1 2 +𝑐 − 𝑐=

6 17

17 =0 3

10

STEP 3 : Replace all the value of 𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓, 𝑔, ℎ and 𝑖 into matrix 𝑳 and 𝑼:

𝐿=

1 7 3

0

0

1

0

3 ;

6 1 1 17

𝑈=

2 −1 17 25 0 − 3 3 1 0 0 17

STEP 4 : Find matrix 𝑦 by using the formula 𝑳 × 𝒚 = 𝑩 𝑳 1 7 3

1

×

0

0

1

0

6 1 17

𝒚

= 𝑩

𝑦1 10 × 𝑦2 = 8 𝑦3 5

𝑦1 = 10 7 𝑦 + 𝑦2 = 8 3 1

𝑦1 +

6 𝑦 + 𝑦3 = 5 17 2

𝑦1 ∴ 𝑦2 = 𝑦3

10 46 − 3 7 17

source: pixabay.com

11 STEP 5 : Find matrix 𝑥 by using the formula 𝑼 × 𝑿 = 𝒚 𝑼

× 𝑿 =

3

2 −1 17 25 𝜃 0 − 3 3 × 𝛼 = 1 𝛽 0 0 17

𝒚

10 46 − 3 7 17

3𝜃 + 2𝛼 − 𝛽 = 10

17 25 46 𝛼+ 𝛽=− 3 3 3 1 7 𝛽= 17 17 −

∴ 𝜽 = −3 ; 𝜶 = 𝟏𝟑 ; 𝜷 = 𝟕

source: pixabay.com

12

LU DECOMPOSITION : CROUT METHOD Crout method is another LU decomposition method which has the same five steps that are used in Doolittle method. The only difference is that in Crout method, the triangular matrix which has 1’s on the main diagonal is matrix U, whereas in Doolittle method, the triangular matrix which has 1’s on the main diagonal is matrix L.

EXAMPLE 1 source: pixabay.com

Using LU Crout Method, write the value of 𝑥, 𝑦 and 𝑧. 𝑥 + 2𝑦 + 3𝑧 = 5 3𝑥 − 𝑦 + 2𝑧 = 8 4𝑥 − 6𝑦 − 4𝑧 = −2

Solution : source: pixabay.com

STEP 1 : Rearrange the equation and write in the form of 𝑨 × 𝑿 = 𝑩. 𝑨 1 3 4

2 −1 −6

× 𝑿 = 𝑩 𝑥 3 5 2 × 𝑦 = 8 𝑧 −4 −2

STEP 2 : Write in the form of 𝑨 = 𝑳 × 𝑼 and multiply the 𝑳 and 𝑼 𝑨 1 3 4

2 −1 −6

= 𝑎 3 2 = 𝑏 𝑑 −4

𝑳

×

𝑼

0 𝑐 𝑒

0 1 0 × 0 𝑓 0

𝑔 1 0

ℎ 𝑖 1

Tips: The value for matrix 𝐿 and 𝑈 area fix and different from LU Doolittle Method

13 𝑎 1 2 3 3 −1 2 = 𝑏 𝑑 4 −6 −4

0 0 1 𝑐 0 × 0 𝑒 𝑓 0

𝑎 1 2 3 3 −1 2 = 𝑏 𝑑 4 −6 −4

𝑎𝑔 𝑏𝑔 + 𝑐 𝑑𝑔 + 𝑒

𝑔 1 0

ℎ 𝑖 1

𝑎ℎ 𝑏ℎ + 𝑐𝑖 𝑑ℎ + 𝑒𝑖 + 𝑓

Calculate the value of 𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓, 𝑔, ℎ and 𝑖 : 𝑎=1

𝑎𝑔 = 2 1 𝑔=2 𝑔=2

𝑎ℎ = 3 (1)ℎ = 3 ℎ=3

𝑏=3

𝑏𝑔 + 𝑐 = −1 3 (2) + 𝑐 = −1 𝑐 = −7

𝑏ℎ + 𝑐𝑖 = 2 (3)(3) + (−7)𝑖 = 2 𝑖=1

𝑑=4

𝑑𝑔 + 𝑒 = −6 (4)(2) + 𝑒 = −6 𝑒 = −14

𝑑ℎ + 𝑒𝑖 + 𝑓 = −4 (4)(3) + (−14)(1) + 𝑓 = −4 𝑓 = −2

STEP 3 : Replace all the value of 𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓, 𝑔, ℎ and 𝑖 into matrix 𝑳 and 𝑼: 1 𝐿= 3 4

0 0 −7 0 −14 −2

;

1 2 3 𝑈= 0 1 1 0 0 1

14 STEP 4 : Find matrix 𝑦 by using the formula 𝑳 × 𝒚 = 𝑩 𝑳

×

𝒚

= 𝑩

𝑦1 1 0 0 5 𝑦 3 −7 0 × 2 = 8 𝑦3 4 −14 −2 −2 𝑦1 = 5 3𝑦1 − 7𝑦2 = 8 4𝑦1 − 14𝑦2 − 2𝑦3 = −2 𝑦1 5 𝑦 ∴ 2 = 1 𝑦3 4 STEP 5 : Find matrix 𝑥 by using the formula 𝑼 × 𝑿 = 𝒚 𝑼

× 𝑿 = 𝒚

1 2 0 1 0 0

𝑥 3 5 1 × 𝑦 = 1 𝑧 1 4 𝑥 + 2𝑦 + 3𝑧 = 5

𝑦+𝑧 =1 𝑧=4 ∴ 𝒙 = −𝟏 ; 𝒚 = −𝟑 ; 𝒛 = 𝟒

source: pixabay.com

15

T U TO R I A L 1 1.

source: pixabay.com

Solve the following linear equation system by using Gaussian Elimination Method: a)

2𝑖 + 𝑗 + 𝑘 = 8 5𝑖 − 3𝑗 + 2𝑘 = 3 7𝑖 + 𝑗 + 3𝑘 = 20

b)

3𝑝 − 12𝑞 + 10𝑟 = −5 −12𝑝 − 60𝑟 + 64𝑞 = 32 10𝑝 − 60𝑞 + 60𝑟 = −30

c)

3𝜃 + 2𝛼 + 𝛽 = 10 −7𝜃 − 2𝛼 − 6𝛽 = 8 7𝜃 − 2𝛼 + 6𝛽 = 8

d)

4𝑥1 + 4𝑥2 − 3𝑥3 = 7 5𝑥1 + 7𝑥2 − 13𝑥3 = −9 𝑥1 + 2𝑥2 − 5𝑥3 = −6

e)

𝑥 + 3𝑦 + 3𝑧 = −1 𝑥 + 4𝑦 + 3𝑧 = 2 𝑥 + 3𝑦 + 4𝑧 = 3

f)

−𝑦 + 𝑧 = −8 + 4𝑥 𝑥 − 7𝑦 = 7 − 3𝑧 𝑥 + 4𝑧 = 4𝑦 + 3

g)

6𝑥 − 5𝑦 − 2𝑧 + 2 = 0 4𝑥 + 𝑦 − 8𝑧 − 1 = 0 2𝑥 + 𝑦 − 3𝑧 − 5 = 0

16 2.

Solve the following linear equation system by using LU Doolittle Method: a)

2𝑟 + 𝑠 + 6𝑡 = 4 5𝑟 − 2𝑠 + 8𝑡 = 6 −7𝑠 + 3𝑡 + 6𝑟 = 2

b)

3𝑥 − 2𝑦 + 3𝑧 = 23 𝑥 + 4𝑦 + 𝑧 = 17 2𝑥 + 𝑦 + 3𝑧 = 25

c)

2𝑥 + 9𝑦 − 3𝑧 = 5 4𝑦 − 2𝑧 = 0 −𝑥 − 5𝑦 + 4𝑧 = 11

d)

4𝑝 − 𝑞 + 3𝑟 = 38 3𝑝 + 4𝑞 + 6𝑟 = 35 𝑝 − 5𝑞 + 3𝑟 = 21

e)

𝑥 + 3𝑦 + 3𝑧 = −1 6𝑥 − 5𝑦 − 2𝑧 + 2 = 0 𝑥 + 3𝑦 + 4𝑧 = 3

f)

4𝑥 + 𝑦 − 8𝑧 − 1 = 0 −𝑦 + 𝑧 = −8 + 4𝑥 2𝑥 + 𝑦 − 3𝑧 − 5 = 0

g)

𝑥 + 4𝑦 + 3𝑧 = 2 −𝑥 − 7𝑦 = 7 − 3𝑧 𝑥 + 4𝑧 = 4𝑦 + 3

17 3.

Solve the following linear equation system by using LU Crout Method: a)

2𝑥1 + 𝑥2 + 𝑥3 = 4 2𝑥2 + 𝑥1 + 𝑥3 = 4 2𝑥3 + 𝑥1 + 𝑥2 = 4

b)

𝑥 + 3𝑦 + 2𝑧 = 3 2𝑥 − 𝑦 − 3𝑧 = −8 5𝑥 + 2𝑦 + 𝑧 = 9

c)

8𝑝 − 𝑞 + 𝑟 = 21 𝑝 + 4𝑞 + 3𝑟 = 11 𝑝 + 𝑞 + 3𝑟 = 21

d)

−𝑦 + 𝑧 = −8 + 4𝑥 𝑥 + 14𝑧 = 4𝑦 + 3 −13𝑥 − 5𝑦 + 4𝑧 = 11

e)

4𝑦 − 2𝑧 + 14 = 0 6𝑥 − 5𝑦 − 2𝑧 + 12 = 0 11𝑥 + 3𝑦 + 4𝑧 = 3

f)

14𝑥 + 𝑦 − 18𝑧 − 11 = 0 12𝑥 + 9𝑦 − 13𝑧 = 15 2𝑥 + 15𝑦 − 3𝑧 − 5 = 0

g)

10𝑥 + 4𝑦 + 3𝑧 = 2 11𝑥 + 3𝑦 + 3𝑧 = −11 −9𝑥 − 7𝑦 = 7 − 3𝑧

source: pixabay.com

SOLVING NON-LINEAR EQUATIONS Learning Outcome : source: pixabay.com

At the end of this section, readers should be able to solve simultaneous non-linear equations using: i.

Fixed Point Iteration Method

ii. Newton-Raphson Method

source: pixabay.com

18

FIXED POINT INTERATION METHOD Fixed Point Iteration is a method for solving polynomial equations. Basically, there are 3 steps in this method:

1 STEP 1 • Identify the initial approximation, 𝑥0 • If without initial approximation, 𝑥0 : ✓ To find 𝑥0 , use formula False Placement Method: (trial and error process, changes in sign of function 𝑓(𝑥)) 𝑥1 𝑦1 1 ✓ Formula: 𝑥0 = 𝑦2 −𝑦1 𝑥2 𝑦2

2 STEP 2 • Find the suitable iteration function by making 𝑥 as the subject of the formula.

3 STEP 3 • Substitute the value of 𝑥0 into the 𝑥 of the iterative function to get the second approximation, 𝑥1 . • The iteration process is repeated and done when the value of the required root does not change on three consecutive approximations, when expressed to the required degree of accuracy. Or, check: 𝑥𝑛+1 − 𝑥𝑛 < 0.0001.

19

20 EXAMPLE 1 source: pixabay.com

Determine the root for 𝑥 4 − 𝑥 − 10 = 0 correct to 4 decimal places with initial assumption of 𝑥0 is 4.0.

Solution : source: pixabay.com

STEP 1 : Find the initial approximation, 𝑥0 . 𝑥0 = 4.0 STEP 2 : From function 𝑥 4 − 𝑥 − 10 = 0, derive 𝑥 as a subject of the function. 1

𝑥 = (𝑥 + 10)4 STEP 3 : Find the root. 𝟏

𝒙𝒏

𝒙𝒏+𝟏 = (𝒙𝒏 + 𝟏𝟎)𝟒 1

𝑥0 = 4.00000

(4 + 10)4 = 1.93434

𝑥1 = 1.93434

1.85866

𝑥2 = 1.85866

1.85570

𝑥3 = 1.85570

1.85559

𝑥4 = 1.85559

1.85558

𝑥5 = 1.85558

1.85558

∴ Root of the equation is 1.8556

Tips: Two ways to set the root: i. The difference between 2 answers is 0.0001 ii. 3 consistent values correct to 3 or 4 decimal places

21 EXAMPLE 2 source: pixabay.com

Determine the root correct to 3 decimal places for 2𝑥 2 − 3 = using Fixed Iteration Method.

1 𝑥

by

Solution : source: pixabay.com

** In some cases, the value of 𝑥0 is not given. In that case, we use False Placement Method to get the value of 𝑥0 . STEP 1 : Find the initial approximation, 𝑥0 by using False Placement Method. 𝑥 𝑓 𝑥 = 2𝑥 2 − 3 −

1

−2

−1

1 (𝒙𝟏 )

2 (𝒙𝟐 )

5.5

0

−2 (𝒚𝟏 )

4.5 (𝒚𝟐 )

𝑥

False Placement Method: 𝑥0 =

1 𝑥1 𝑦2 − 𝑦1 𝑥2

𝑥0 =

1 1 −2 4.5 − (−2) 2 4.5

𝑥0 =

1 6.5

𝑥0 = 1.309

𝑦1 𝑦2

1 × 4.5 − −2 × 2

Tips: Stop calculate 𝑓(𝑥) when the positive value is next to the negative value

22 STEP 2 : 1

From function 2𝑥 2 − 3 = , derive 𝑥 as a subject of the function. 𝑥

𝑥=

1 (2𝑥 2 − 3)

STEP 3 : Find the root. 𝒙𝒏

𝒙𝒏+𝟏 =

𝟏 (𝟐𝒙𝒏 𝟐 − 𝟑)

𝑥0 = 1.309

2.342

𝑥1 = 2.342

0.125

𝑥2 = 0.125

−0.337

𝑥3 = −0.337

−0.361

𝑥4 = −0.361

−0.365

𝑥5 = −0.365

−0.366

𝑥6 = −0.366

−0.366

𝑥7 = −0.366

−0.366

∴ Root for the equation is −0.366

23

NEWTON-RAPHSON METHOD Newton-Raphson is another method that can be used for solving polynomial equations. Basically, there are 3 steps in this method:

1 STEP 1 • Identify the initial approximation, 𝑥0 • If without initial approximation, 𝑥0 : ✓ To find 𝑥0 , use formula False Placement Method: (trial and error process, changes in sign of function 𝑓(𝑥)) 𝑥1 𝑦1 1 ✓ Formula: 𝑥0 = 𝑦2 −𝑦1 𝑥2 𝑦2

2 STEP 2 • Find differentiation, 𝑓 ′ 𝑥 from the function 𝑓(𝑥).

3 STEP 3 • Find the root, by using the formula 𝑥𝑛+1 = 𝑥𝑛 −

𝑓(𝑥𝑛 )

.

𝑓′(𝑥𝑛 )

• The iteration process is repeated and done when the value of the required root does not change on three consecutive approximations, when expressed to the required degree of accuracy. Or, check: 𝑥𝑛+1 − 𝑥𝑛 < 0.0001.

24 EXAMPLE 1 source: pixabay.com

Solve the equation 𝑥 3 + 3𝑥 2 − 2 = 0 by using the Newton-Raphson Method. Give the answer correct to 3 decimal places with an initial guess of 𝑥0 = 4.0.

Solution : source: pixabay.com

STEP 1 : Find the initial approximation, 𝑥0 . 𝑥0 = 1.0 STEP 2 : Identify 𝑓 𝑥 and 𝑓′(𝑥) 𝑓 𝑥 = 𝑥 3 + 3𝑥 2 − 2 𝑓′(𝑥) = 3𝑥 2 + 6𝑥 STEP 3 : Construct the table and find the root. 𝒙𝒏

𝒇 𝒙𝒏

𝒇′(𝒙𝒏 )

𝒙𝐧+𝟏 = 𝒙𝒏 −

1.000

2.000

9.000

0.778

0.778

0.287

6.484

0.734

0.734

0.117

6.020

0.715

0.715

−0.101

5.824

0.732

0.732

−0.0003

5.999

0.732

∴ Root of the equation is 0.732

𝒇(𝒙𝒏 ) 𝒇′(𝒙𝒏 )

25 EXAMPLE 2 source: pixabay.com

Determine the root correct to 3 decimal places for sin 𝑥 − 2𝑥 + 3 = 0 by using Newton Raphson Method.

Solution : source: pixabay.com

STEP 1 : Find the initial approximation, 𝑥0 by using False Placement Method. 𝑥

−2

−1

𝑓 𝑥 = sin 𝑥 − 2𝑥 + 3

6.09

4.159

1

(𝒙𝟏 )

2

(𝒙𝟐 )

1.842 −0.091 (𝒚𝟐 ) (𝒚𝟏 )

False Placement Method: 𝑥0 =

1 𝑥1 𝑦2 − 𝑦1 𝑥2

𝑥0 =

1 1 1.842 −0.091 − 1.842 2 4 − 0.091

𝑥0 =

1 −1.933

𝑥0 = 1.953

𝑦1 𝑦2

1 × −0.091

Tips: Stop calculate 𝑓(𝑥) when the positive value is next to the negative value

− 1.842 × 2

26 STEP 2 : Identify 𝑓 𝑥 and 𝑓′(𝑥) 𝑓 𝑥 = sin 𝑥 − 2𝑥 + 3 𝑓′(𝑥) = cos 𝑥 − 2

Tips: The calculation for trigonometry function must be in radian

STEP 3 : Construct the table and find the root.

𝒙𝒏

𝒇 𝒙𝒏

𝒇′(𝒙𝒏 )

𝒙𝒏+𝟏 = 𝒙𝒏 −

1.953

0.022

−2.373

1.963

1.963

−0.0002

−2.382

1.963

1.963

−0.0002

−2.382

1.963

𝒇(𝒙𝒏 ) 𝒇′(𝒙𝒏 )

∴ Root for the equation is 1.963

source: pixabay.com

27

T U TO R I A L 2 1.

source: pixabay.com

Solve the following linear equation system by using Fixed Point Iteration Method: a)

b) c) d)

e) f)

g)

h)

i)

Determine the root for 𝑥 4 − 𝑥 − 10 = 0 correct to 4 decimal places with initial assumption of 𝑥0 is 4.0. Determine the root for 5𝑥 𝑒 𝑥 = 1 correct to 4 decimal places with initial assumption of 𝑥0 is 1.0. Determine the real root for 𝑥 3 + 3𝑥 2 − 1 = 0 correct to 3 3 decimal places using the function 𝑥𝑛+1 = 1 − 3𝑥𝑛 2 . Using the Fixed Iteration Method, find the root for 𝑥 − cos 𝑥 = 0 correct to 3 decimal places, with the initial approximation, 𝑥0 is 0.5. Approximate the real root for 𝑥 2 + 5𝑥 − 3 = 0 by using Simple Fixed Iteration Method correct to 4 decimal places. Using the Fixed Iteration Method, find the root for 𝑥 − 2 2 − 1 = 0 correct to 3 decimal places with the initial guess 𝑥0 = 2 Given 𝑓(𝑥) = 𝑥3 – 7𝑥 + 2 and 𝑥0 = 1.5 i. Find iterative functions for the equation above. ii. Compute appropriate iterative function. Find the initial approximate, 𝑥0 for equation 4 𝑓(𝑥) = 𝑥 − 3𝑥 + 1, then find the real root correct to 3 decimal places. The equation sin 𝑥 + 3𝑥 − 4 = 0 has a real root between 𝑥 = 1 and 𝑥 = 2 . Find the real root correct to 3 decimal places by using Iterative Method.

28 2.

Solve the following linear equation system by using NewtonRaphson Method: a)

b)

c) d)

e)

f)

Use Newton Raphson Method to find the real root of 𝑥 + 1 = 𝑥 6 which the root lies between 𝑥 = 1 and 𝑥 = 2. Give your answer correct to 4 decimal places. Find a real root of 3𝑥 + sin 𝑥 − 𝑒 𝑥 = 0 that lies between 𝑥 = 0 and 𝑥 = 1 correct to 4 decimal places by using Newton Raphson Method. Approximate the real root for 𝑥 2 + 5𝑥 − 3 = 0 by using Newton Raphson Method correct to 4 decimal places. Using the Newton Raphson Method, find the root for sin 𝑥 + 3𝑥 − 4 = 0 correct to 3 decimal places. The root lies between 𝑥 = 1 and 𝑥 = 2. Solve 𝑥 3 = 2𝑥 + 10 using the Newton Raphson Method which the initial guess, 𝑥0 is 2.5. The answer must be in 3 decimal places. Use the newton Raphson Method to estimate the real root for 4𝑥– 𝑒 𝑥 + 3 = 0, with an initial guess is 2.5. Give your answer in 4 decimal places.

source: pixabay.com

APPLICATION OF NUMERICAL METHOD IN ENGINEERING PROBLEM In engineering system, complicated equations are common and most of the time, exact analytical solutions are not available. In this kind of situation, the use of numerical methods is normally sufficient to solve the complicated equations by giving the approximate solutions. Here are some examples on how numerical methods can be applied in solving simple engineering problems.

EXAMPLE 1 source: pixabay.com

Consider the circuit shown below. Apply any suitable circuit theory together with Doolittle Method to find the current that flow through each resistor.

29

30

Solution : STEP 1 : The Kirchhoff's Current Law provides the following equation: 𝐼1 + 𝐼3 = 𝐼2 By using the Ohm’s Law and Kirchhoff's Voltage Law, the voltage drops across the resistors R1, R2 and R3 are described by the following equations: 4𝐼1 + 2𝐼2 = 28 1𝐼3 + 2𝐼2 = 14

Rearrange the equations: 𝐼1 − 𝐼2 + 𝐼3 = 0 4𝐼1 + 2𝐼2 = 28 2𝐼2 + 𝐼3 = 14

Rearrange the equation and write in the form of 𝑨 × 𝑿 = 𝑩. 𝑨

× 𝑿

= 𝑩

𝐼1 1 −1 1 0 𝐼 4 2 0 × 2 = 28 𝐼3 0 2 1 14

31 STEP 2 : Write in the form of 𝑨 = 𝑳 × 𝑼 and multiply the 𝑳 and 𝑼 𝑨

=

𝑳

×

𝑼

𝑑 𝑒 𝑓 1 0 0 1 −1 1 4 2 0 = 𝑎 1 0 × 0 𝑔 ℎ 𝑏 𝑐 1 0 2 1 0 0 𝑖 𝑑 1 −1 1 4 2 0 = 𝑎𝑑 𝑏𝑑 0 2 1

𝑒 𝑎𝑒 + 𝑔 𝑏𝑒 + 𝑐𝑔

𝑓 𝑎𝑓 + ℎ 𝑏𝑓 + 𝑐ℎ + 𝑖

Calculate value of 𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓, 𝑔, ℎ and 𝑖 : 𝑑=1

𝑒=2

𝑓 = −1

𝑎𝑑 = 4 𝑎(1) = 4 𝑎=4

𝑎𝑒 + 𝑔 = 2 4 (−1) + 𝑔 = 2 𝑔=6

𝑎𝑓 + ℎ = 0 4 1 +ℎ =0 ℎ = −4

𝑏𝑑 = 0 𝑏(1) = 0 𝑏=0

𝑏𝑒 + 𝑐𝑔 = 2 0 −1 + 𝑐 6 = 2 1 𝑐= 3

𝑏𝑓 + 𝑐ℎ + 𝑖 = 1 1 (0)(1) + −4 + 𝑖 = 1 3 7 𝑖= 3

32 STEP 3 : Replace all the value of 𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓, 𝑔, ℎ and 𝑖 into matrix 𝐿 and 𝑈: 1 0 0 4 1 0 1 0 1 3

𝐿=

;

𝑈=

1 0

0

−1 1 6 −4 7 0 3

STEP 4 : Find matrix 𝑦 by using the formula 𝑳 × 𝒚 = 𝑩

𝑳

×

𝒚

= 𝑩

1 0 0 𝑦1 0 4 1 0 𝑦 × 2 = 28 1 𝑦3 0 1 14 3 𝑦1 = 0

4𝑦1 + 𝑦2 = 28 1 𝑦 + 𝑦3 = 14 3 2 𝑦1 𝑦2 = 𝑦3

0 28 14 3

source: pixabay.com

33 STEP 5 : Find matrix 𝑥 by using the formula 𝑼 × 𝑿 = 𝒚 𝑼

× 𝑿 =

1 −1 1 𝐼1 0 6 −4 7 × 𝐼2 = 𝐼3 0 0 3

𝒚

0 28 14 3

𝐼1 − 𝐼2 + 𝐼3 = 0 6𝐼2 − 4𝐼3 = 28 7 14 𝐼3 = 3 3 𝐼1 4 𝐼2 = 6 𝐼3 2

source: pixabay.com

Therefore, current flow through 𝑅1 is 4A, current flow through 𝑅2 is 6A and current flow through 𝑅3 is 2A

34 EXAMPLE 2 source: pixabay.com

A chemical factory is in the process of making a new chemical substance. It requires three different ingredients P, Q and R. These ingredients have to be dissolved in water separately before being mixed and react with each other to produce the new chemical substance. The workers have tried three different proportions. The combination of the solution containing P at 0.21𝑘𝑔/𝑚3 , the solution containing Q at 0.27𝑘𝑔/𝑚3 and the solution containing R at 0.62𝑘𝑔/𝑚3 makes 25.07𝑘𝑔 of the chemical. If the proportion for P, Q and R are changed to 0.85, 0.33 and 0.25 𝑘𝑔/𝑚3 respectively (while the volumes remain the same), then 24.93𝑘𝑔 of the chemical is produced. Finally, if the proportions are 0.13, 0.84, and 0.46 𝑘𝑔/ 𝑚3 respectively, then 31.9𝑘𝑔of the chemical is produced. Determine the volumes of the solutions containing P, Q, and R by using the LU Decomposition Crout method.

Solution : STEP 1 : Rearrange the equation and write in the form of 𝑨 × 𝑿 = 𝑩. Lets 𝑃 = 𝑥 ; 𝑄 = 𝑦 ∶ 𝑅 = 𝑧 0.21𝑥 + 0.27𝑦 + 0.62𝑧 = 25.07 0.85𝑥 + 0.33𝑦 + 0.25𝑧 = 24.93 0.13𝑥 + 0.84𝑦 + 0.46𝑧 = 31.90 𝑨

× 𝑿 =

𝑩

𝑥 0.21 0.27 0.62 25.07 0.85 0.33 0.25 × 𝑦 = 24.93 𝑧 0.13 0.84 0.46 31.90

35 STEP 2 : Write in the form of 𝑨 = 𝑳 × 𝑼 and multiply the 𝑳 and 𝑼 𝑨

=

𝑳

×

𝑼

𝑎 0.21 0.27 0.62 0.85 0.33 0.25 = 𝑏 𝑑 0.13 0.84 0.46

0 0 1 𝑔 𝑐 0 × 0 1 𝑒 𝑓 0 0

𝑎 0.21 0.27 0.62 0.85 0.33 0.25 = 𝑏 𝑑 0.13 0.84 0.46

𝑎𝑔 𝑏𝑔 + 𝑐 𝑑𝑔 + 𝑒

ℎ 𝑖 1

𝑎ℎ 𝑏ℎ + 𝑐𝑖 𝑑ℎ + 𝑒𝑖 + 𝑓

Calculate the value of 𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓, 𝑔, ℎ and 𝑖 :

𝑎 = 0.21

𝑎𝑔 = 0.27 0.21 𝑔 = 0.27 𝑔 = 1.286

𝑎ℎ = 0.62 (0.21)ℎ = 0.62 ℎ = 2.952

𝑏 = 0.85

𝑏𝑔 + 𝑐 = 0.33 0.85 (1.286) + 𝑐 = 0.33 𝑐 = −0.763

𝑏ℎ + 𝑐𝑖 = 0.25 (0.85)(2.952) + (−0.763)𝑖 = 0.25 𝑖 = 2.962

𝑑 = 0.13

𝑑𝑔 + 𝑒 = 0.84 (0.13)(1.286) + 𝑒 = 0.84 𝑒 = 0.673

𝑑ℎ + 𝑒𝑖 + 𝑓 = 0.46 (0.13)(2.952) + (0.673)(2.962) + 𝑓 = 0.46 𝑓 = −1.917

36 STEP 3 : Replace all the value of 𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓, 𝑔, ℎ and 𝑖 into matrix 𝑳 and 𝑼: 0.210 0 0 𝐿 = 0.850 −0.763 0 0.130 0.673 −1.917

;

1 1.286 2.952 𝑈= 0 1 2.962 0 0 1

STEP 4 : Find matrix 𝑦 by using the formula 𝑳 × 𝒚 = 𝑩

𝑳

×

𝒚

= 𝑩

𝑦1 0.210 0 0 25.07 𝑦 × = 0.850 −0.763 0 2 24.93 𝑦 0.130 0.673 −1.917 3 31.90 0.21𝑦1 = 25.07

0.85𝑦1 − 0.763𝑦2 = 24.93 0.13𝑦1 + 0.673𝑦2 − 1.917𝑦3 = 31.90 𝑦1 119.381 ∴ 𝑦2 = 100.338 𝑦3 26.677

source: pixabay.com

37 STEP 5 : Find matrix 𝑥 by using the formula 𝑼 × 𝑿 = 𝒚 𝑼

× 𝑿 = 𝒚

𝑥 119.381 1 1.286 2.952 0 1 2.962 × 𝑦 = 100.338 𝑧 26.677 0 0 1

𝑥 + 1.286𝑦 + 2.952𝑧 = 119.381 𝑦 + 2.962𝑧 = 100.338 𝑧 = 26.677 𝑥 13.205 𝑦 = 21.324 𝑧 26.677

Therefore, the volume of solution P is 13.205𝑚3 , volume of solution Q is 21.324 𝑚3 and volume of solution R is 26.677𝑚3

38 EXAMPLE 3 source: pixabay.com

A spherical tank needs to be built to store a volume of water for a restaurant. The volume of water that the tank can hold must fulfil the following equation: 4𝑉 = 8𝑅 − ℎ 𝜋ℎ2

Where 𝑉 = volume (𝑚3 ) and ℎ = depth 𝑚 of water in the tank. If the tank is designed with a radius of 2m, what depth must the tank be filled to, so that it could hold 44𝑚3 of water? Use NewtonRaphson method with initial value of ℎ0 = 3. State your answer correct to 5 decimal places.

R

h

Solution : STEP 1 :

Find the initial approximation, ℎ0 . ℎ0 = 3.0

39 STEP 2 :

Identify 𝑓 ℎ and 𝑓′(ℎ) The equation need to be met 4𝑉 = 8𝑅 − ℎ 𝜋ℎ2 ; given that, 𝑅 = 2𝑚 ; 𝑉 = 44𝑚3 Substitute the given 𝑅 and 𝑉:

176 = 16 − ℎ 𝜋ℎ2 176 = 16𝜋ℎ2 − 𝜋ℎ3 Rewrite the given equation in the form of 𝑓 ℎ and 𝑓′(ℎ): 𝑓 ℎ = 16𝜋ℎ2 − 𝜋ℎ3 − 176 𝑓′ ℎ = 32𝜋ℎ − 3𝜋ℎ2

STEP 3 : Construct the table and find the root. 𝒇(𝒉𝒏 ) 𝒇′(𝒉𝒏 )

𝒉𝒏

𝒇 𝒉𝒏

𝒇′ 𝒉𝒏

3.00000

191.56634

216.76989

2.11627

2.11627

19.34315

170.54087

2.00285

2.00285

0.39503

163.54181

2.00043

2.00043

-0.00056

163.38983

2.00043

2.00043

-0.00056

163.38983

2.00043

𝒉𝒏+𝟏 = 𝒉𝒏 −

Therefore, the depth of the water is 2.00043 m

40 EXAMPLE 4 source: pixabay.com

Given the circuit shown below, where the current flow through the diode is given by the following equation: 𝑖 = 10−15 𝑒 38𝑣 − 1

What is the suitable value for the diode’s voltage in designing the circuit? You can use any circuit theory together with Newton Raphson Method to determine the voltage with initial value 𝑣0 = 0.85𝑉. Give your answer correct to 4 decimal places.

Solution : STEP 1 : Find the initial approximation, 𝑣0

𝑣0 = 0.85𝑉

41 STEP 2 :

Identify 𝑓 𝑣 and 𝑓′(𝑣) Use Kirchhoff’s Law and Ohm’s Law 𝐼𝑅 + 𝑖 = 0.05 𝑣 2000

+ 10−15 𝑒 38𝑣 − 1 = 0.05

Rewrite the given equation in the form of 𝑓 𝑣 and 𝑓′(𝑣): 𝑓 𝑣 = 0.0005𝑣 + 10−15 𝑒 38𝑣 − 1 − 0.05 𝑓′ 𝑣 = 0.0005 + 38(10−15 )𝑒 38𝑣

STEP 3 : Construct the table and find the root. 𝒇(𝒗𝒏 ) 𝒇′(𝒗𝒏 )

𝒗𝒏

𝒇 𝒗𝒏

𝒇′ 𝒗𝒏

0.85

0.05701

4.05088

0.83593

0.83593

0.01287

2.37349

0.83051

0.83051

0.00124

1.93179

0.82987

0.82987

0.00002

1.88539

0.82986

𝒗𝒏+𝟏 = 𝒗𝒏 −

Therefore, the suitable voltage for the diode is 0.8299V

42

ANSWERS TUTORIAL 1 1.

2.

a)

𝑖=2 ; 𝑗=3 ; 𝑘=1

b)

𝑝 = 0.363 ; 𝑞 = 0.022 ; 𝑟 = −0.582

c)

𝜃 = 9.818 ; 𝛼 = −4 ; 𝛽 = −11.455

d)

𝑥1 = −1 ; 𝑥2 = 5 ; 𝑥3 = 3

e)

𝑥 = −22 ; 𝑦 = 3 ; 𝑧 = 4

f)

𝑥 = 2.059 ; 𝑦 = −1.059 ; 𝑧 = −0.824

g)

𝑥 = 3.978 ; 𝑦 = 4.217 ; 𝑧 = 2.391

a)

𝑟 = 6 ; 𝑠 = 4 ; 𝑡 = −2

b)

𝑥=4 ; 𝑦=2 ; 𝑧=5

c)

𝑥 = −2 ; 𝑦 = 3 ; 𝑧 = 6

d)

𝑝 = 7 ; 𝑞 = −1 ; 𝑟 = 3

e)

𝑥 = −3.596 ; 𝑦 = 6.319 ; 𝑧 = 2.170

f)

𝑥 = 0.5 ; 𝑦 = 7 ; 𝑧 = 1

g)

𝑥 = −2.867 ; 𝑦 = 0.067 ; 𝑧 = 1.533

43

3.

a)

𝑥1 = 1 ; 𝑥2 = 1 ; 𝑥3 = 1

b)

𝑥 = 2 ; 𝑦 = −3 ; 𝑧 = 5

c)

𝑝 = 1.246 ; 𝑞 = −3.333 ; 𝑟 = 7.696

d)

𝑥 = 6.264 ; 𝑦 = −24.207 ; 𝑧 = −7.149

e)

𝑥 = −1.230 ; 𝑦 = −1.042 ; 𝑧 = 4.915

f)

𝑥 = 2.549 ; 𝑦 = 0.271 ; 𝑧 = 1.386

g)

𝑥 = −4.933 ; 𝑦 = 8.067 ; 𝑧 = 6.356

TUTORIAL 2 1.

a)

1.8555

b)

0.1689

c)

−2.879

d)

0.739

e)

0.5414

f)

2.999

g)

i. ii.

1

𝑥 = 7𝑥 − 2 3 @ 𝑥 = 2.4893 @ 0.289

h)

𝑥0 = 5.291 ; 𝑥 = 1.308

i)

1.045

(−2−𝑥 3 ) −7

44

2.

a)

1.1347

b)

0.3604

c)

𝑥 = 0.5414

d)

1.045

e)

2.462

f)

2.5932

45

REFERENCES Bird, J. (2017). Higher Engineering Mathematics. (7th Edition). UK Routledge. Ron Larson (2015). Precalculus: Real Mathematics, Real People. (7th Edition). Brooks Cole. Stroud, A. K. and Booth, J. D. (2007). Engineering Mathematics. (6th Ed.). Hampshire, UK. : Palgrave Macmillan

Get in touch

Social

© Copyright 2013 - 2024 MYDOKUMENT.COM - All rights reserved.