• Tidak ada hasil yang ditemukan

Slide TSP303 Analisis Numerik Pemrograman TSP 303 P3

N/A
N/A
Protected

Academic year: 2017

Membagikan "Slide TSP303 Analisis Numerik Pemrograman TSP 303 P3"

Copied!
24
0
0

Teks penuh

(1)

a home base to excellence

Metode Terbuka

(Open Methods)

Pertemuan - 3

Mata Kuliah : Analisis Numerik dan Pemrograman Kode : TSP – 303

(2)

a home base to excellence

• TIU :

 Mahasiswa dapat mencari akar-akar suatu persamaan, menyelesaikan persamaan aljabar linear, pencocokan kurva, dan membuat program aplikasi analisis numeriknya

• TIK :

(3)

a home base to excellence

• Sub Pokok Bahasan :

 Simple Fixed-Point Iteration

 Metode Newton-Raphson

 Metode Secant

(4)

a home base to excellence

• For the bracketing methods, the root is located within an interval prescribed by a lower and an upper bound.

• Repeated application of these methods always results in closer estimates of the true value of the root.

• Such methods are said to be convergent because they move closer to the truth as the computation

progresses

• In contrast, the open methods are based on formulas that require only a single starting value of x or two

(5)

a home base to excellence

• As such, they

sometimes diverge or move away from the

true root as the

computation

progresses (Fig. b).

• However, when the

open methods

(6)

a home base to excellence

Simple Fixed-Point Iteration

• Open methods employ a formula to predict the root.

• Such a formula can be developed for simple fixed-point iteration (or, as it is also called,

one-point iteration or successive substitution) by rearranging the function f(x)=0 so that x is on the left-hand side of the equation:

(7)

a home base to excellence

• This transformation can be accomplished

either by algebraic manipulation or by simply adding x to both sides of the original

(8)

a home base to excellence

• The utility of Eq. (1) is that it provides a formula to predict a new value of x as a function of an old value of x.

• Thus, given an initial guess at the root xi, Eq. (1) can be used to compute a new estimate xi+1 as expressed by the iterative formula

x

i+1

=

g

(

x

i

)

(2)

• the approximate error for this equation can be determined using the error estimator

(9)

a home base to excellence

Example 1 :

Use simple fixed-point iteration to locate the root of f(x)=e−xx

The function can be separated directly and expressed in the form

(10)

a home base to excellence

• Starting with an initial guess of x0=0, this

iterative equation can be applied to compute

Iteration xi g(xi) a (%) t (%)

0 0 1

1 1 0,36788 100 2

3 4 5 6 7 8 9 10

the true value of

(11)

a home base to excellence

The Newton-Raphson Method

• Perhaps the most widely used of all root-locating formulas is the Newton-Raphson equation.

• If the initial guess at the root is xi, a tangent can be extended from the point [xi, f(xi)].

(12)

a home base to excellence

• the first derivative at x is equivalent to the slope

• Which can be rearranged to yield Newton-Raphson formula :

(13)

a home base to excellence

Example 2 :

Use the Newton-Raphson method to estimate the root of f(x)=e−xx, employing an initial

guess of x0 = 0

The first derivative of the function can be evaluated as

f(x = −e− − , hi h can be substituted along with the original function into Eq. (3) to give

(14)

a home base to excellence

• Starting with an initial guess of x0=0, this iterative equation can be applied to compute

Iterasi xi f(x i) f /(xi)a (%) t (%)

1 0 1 -2

2 0,5 0,1065 -1,607 3 0,5663 0,0013 -1,568 4

5

the true value of

(15)

a home base to excellence

• Although the Newton-Raphson method is often very efficient, there are situations where it performs poorly.

Fig. a depicts the case where an inflection

point [that is, f’’ = ] o urs in the i init

of a root.

Fig. b illustrates the tendency of the Newton-Raphson technique to oscillate around a local maximum or minimum.

Fig. c shows how an initial guess that is close to one root can jump to a location several roots away.

• O iousl , a zero slope [f’ = ] is trul a

(16)

a home base to excellence

The Secant Method

• A potential problem in implementing the

Newton-Raphson method is the evaluation of the derivative.

• Although this is not inconvenient for polynomials and many other functions, there are certain functions whose derivatives may be extremely difficult or inconvenient to evaluate.

• For these cases, the derivative can be

(17)
(18)

a home base to excellence

• Equation (4) is the formula for the secant method.

• Notice that the approach requires two initial estimates of x.

• However, because f(x) is not required to

(19)

a home base to excellence

Example 3 :

Use the Secant method to estimate the root of f(x)=exx, employing an initial guess of x0 = 0

Start with initial estimates of x1 =0 and x0= 1.0.

Iteration xi-1 xi x i+1 f(x i-1) f(x i)a(%)

0 0 1 0,6127 1 -0,632

1 1 0,6127 0,5638 -0,632 -0,071 -8,666 2

(20)

a home base to excellence

The Difference Between the Secant and False-Position Methods

• The Eqs. Above are identical on a term-by-term basis. • Both use two initial estimates to compute an

approximation of the slope of the function that is used to project to the x axis for a new estimate of the root.

• However, a critical difference between the methods is how one of the initial values is replaced by the new estimate.

   

(21)

a home base to excellence

• Recall that in the false-position method the latest estimate of the root replaces

whichever of the original values yielded a function value with the same sign as f(xr).

• Consequently, the two estimates always bracket the root.

• Therefore, the method always converges

• In contrast, the secant method replaces the values in strict sequence, with the new

value xi+1 replacing xi and xi replacing xi− .

• As a result, the two values can sometimes lie on the same side of the root.

(22)

a home base to excellence

Homework

(23)

a home base to excellence

Homework

(24)

a home base to excellence

Homework

Gambar

Fig. a depicts the case where an inflection

Referensi

Dokumen terkait

Dengan Hormat kami sampaikan bahwa pelaksanaan Layanan Pengadaan Secara Elektronik (LPSE) di Kota Batu sejak Tanggal 20 April 2017 Pukul 014.00 WIB sudah normal

Redenominasi pada dasarnya dilakukan dengan tujuan untuk menyederhanakan, mengingat pecahan uang rupiah saat ini jumlah digitnya terlalu banyak sehingga akan dapat

Metode MPKP yang digunakan di BP RSUD Temanggung menggunakan pendekatan Modifikasi Keperawatan Primer, yaitu menggunakan 5 (lima) subsistem yang terdiri dari : nilai- nilai

masalah yang ada dalam soal yang diberikan 1x Siswa menulis hal-hal yang tidak sesuai dengan soal dan tidak dapat dipertanggung- jawabkan Siswa menulis hal-hal yang

Demikian pengumuman ini disampaikan untuk diketahui dan atas perhatiannya diucapkan terima kasih.. Makassar, 1 Juli

EFFECTS OF DRYING AND ENSILING METHODS ON CYANIDES CONTENTS AND CHEMICAL COMPONENTS OF CASSAVA ROOTS AND STEMSB. Purnomoadi 2 1 Department of Agriculture, Municipal of

Penelitian terdahulu menemukan bahwa variabel kualitas jasa (service quality) bukan hanya berpenga- ruh secara langsung (direct) terhadap variabel loyali- tas pelanggan (Anderson

Parental nurturance and support have been linked to an array of positive developmental outcomes, including the moral characteristics of conscience and moral reasoning and