Mata Kuliah : Metode NumerikοΏ½Minggu ke 4
Mahasiswa dapat melakukan komputasi dalam menemukan akar suatu persamaan dengan pendekatan False Position dan Newton Raphson
Tujuan perkuliahan
Regula Falsiβs Basic
Algorithm
1 Iteration
Β
Example
π(π₯)=π₯^3β0.165π₯^2+3.993Γ10^(β4)=0
With maximal three iteration or relative error of 5%
Example
Example
Find π₯_π=π₯_π’βπ(π₯_π’ ) (π₯_π’βπ₯_π)/(π(π₯_π’ )βπ(π₯_π ) )
=0,11β(β0,0002662)β(0,11β0)/(β0,0002662β0,0003993)=0,066
Check sign and change value check sign
π(π₯_π )=β0,000032 (the sign is plus, same as π(π₯_π)
therefore the new π₯_π’=π₯_π=0,0066
Example
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
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 |
Secantβs Basic
Newton Raphsonβs Basic
Β
Algorithm
1 Iteration
Set a guess for the root (π₯_0) and
derivate π(π₯) so we have πβ²(π₯)
Find new root π₯_(π+1)=π₯_πβπ(π₯_π )/(π^β² (π₯_π ) ) or
Calculate error, check tolerance
If error>tolerance and iteration<max iteration then
go to step 2 else stop
Example
π(π₯)=π₯^3β0.165π₯^2+3.993Γ10^(β4)=0
With maximal three iteration or relative error of 5%
Example
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οΏ½
Find
π₯_1=π₯_0βπ(π₯_0 )/(π^β² (π₯_0 ) )
π₯_1=0,1β(β0,0002507)/(β0.003)=0,016433
Example
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
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 |
THANK YOU
FOR YOUR ATTENTION