1 of 17

Mata Kuliah : Metode NumerikοΏ½Minggu ke 4

2 of 17

Mahasiswa dapat melakukan komputasi dalam menemukan akar suatu persamaan dengan pendekatan False Position dan Newton Raphson

Tujuan perkuliahan

3 of 17

Regula Falsi’s Basic

  • Very much Like Bisection but it converge faster
  • Getting a boost/brand new calculation for root

4 of 17

Algorithm

1 Iteration

Β 

5 of 17

Example

  • Finding roots of

𝑓(π‘₯)=π‘₯^3βˆ’0.165π‘₯^2+3.993Γ—10^(βˆ’4)=0

With maximal three iteration or relative error of 5%

6 of 17

Example

  • Β 

7 of 17

Example

  • Step 2

Find π‘₯_π‘š=π‘₯_π‘’βˆ’π‘“(π‘₯_𝑒 ) (π‘₯_π‘’βˆ’π‘₯_𝑙)/(𝑓(π‘₯_𝑒 )βˆ’π‘“(π‘₯_𝑙 ) )

=0,11βˆ’(βˆ’0,0002662)βˆ™(0,11βˆ’0)/(βˆ’0,0002662βˆ’0,0003993)=0,066

  • Step 3

Check sign and change value check sign

𝑓(π‘₯_π‘š )=βˆ’0,000032 (the sign is plus, same as 𝑓(π‘₯_𝑙)

therefore the new π‘₯_𝑒=π‘₯_π‘š=0,0066

8 of 17

Example

  • Step 4

Calculate relative error or check max iteration

Since this is 1st iteration, so it wont have a relative error

Since max iteration is three (3) and its still 1st iteration so we back to step 1

9 of 17

Example

error

0

0,11

0,000399

-0,00027

0,066

-3,2E-05

0

0,066

0,000399

-3,2E-05

0,061111111

1,13E-05

0,08

0,06111111

0,066

1,13E-05

-3,2E-05

0,062390277

-1,1E-07

0,020503

0,06111111

0,062390277

1,13E-05

-1,1E-07

0,062377619

-3,3E-10

0,000203

0,06111111

0,062377619

1,13E-05

-3,3E-10

0,062377582

-9,9E-13

6E-07

0,06111111

0,062377582

1,13E-05

-9,9E-13

0,062377582

-2,9E-15

1,77E-09

0,06111111

0,062377582

1,13E-05

-2,9E-15

0,062377582

-8,6E-18

5,25E-12

0,06111111

0,062377582

1,13E-05

-8,6E-18

0,062377582

0

1,54E-14

10 of 17

Secant’s Basic

  • Using gradient as direction
  • One starting point

11 of 17

Newton Raphson’s Basic

  • Using gradient as direction
  • One starting point
  • Have to know the derivative

Β 

12 of 17

Algorithm

1 Iteration

  • Step 1

Set a guess for the root (π‘₯_0) and

derivate 𝑓(π‘₯) so we have 𝑓′(π‘₯)

  • Step 2

Find new root π‘₯_(𝑛+1)=π‘₯_π‘›βˆ’π‘“(π‘₯_𝑛 )/(𝑓^β€² (π‘₯_𝑛 ) ) or

  • Step 3

Calculate error, check tolerance

  • Step 4

If error>tolerance and iteration<max iteration then

go to step 2 else stop

13 of 17

Example

  • Finding roots of

𝑓(π‘₯)=π‘₯^3βˆ’0.165π‘₯^2+3.993Γ—10^(βˆ’4)=0

With maximal three iteration or relative error of 5%

14 of 17

Example

  • Step 1

Lets assume the value of π‘₯_0=0,1

then 𝑓(π‘₯_0 )=𝑓(0,1)=γ€–0,1γ€—^3βˆ’0,165(0,1)^2+3,993Γ—10^(βˆ’4)=βˆ’0,0002507

〖𝑓(π‘₯)=π‘₯γ€—^3βˆ’0,165π‘₯^2+3,993Γ—10^(βˆ’4) then 𝑓^β€² (π‘₯)=3π‘₯^2βˆ’0,330π‘₯

so 𝑓^β€² (π‘₯_0 )=𝑓^β€² (0,1)=3(0,1)^2βˆ’0,333(0,1)=βˆ’0,003οΏ½

  • Step 2

Find

π‘₯_1=π‘₯_0βˆ’π‘“(π‘₯_0 )/(𝑓^β€² (π‘₯_0 ) )

π‘₯_1=0,1βˆ’(βˆ’0,0002507)/(βˆ’0.003)=0,016433

15 of 17

Example

  • Step 3

Calculate relative error or check max iteration

Since this is 1st iteration, so it wont have a relative error

Since max iteration is three (3) and its still 1st iteration so we back to step 2

16 of 17

Example

n

error

0

0,1

-0,0002507

-0,003

-

1

0,016433

0,000359179

-0,004612837

5,085193

2

0,094298

-0,000229392

-0,004441903

0,825731

3

0,042656

0,000176694

-0,008617854

1,210688

4

0,063159

-6,94879E-06

-0,008875298

0,324629

5

0,062376

1,4524E-08

-0,008911786

0,012552

17 of 17

THANK YOU

FOR YOUR ATTENTION