Docsity

non linear equation note, Lecture notes of Numerical Methods in Engineering

Partial preview of the text

Download non linear equation note and more Lecture notes Numerical Methods in Engineering in PDF only on Docsity!

SSCE 2393 NUMERICAL METHODS

CHAPTER 1

NONLINEAR EQUATIONS

Farhana Johar, Department of Mathematical Sciences, Faculty of Science, UTM.

[email protected]

Chapter 1: Nonlinear Equations

1.1 Introduction

1.2 Intermediate Value Theorem

1.3 Bisection Method

1.4 Fixed-point Iteration Method (simple iterative method)

1.5 Newton-Raphson Method

1.6 Summary

Example 2:

Find the interval [a, b] where the roots for

2

y = x āˆ’ x āˆ’ 3 lie.

Step 1: Breaking the original equation into few equations.

Set y = 0.

2

2

2

1 2

Set and 3

x x

x x

y x y x

Step 2: Plot y 1

and y 2

Step 3: Identify the intersection points.

Step 4: Determine the intervals.

∓ x * ∈[2,3] and [-2,-1].

1.2 Intermediate Value Theorem (IVT)

  • to verify the existence of the roots.

Theorem:

If

f ( x )∈ C [ a , b ]

and K is any number between

f ( a )

and

f ( b )where f ( a ) f ( b )<0, then there exist a number c in

[a,b] for which f ( c )= K.

Example 3:

Verify that

5 3 2

x āˆ’ 2 x + 3 x āˆ’ 1 = 0

has a solution in the interval [0,1].

Solution:

f ( a ) = f ( 0 ) = āˆ’ 1

f ( b ) = f ( 1 ) = 1

f ( a ) f ( b ) = āˆ’ 1 < 0

∓ x *exists in[ 0 , 1 ]

f (b)

f (a)

K

a c b

15 2 therefore

1 1 1

a b c

i

1 1

1

1

f a f c

f c f

f a f

Therefore: 1 75 and 15

2 1 2 1

b = c =. a = a =.

Notice that ( )> ε

1

f c ,

so repeattheabovestepfor i = 2 , 3 ,..untilsatisfyingtheconditions.

From the table above, the algorithms stop at i = 6 since | ( ) |

i

f c < ε.

Therefore,

6

x * = c =.

i

i

a

i

b

i

c

i

f a ( )

i

f c

i

f c

i

f a ( )

i

f c

1.4 FIXED-POINT ITERATION METHOD

Ƙ Formula: ( )

i i

x = g x

  • 1

Ƙ Convergence:

i

g x

(or

| g ( ) | 1 x

Ƙ Initial guess:

0

x

which is close to the root x*.

Ƙ Do the iteration up to i - th step until āˆ’ < ε

i i āˆ’ 1

x x for a given

value of ε and take

i

x * ā‰ˆ x

Example 5

Find a root for

3 2

f ( x )= x āˆ’ x āˆ’

in the interval [1, 2], and take

Solution

Step 1: find g(x)

Set f(x) = 0 to get x = g(x)

3

2

2

3

1

2

3

1

2

3 2

3 2

2 and

āˆ’

x

x

g x x g x

x x

x x

x x

3

1

2

1

i + i

x x

Step 2: Iteration

Example 2:

Show that

2

x

x āˆ’ x + e āˆ’ =

can be manipulated to form

2

x

x e

x

=. Then, find a root, x * using fixed-point iteration

method. Use

0

x = āˆ’ 1

Solution:

2

2

2

(shown).

x

x

x

x x e

x x e

x e

x

2

x

x g x

x e

1

2

i i

x

i i

x g x

x e

i

i

x

1

i i

x x

āˆ’

∓

x * ā‰ˆ x

4

1.5 NEWTON-RAPHSON METHOD

Formula :

1

i

i

i i

f x

f x

x x

Initial guess:

or sothat 0

0 0 0 0

x = a x = b f ( a ) f ( b )<

Do the iteration up to i - th step until

āˆ’ 1

( ) 0 , ( ) or

i i i i

f x f x x x for a given value of ε

and take

i

x * ā‰ˆ x.

Example 1

Find a root for

3 2

f ( x )= x āˆ’ x āˆ’

in the interval [1, 2] and take

. Stop when

i i 1

x x ε

āˆ’

Solution

***** you can choose any number between 1 and 2 to start,

x

0

3 2

f ( x )= x āˆ’ x āˆ’

f x 3 x 2 x

2

1 so

0

0

0 1 0

f x

f x

x x x

i

Continue for next i = 1

1.6 Summary of Chapter 1 – Nonlinear Equations

Method Formula Algorithm Stopping Criteria

Bisection

i i

i

a b

c

i i i i i i

f a f c < → a = a b = c

  • 1 + 1

If ( ) ( ) 0 ,

If f ( a

i

) f ( c

i

) > 0 → a

i + 1

= c

i

, b

i + 1

= b

i

f ( C

i

) = 0 , f ( C

i

or b

i

āˆ’ a

i

Fixed point

iteration

i i

x = g x

  • 1

āˆ’ < ε

i i āˆ’ 1

x x

Newton

Raphson

1

i

i

i i

f x

f x

x x

f ( x

i

) = 0 , f ( x

i

or x

i

āˆ’ x

i āˆ’ 1