the solution of non-linier equation

42
The Solution of Non-Linier Equation Nur Laila Hamidah Ref : Erwin Kreyszig-Advanced Engineering Mathematics http://numericalmethods.eng.usf.edu Matematika Rekayasa 1

Upload: others

Post on 11-Feb-2022

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Solution of Non-Linier Equation

The Solution of Non-Linier Equation

Nur Laila Hamidah

Ref : Erwin Kreyszig-Advanced Engineering Mathematics http://numericalmethods.eng.usf.edu

Matematika Rekayasa 1

Page 2: The Solution of Non-Linier Equation

CapaianPembelajaran:

• Mampu menyelesaikan akar akar

persamaan non linier dengan

menggunakan metode regula falsi, biseksi,

newton raphson dan secant

• Mampu membandingkan kelebihan dan kekurangan keempat metode tersebut

Page 3: The Solution of Non-Linier Equation

False Position Methods

Secant Methods

Newton-Raphson

Bisection02

0504

03

01 Error of Numerical Result

Solution of equation by iteration

Page 4: The Solution of Non-Linier Equation

Error in Numerical Result

Page 5: The Solution of Non-Linier Equation
Page 6: The Solution of Non-Linier Equation
Page 7: The Solution of Non-Linier Equation
Page 8: The Solution of Non-Linier Equation

Didalam setiap metode numerik harus terdapat perhitungan error. Jika tidak

terdapat formulasi eror, maka hasil numerik tersebut akan menjadi complicated

Prinsip dasar error

Page 9: The Solution of Non-Linier Equation

The False-Position Method

(Regula-Falsi)

Page 10: The Solution of Non-Linier Equation

We can approximate the solution by doing a linear interpolationbetween f(xu) and f(xl)

Find xr such that l(xr)=0, where l(x) is the linear approximation of f(x)between xl and xu

Derive xr using similar triangles

Basis of False Position Method

Page 11: The Solution of Non-Linier Equation

( ) ( )

( )( )( ) ( )

)()().(

afbf

abbfbc

xfxf

xxxfxx

xx

xf

xx

xf

ul

uluur

ur

u

lr

l

−−=

−−=

−=

Page 12: The Solution of Non-Linier Equation

Step 1

Page 13: The Solution of Non-Linier Equation

Step 2

( ) ( )

( )( )( ) ( )

)()().(

afbf

abbfbc

xfxf

xxxfxx

xx

xf

xx

xf

ul

uluur

ur

u

lr

l

−−=

−−=

−=

Page 14: The Solution of Non-Linier Equation

Step 3

Page 15: The Solution of Non-Linier Equation

Step 4( ) ( )

( )( )( ) ( )

)()().(

afbf

abbfbc

xfxf

xxxfxx

xx

xf

xx

xf

ul

uluur

ur

u

lr

l

−−=

−−=

−=

Page 16: The Solution of Non-Linier Equation

Step 5

Page 17: The Solution of Non-Linier Equation
Page 18: The Solution of Non-Linier Equation
Page 19: The Solution of Non-Linier Equation
Page 20: The Solution of Non-Linier Equation
Page 21: The Solution of Non-Linier Equation
Page 22: The Solution of Non-Linier Equation
Page 23: The Solution of Non-Linier Equation
Page 24: The Solution of Non-Linier Equation
Page 25: The Solution of Non-Linier Equation

Bisection Method

Page 26: The Solution of Non-Linier Equation

Theorem

x

f(x)

xu x

An equation f(x)=0, where f(x) is a real continuous function, has at least one root between xl and xu if f(xl) f(xu) < 0.

Figure 1 At least one root exists between the two points if the function is real, continuous, and changes sign.

Basis of Bisection Method

http://numericalmethods.eng.usf.edu

Page 27: The Solution of Non-Linier Equation

Basis of Bisection Method

x

f(x)

xu x

Figure 2 If function does not change sign between two points, roots of the equation may still exist between the two points.

( )xf

( ) 0=xf

http://numericalmethods.eng.usf.edu

Page 28: The Solution of Non-Linier Equation

Basis of Bisection Method

x

f(x)

xu x

Figure 3 If the function does not change sign between two points, there may not be any roots for the equation between the two points.

x

f(x)

xu

x

( )xf

( ) 0=xf

http://numericalmethods.eng.usf.edu

Page 29: The Solution of Non-Linier Equation

Basis of Bisection Method

x

f(x)

xu x

http://numericalmethods.eng.usf.edu

Figure 4 If the function changes sign between two points, more than one root for the equation may exist between the two points.

( )xf

( ) 0=xf

Page 30: The Solution of Non-Linier Equation

Step 1

http://numericalmethods.eng.usf.edu

Choose x and xu as two guesses for the root such that f(x) f(xu) < 0, or in other words, f(x) changes sign between x and xu. This was demonstrated in Figure 1.

x

f(x)

xu x

Figure 1

Page 31: The Solution of Non-Linier Equation

Step 2

http://numericalmethods.eng.usf.edu

x

f(x)

xu x

xm

Estimate the root, xm of the equation f (x) = 0 as the midpoint between x and xu as

xx

m = xu +

2

Figure 5 Estimate of xm

Page 32: The Solution of Non-Linier Equation

Step 3

http://numericalmethods.eng.usf.edu

Now check the following

a) If , then the root lies between x and xm;

then x = x ; xu = xm.

b) If , then the root lies between xm and xu;

then x = xm; xu = xu.

c) If ; then the root is xm. Stop the algorithm

if this is true.

( ) ( ) 0ml xfxf

( ) ( ) 0ml xfxf

( ) ( ) 0=ml xfxf

Page 33: The Solution of Non-Linier Equation

Step 4

http://numericalmethods.eng.usf.edu

xx

m = xu +

2

100−

=new

m

old

m

new

ax

xxm

root of estimatecurrent =new

mx

root of estimate previous=old

mx

Find the new estimate of the root

Find the absolute relative approximate error

where

Page 34: The Solution of Non-Linier Equation

Step 5

http://numericalmethods.eng.usf.edu

Is ?

Yes

No

Go to Step 2 using new upper and lower

guesses.

Stop the algorithm

Compare the absolute relative approximate error with the pre-specified error tolerance .

a

s

sa

Note one should also check whether the number of iterations is more than the maximum number of iterations allowed. If so, one needs to terminate the algorithm and notify the user about it.

Page 35: The Solution of Non-Linier Equation
Page 36: The Solution of Non-Linier Equation
Page 37: The Solution of Non-Linier Equation
Page 38: The Solution of Non-Linier Equation
Page 39: The Solution of Non-Linier Equation
Page 40: The Solution of Non-Linier Equation
Page 41: The Solution of Non-Linier Equation
Page 42: The Solution of Non-Linier Equation

Tugas Penyelesaian Persamaan Non Linier

1. 2x3-2x-5 = 0, interval [1,2]

4. (x-2)2- lnx = 0, interval [1,2]

Cari akar akar persamaan non linier dibawah dengan menggunakan

metode regula falsi dan biseksi

0 ,1 ,0

0sin3)(

1010 ==

=−+=

ffxx

exxxf x2.

3. 5sin2x - 8 cos5x = 0, interval [0.5, 1.5]