0% found this document useful (0 votes)
30 views33 pages

CPB20203 Chapter1

1. The chapter introduces methods for solving nonlinear equations and systems of linear equations. 2. Nonlinear equation solving methods covered are bisection, Newton-Raphson, and secant methods. Linear system solving methods covered are Gaussian elimination, LU decomposition, and Gauss-Seidel. 3. Examples are provided to demonstrate applying each method to solve equations and systems.

Uploaded by

9xqyk4dpwb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views33 pages

CPB20203 Chapter1

1. The chapter introduces methods for solving nonlinear equations and systems of linear equations. 2. Nonlinear equation solving methods covered are bisection, Newton-Raphson, and secant methods. Linear system solving methods covered are Gaussian elimination, LU decomposition, and Gauss-Seidel. 3. Examples are provided to demonstrate applying each method to solve equations and systems.

Uploaded by

9xqyk4dpwb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Chapter 1

Non-linear equations and system


of linear equations

Chapter 1 1
Learning Outcomes (LO):
1. Know how to calculate root of non-linear equations
using Bisection, Newton Raphson and Secant
method.
2. Know how to calculate solution of system of linear
equations using Gaussian elimination, L-U
decomposition and Gauss-Seidel method.

Chapter 1 2
1.1 Non-linear equations
The objectives in this chapter is to find the roots
of nonlinear equations of the form = 0,
which is frequently encountered in scientific
world. Here we will learn several methods to
solve it.

Chapter 1 3
a) Bisection method

In general if ( ) is real and continuous in the interval


, and < 0, then there is at least one real
root between and . The steps involved are:

S1: Choose and such that < 0.

S2: Calculate =

S3: Check for this conditions

a) If < 0, set = and return to S2.

Chapter 1 4
b) If > 0, set = and return
to S2.
c) If = 0, the root equals ,
terminate the computation.

Chapter 1 5
Example (page 23)

Chapter 1 6
b) Newton-Raphson method
This method uses a straight line approximation
to the function whose zero we wish to find,
which is the tangent to the curve.
= −

Chapter 1 7
Example (page 29)

Chapter 1 8
c) Secant method

= −

Example:
Find the root of = − 3 + 2. Start with
initial values = −2.6 and = −2.4.
Calculate until − = 0.

Chapter 1 9
Solution:
= −2.6 → −2.6 = −7.7760
= −2.4 → −2.4 = −4.6240

= −

−4.6240 −2.4 − −2.6
= −2.4 −
−4.6240 − −7.7760
= −2.1066
− = 0.29340
= −2.1066 → −2.1066 = −1.0288

Chapter 1 10

= −

−1.0288 −2.1066 − −2.4
= −2.1066 −
−1.0288 − −4.6240
= −2.0226
− = 0.083958
= −2.0266 → −2.0266 = −0.20686

Continue for , , …
Summary is in the table:

Chapter 1 11
i ( ) −
1 -2.4 -2.6 −4.6240 −7.7760 0.2

2 −2.1066 -2.4 −1.0288 −4.6240 0.29340

3 −2.0226 −2.1066 -0.20686 −1.0288 0.083958

4 -2.0015 −2.0226 -0.013614 -0.20686 0.021130

5 -2.000 -2.0015 -0.00020283 -0.013614 0.0014886

6 ? ? ? ? ?

Chapter 1 12
1.2 System of Linear Equations
In mathematics, a system of linear equations (or linear system) is
a collection of two or more linear equations involving the same
set of variables. For example,

is a system of three equations in the three variables x, y, z. A


solution to a linear system is an assignment of values to the
variables such that all the equations are simultaneously satisfied.
A solution to the system above is given by x = 1, y = -2 and z = -2
since it makes all three equations valid.

Chapter 1 13
A general system of m linear equations with n unknowns can be
written as:

Here , , … , are the unknowns, , ,…, are the


coefficients of the system, and , , … , are the constant
terms.
The above linear system can be written in more compact matrix
vector form ( = ) where;

Chapter 1 14
where A is an m×n matrix, x is a column vector with n
entries, and b is a column vector with m entries.

The augmented matrix:

Chapter 1 15
a) Gauss Elimination
This is one of the technique to solve linear systems. The basic procedure
follows a specific sequence of steps and only uses elementary row operations.
Elementary row operation are applied to the augmented matrix to yield an
equivalent linear system:
a) Interchange: the order of two rows can be changed

b) Scaling: multiplying a row by a nonzero constant (m)

c) Replacement: the row can be replaced by the sum of that row and a
multiple of any row:
→ +
Where = multiple of row that is to be subtracted from row
=−

Chapter 1 16
The original matrix will then converted into an upper triangular
matrix. Then, back substitution can be used to find .

Example: Use Gauss elimination to solve


2 + − =4
4 + + 2 = 10
3 + + = 7.5

1. First step is to construct a table that consists all constants:


Operation Multiple (m) ( ) ( ) ( )
2 1 -1 4
4 1 2 10
3 1 1 7.5

Chapter 1 17
2. Next, do the row replacement for row 2 and 3.

Operation Multiple (m) ( ) ( ) ( )

2 1 -1 4

4
+ =− = − = −2 0 -1 4 2
2

3
+ =− =− 0 -1/2 5/2 1.5
2

Chapter 1 18
3. Next, do replacement for row 3.
Operation Multiple (m) ( ) ( ) ( )

2 1 -1 4

0 -1 4 2

1
−2 1 0 0 1/2 0.5
+ =− =− =−
−1 2

4. Do back substitution:
1
= 0.5 → =1
2
− + 4 = 2 → − = 2 − 4 1 = −2 → =2
2 + − =4→2 +2−1=4→ = 1.5

Chapter 1 19
So, the full solutions:

1.5
= 2
1

Chapter 1 20
b) LU Decomposition
This methods separate the time-consuming elimination
of the matrix A using the concept of factorization.
Matrix A is factorize into the product of a lower
triangular matrix L that has 1’s along the main diagonal
and an upper triangular matrix U with nonzero diagonal
elements: A = LU

Chapter 1 21
Chapter 1 22
Chapter 1 23
Chapter 1 24
Chapter 1 25
Chapter 1 26
c) Gauss-Seidel
The most commonly used iterative method, which
employs initial guess and then iterates to obtain refined
estimates of the solution. Well-suited for large number
of equations.

Chapter 1 27
Chapter 1 28
Chapter 1 29
Chapter 1 30
Example:

Chapter 1 31
Chapter 1 32
End of Chapter 1

Chapter 1 33

You might also like