SlideShare a Scribd company logo
1 of 33
PERSAMAAN
DIFERENSIAL
(DIFFERENTIAL EQUATION)
metode euler
metode runge-kutta
Persamaan Diferensial
• Persamaan paling penting dalam bidang
rekayasa, paling bisa menjelaskan apa yang
terjadi dalam sistem fisik.
• Menghitung jarak terhadap waktu dengan
kecepatan tertentu, 50 misalnya.
50=
dt
dx
Rate equations
Persamaan Diferensial
• Solusinya, secara analitik dengan integral,
• C adalah konstanta integrasi
• Artinya, solusi analitis tersebut terdiri dari
banyak ‘alternatif’
• C hanya bisa dicari jika mengetahui nilai x
dan t. Sehingga, untuk contoh di atas, jika
x(0) = (x saat t=0) = 0, maka C = 0
∫∫ = dtdx 50 Ctx += 50
Klasifikasi Persamaan Diferensial
Persamaan yang mengandung turunan dari
satu atau lebih variabel tak bebas, terhadap
satu atau lebih variabel bebas.
• Dibedakan menurut:
– Tipe (ordiner/biasa atau parsial)
– Orde (ditentukan oleh turunan tertinggi yang
ada
– Liniarity (linier atau non-linier)
PDO
Pers.dif. Ordiner = pers. yg mengandung
sejumlah tertentu turunan ordiner dari satu
atau lebih variabel tak bebas terhadap satu
variabel bebas.
y(t) = variabel tak bebas
t = variabel bebas
dan turunan y(t)
Pers di atas: ordiner, orde dua, linier
t
ety
dt
tdy
t
dt
tyd
=++ )(5
)()(
2
2
PDO
• Dinyatakan dalam 1 peubah dalam
menurunkan suatu fungsi
• Contoh:
kPPkP
dt
dP
xyx
dx
dy
=>−=
=>−=
'
sin'sin
Partial Differential Equation
• Jika dinyatakan dalam lebih dari 1 peubah, disebut
sebagai persamaan diferensial parsial
• Pers.dif. Parsial mengandung sejumlah tertentu
turunan dari paling tidak satu variabel tak bebas
terhadap lebih dari satu variabel bebas.
• Banyak ditemui dalam persamaan transfer polutan
(adveksi, dispersi, diffusi)
0
),(),(
2
2
2
2
=+
t
txy
x
txy
δ
δ
δ
δ
PDO
x
eyy
dt
sd
yy
=−
−=
=+
3)'(
32
24'''
2
2
2
Ordiner, linier, orde 3
Ordiner, linier, orde 2
Ordiner, non linier, orde 1
Solusi persamaan diferensial
• Secara analitik, mencari solusi persamaan
diferensial adalah dengan mencari fungsi
integral nya.
• Contoh, untuk fungsi pertumbuhan secara
eksponensial, persamaan umum:
kP
dt
dP
=
Rate equations
But what you really want to know is…
the sizes of the boxes (or state variables) and how they
change through time
That is, you want to know:
the state equations
There are two basic ways of finding the state equations
for the state variables based on your known rate
equations:
1) Analytical integration
2) Numerical integration
Suatu kultur bakteria tumbuh dengan
kecepatan yang proporsional dengan
jumlah bakteria yang ada pada setiap
waktu. Diketahui bahwa jumlah bakteri
bertambah menjadi dua kali lipat setiap 5
jam. Jika kultur tersebut berjumlah satu
unit pada saat t = 0, berapa kira-kira
jumlah bakteri setelah satu jam?
• Jumlah bakteri menjadi dua kali lipat setiap 5 jam, maka k
= (ln 2)/5
• Jika P0 = 1 unit, maka setelah satu jam…
Solusi persamaan diferensial
kP
dt
dP
=
dtk
P
dP
t
t
P
P
∫∫ =
1
0
1
0
)(ln 0
0
ttCk
P
P
−=
kt
ePtP 0)( =
)(1)1(
)1)(
5
)2(ln(
eP =
1487.1=
Rate equation State equation(dsolve in Maple)
The Analytical Solution of the Rate Equation
is the State Equation
There are very few models in
ecology that can be solved
analytically.
Solusi Numerik
• Numerical integration
– Eulers
– Runge-Kutta
Numerical integration makes use of this relationship:
Which you’ve seen before…
Relationship between continuous and discrete time models
*You used this relationship in Lab 1 to program the
logistic rate equation in Visual Basic:
1where,11 =∆∆





−+=+ tt
K
N
rNNN t
ttt
t
dt
dy
yy ttt ∆+≈∆+
, known
Fundamental Approach of Numerical Integration
y = f(t), unknown
∆t, specified
y
t
yt, known
dt
dy
yt+∆t, estimated
t
dt
dy
yy ttt ∆+≈∆+
yt+∆t,
unknown
Euler’s Method: yt+ ∆t ≈ yt + dy
/dt ∆t
1where,1 =∆∆





−+=∆+ tt
K
N
rNNN t
tttt
dt
dN
Calculate dN/dt*1
at Nt
Add it to Nt to
estimate Nt+ ∆t
Nt+ ∆t becomes the new Nt
Calculte dN/dt * 1 at new Nt
Use dN/dt to estimate next Nt+ ∆t
Repeat these steps to estimate the state
function over your desired time length
(here 30 years)
Nt/K with time, lambda = 1.7, time step = 1
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
0 10 20 30 40 50
time (years)
Nt/K
Example of Numerical Integration
dy
dt
y y= −6 007 2
.
Analytical solution to dy/dt
Y0 = 10
∆ t = 0.5
point to
estimate
y
Euler’s Method: yt+ ∆t ≈ yt + dy
/dt ∆t
yt = 10
m1 = dy/dt at yt
m1 = 6*10-.007*(10)2
∆y = m1*∆t
yest= yt + ∆y
∆ t = 0.5
∆y
estimated y(t+ ∆t)
analytical y(t+ ∆t)
dy
dt
y y= −6 007 2
.
Runge-Kutta Example
dy
dt
y y= −6 007 2
.
∆ t = 0.5
point to
estimate
Problem: estimate the slope to
calculate ∆y
∆y
Runge-Kutta Example
yt
W
eighted average of > 1 slope
Unknown point to
estimate, yt+Δt
½ Δt Δtt
estimated yt+Δt
estimated yt+Δt
estimated yt+Δt
∆ t = 0.5
Uses the derivative, dy/dt, to calculate 4 slopes (m1…m4)
within Δt:
Runge-Kutta, 4th order
),(
)2/,2/(
)2/,2/(
),(
34
23
12
1
tmyttm
tmyttfm
tmyttfm
ytfm
∆+∆+=
∆+∆+′=
∆+∆+′=
′=
),(atderivative),( ytytf =′
tmmmmyy ttt ∆++++=∆+ )22(
6
1
4321
These 4 slopes are used to calculate a weighted slope of the
state function between t and t + Δt, which is used to estimate
yt+ Δt:
y
Step 1:
Evaluate slope at current value of state
variable.
y0 = 10
m1 = dy/dt at y0
m1 = 6*10-.007*(10)2
m1 = 59.3
m1=slope 1
y0
Step 2:
A) Calculate y1at t +∆t/2 using m1.
B) Evaluate slope at y1.
A) y1 = y0 + m1* ∆t /2
y1 = 24.82
B) m2 = dy/dt at y1
m2 = 6*24.8-.007*(24.8)2
m2 = 144.63 m2=slope 2
∆ t = 0.5/2
y1
Step 3:
Calculate y2 at t +∆t/2 using k2.
Evaluate slope at y2.
y2 = y0 + k2* ∆t /2
y2 = 46.2
k3 = dy/dt at y2
k3 = 6*46.2-.007*(46.2)2
k3 = 263.0
k3 = slope 3
∆ t = 0.5/2
y2
Step 4:
Calculate y3 at t +∆t using k3.
Evaluate slope at y3.
y3 = y0 + k3* ∆t
y3 =141.5
k4 = dy/dt at y3
k4 = 6*141.0-.007*(141.0)2
k4 = 706.9
k4 = slope 4
∆ t = 0.5
y2
y3
m4 = slope 4
∆ t = 0.5
m3 = slope3
m2 = slope 2
m1 = slope 1
Now you have 4 calculations of the slope of the state equation
between t and t+Δt
Step 5:
Calculate weighted slope.
Use weighted slope to estimate y at t +∆t
∆ t = 0.5
weighted slope =
true value
estimated value
weighted slope
tmmmmyy ttt ∆++++=∆+ )22(
6
1
4321
)22(
6
1
4321 mmmm +++
Conclusions
• 4th order Runge-Kutta offers
substantial improvement over
Eulers.
• Both techniques provide estimates,
not “true” values.
• The accuracy of the estimate
depends on the size of the step used
in the algorithm.
Runge-Kutta
Analytical
Eulers

More Related Content

What's hot

Persamaan differensial part 1
Persamaan differensial part 1Persamaan differensial part 1
Persamaan differensial part 1Jamil Sirman
 
Nilai Egien Dan Vektor Eigen
Nilai Egien Dan Vektor EigenNilai Egien Dan Vektor Eigen
Nilai Egien Dan Vektor EigenRizky Wulansari
 
DERET PANGKAT & METODE DERET PANGKAT
DERET PANGKAT & METODE DERET PANGKATDERET PANGKAT & METODE DERET PANGKAT
DERET PANGKAT & METODE DERET PANGKATyuni dwinovika
 
Contoh soal dan penyelesaian metode biseksi
Contoh soal dan penyelesaian metode biseksiContoh soal dan penyelesaian metode biseksi
Contoh soal dan penyelesaian metode biseksimuhamadaulia3
 
Transformasi Laplace (bag.1)
Transformasi Laplace (bag.1)Transformasi Laplace (bag.1)
Transformasi Laplace (bag.1)Heni Widayani
 
Transformasi Fourier Waktu Kontinyu
Transformasi Fourier Waktu KontinyuTransformasi Fourier Waktu Kontinyu
Transformasi Fourier Waktu Kontinyuyusufbf
 
Medan elektromagnetik 2
Medan elektromagnetik 2Medan elektromagnetik 2
Medan elektromagnetik 2sinta novita
 
Modul persamaan diferensial 1
Modul persamaan diferensial 1Modul persamaan diferensial 1
Modul persamaan diferensial 1Maya Umami
 
persamaan-diferensial-orde-ii
persamaan-diferensial-orde-iipersamaan-diferensial-orde-ii
persamaan-diferensial-orde-iiFaried Doank
 
Transformasi Laplace
Transformasi LaplaceTransformasi Laplace
Transformasi LaplaceYosefh Gultom
 
Sistem LTI Waktu Kontinyu
Sistem LTI Waktu KontinyuSistem LTI Waktu Kontinyu
Sistem LTI Waktu Kontinyuyusufbf
 
Penyelesaian sistem persamaan linear dengan metode iterasi gauss seidel
Penyelesaian sistem persamaan linear dengan metode iterasi gauss seidelPenyelesaian sistem persamaan linear dengan metode iterasi gauss seidel
Penyelesaian sistem persamaan linear dengan metode iterasi gauss seidelBAIDILAH Baidilah
 
Persamaan Diferensial [orde-2]
Persamaan Diferensial [orde-2]Persamaan Diferensial [orde-2]
Persamaan Diferensial [orde-2]Bogor
 
Integral Tak Wajar ( Kalkulus 2 )
Integral Tak Wajar ( Kalkulus 2 )Integral Tak Wajar ( Kalkulus 2 )
Integral Tak Wajar ( Kalkulus 2 )Kelinci Coklat
 
Slide week 1b deret fourier & transformasi fourier
Slide week 1b   deret fourier & transformasi fourierSlide week 1b   deret fourier & transformasi fourier
Slide week 1b deret fourier & transformasi fourierBeny Nugraha
 
Teorema green dalam bidang
Teorema green dalam bidangTeorema green dalam bidang
Teorema green dalam bidangokti agung
 

What's hot (20)

Persamaan differensial part 1
Persamaan differensial part 1Persamaan differensial part 1
Persamaan differensial part 1
 
Nilai Egien Dan Vektor Eigen
Nilai Egien Dan Vektor EigenNilai Egien Dan Vektor Eigen
Nilai Egien Dan Vektor Eigen
 
DERET PANGKAT & METODE DERET PANGKAT
DERET PANGKAT & METODE DERET PANGKATDERET PANGKAT & METODE DERET PANGKAT
DERET PANGKAT & METODE DERET PANGKAT
 
Contoh soal dan penyelesaian metode biseksi
Contoh soal dan penyelesaian metode biseksiContoh soal dan penyelesaian metode biseksi
Contoh soal dan penyelesaian metode biseksi
 
Transformasi Laplace (bag.1)
Transformasi Laplace (bag.1)Transformasi Laplace (bag.1)
Transformasi Laplace (bag.1)
 
Transformasi Fourier Waktu Kontinyu
Transformasi Fourier Waktu KontinyuTransformasi Fourier Waktu Kontinyu
Transformasi Fourier Waktu Kontinyu
 
Medan elektromagnetik 2
Medan elektromagnetik 2Medan elektromagnetik 2
Medan elektromagnetik 2
 
Interpolasi linier
Interpolasi linierInterpolasi linier
Interpolasi linier
 
Modul persamaan diferensial 1
Modul persamaan diferensial 1Modul persamaan diferensial 1
Modul persamaan diferensial 1
 
persamaan-diferensial-orde-ii
persamaan-diferensial-orde-iipersamaan-diferensial-orde-ii
persamaan-diferensial-orde-ii
 
Transformasi Laplace
Transformasi LaplaceTransformasi Laplace
Transformasi Laplace
 
Parametric Equations
Parametric EquationsParametric Equations
Parametric Equations
 
Kalkulus modul limit fungsi
Kalkulus modul limit fungsiKalkulus modul limit fungsi
Kalkulus modul limit fungsi
 
Sistem LTI Waktu Kontinyu
Sistem LTI Waktu KontinyuSistem LTI Waktu Kontinyu
Sistem LTI Waktu Kontinyu
 
Penyelesaian sistem persamaan linear dengan metode iterasi gauss seidel
Penyelesaian sistem persamaan linear dengan metode iterasi gauss seidelPenyelesaian sistem persamaan linear dengan metode iterasi gauss seidel
Penyelesaian sistem persamaan linear dengan metode iterasi gauss seidel
 
Persamaan Diferensial [orde-2]
Persamaan Diferensial [orde-2]Persamaan Diferensial [orde-2]
Persamaan Diferensial [orde-2]
 
Metode newton
Metode newtonMetode newton
Metode newton
 
Integral Tak Wajar ( Kalkulus 2 )
Integral Tak Wajar ( Kalkulus 2 )Integral Tak Wajar ( Kalkulus 2 )
Integral Tak Wajar ( Kalkulus 2 )
 
Slide week 1b deret fourier & transformasi fourier
Slide week 1b   deret fourier & transformasi fourierSlide week 1b   deret fourier & transformasi fourier
Slide week 1b deret fourier & transformasi fourier
 
Teorema green dalam bidang
Teorema green dalam bidangTeorema green dalam bidang
Teorema green dalam bidang
 

Similar to Metode Numerik Persamaan Diferensial

Matematika Diskrit - 11 kompleksitas algoritma - 03
Matematika Diskrit - 11 kompleksitas algoritma - 03Matematika Diskrit - 11 kompleksitas algoritma - 03
Matematika Diskrit - 11 kompleksitas algoritma - 03KuliahKita
 
Penyelesaian Raytracing dengan Bantuan Inversi Simulated Annealing
Penyelesaian Raytracing dengan Bantuan Inversi Simulated AnnealingPenyelesaian Raytracing dengan Bantuan Inversi Simulated Annealing
Penyelesaian Raytracing dengan Bantuan Inversi Simulated AnnealingFajar Perdana
 
Modul ajar dsp_2020-bab_4_sistem linear time invariant
Modul ajar dsp_2020-bab_4_sistem linear time invariantModul ajar dsp_2020-bab_4_sistem linear time invariant
Modul ajar dsp_2020-bab_4_sistem linear time invariantTri Budi Santoso
 
1 dimension and unit
1 dimension and unit1 dimension and unit
1 dimension and unitGalih Suryono
 
document_BESARAN,_DIMENSI,SATUAN_VEKTOR1.pptx
document_BESARAN,_DIMENSI,SATUAN_VEKTOR1.pptxdocument_BESARAN,_DIMENSI,SATUAN_VEKTOR1.pptx
document_BESARAN,_DIMENSI,SATUAN_VEKTOR1.pptxciptawati112233
 
3 Besaran dan vektor.ppt
3 Besaran dan vektor.ppt3 Besaran dan vektor.ppt
3 Besaran dan vektor.pptmaszaky1069
 
Kalkulus diferensial integral
Kalkulus diferensial integralKalkulus diferensial integral
Kalkulus diferensial integraldwiprananto
 
slide pengukuran besaran fisis (1).ppt
slide pengukuran besaran fisis (1).pptslide pengukuran besaran fisis (1).ppt
slide pengukuran besaran fisis (1).pptZAHRAH ARRA
 
Slide-TSP102-Kalkulus-TSP-102-P12dasaspdf
Slide-TSP102-Kalkulus-TSP-102-P12dasaspdfSlide-TSP102-Kalkulus-TSP-102-P12dasaspdf
Slide-TSP102-Kalkulus-TSP-102-P12dasaspdfArisWidyoNugroho
 

Similar to Metode Numerik Persamaan Diferensial (20)

Matematika Diskrit - 11 kompleksitas algoritma - 03
Matematika Diskrit - 11 kompleksitas algoritma - 03Matematika Diskrit - 11 kompleksitas algoritma - 03
Matematika Diskrit - 11 kompleksitas algoritma - 03
 
Penyelesaian Raytracing dengan Bantuan Inversi Simulated Annealing
Penyelesaian Raytracing dengan Bantuan Inversi Simulated AnnealingPenyelesaian Raytracing dengan Bantuan Inversi Simulated Annealing
Penyelesaian Raytracing dengan Bantuan Inversi Simulated Annealing
 
Modul ajar dsp_2020-bab_4_sistem linear time invariant
Modul ajar dsp_2020-bab_4_sistem linear time invariantModul ajar dsp_2020-bab_4_sistem linear time invariant
Modul ajar dsp_2020-bab_4_sistem linear time invariant
 
Komputasi Numerik
Komputasi NumerikKomputasi Numerik
Komputasi Numerik
 
1 dimension and unit
1 dimension and unit1 dimension and unit
1 dimension and unit
 
Integral
IntegralIntegral
Integral
 
Diferensial
DiferensialDiferensial
Diferensial
 
materi fisika dasar
materi fisika dasarmateri fisika dasar
materi fisika dasar
 
Kuliah dinamika-lengkap
Kuliah dinamika-lengkapKuliah dinamika-lengkap
Kuliah dinamika-lengkap
 
K9 stasioneritas ok
K9 stasioneritas okK9 stasioneritas ok
K9 stasioneritas ok
 
document_BESARAN,_DIMENSI,SATUAN_VEKTOR1.pptx
document_BESARAN,_DIMENSI,SATUAN_VEKTOR1.pptxdocument_BESARAN,_DIMENSI,SATUAN_VEKTOR1.pptx
document_BESARAN,_DIMENSI,SATUAN_VEKTOR1.pptx
 
KALKULUS_1.ppt
KALKULUS_1.pptKALKULUS_1.ppt
KALKULUS_1.ppt
 
3 Besaran dan vektor.ppt
3 Besaran dan vektor.ppt3 Besaran dan vektor.ppt
3 Besaran dan vektor.ppt
 
kalkulus2
kalkulus2kalkulus2
kalkulus2
 
1. Sinyal.ppt
1. Sinyal.ppt1. Sinyal.ppt
1. Sinyal.ppt
 
Kalkulus diferensial integral
Kalkulus diferensial integralKalkulus diferensial integral
Kalkulus diferensial integral
 
slide pengukuran besaran fisis (1).ppt
slide pengukuran besaran fisis (1).pptslide pengukuran besaran fisis (1).ppt
slide pengukuran besaran fisis (1).ppt
 
Teknik pengintegralan
Teknik pengintegralanTeknik pengintegralan
Teknik pengintegralan
 
Slide-TSP102-Kalkulus-TSP-102-P12dasaspdf
Slide-TSP102-Kalkulus-TSP-102-P12dasaspdfSlide-TSP102-Kalkulus-TSP-102-P12dasaspdf
Slide-TSP102-Kalkulus-TSP-102-P12dasaspdf
 
Job4
Job4Job4
Job4
 

More from artyudy

Keramik temperatur tinggi (refractory ceramics)
Keramik temperatur tinggi (refractory ceramics)Keramik temperatur tinggi (refractory ceramics)
Keramik temperatur tinggi (refractory ceramics)artyudy
 
Pengujian tidak merusak sound level measurement
Pengujian tidak merusak sound level measurementPengujian tidak merusak sound level measurement
Pengujian tidak merusak sound level measurementartyudy
 
Pengujian tidak merusak utrasonic testing
Pengujian tidak merusak  utrasonic testingPengujian tidak merusak  utrasonic testing
Pengujian tidak merusak utrasonic testingartyudy
 
Diferensiasi numerik x
Diferensiasi numerik xDiferensiasi numerik x
Diferensiasi numerik xartyudy
 
Ac impedance measurement oleh wahyudin
Ac impedance measurement oleh wahyudin Ac impedance measurement oleh wahyudin
Ac impedance measurement oleh wahyudin artyudy
 
Presentasi STATISTIKA
Presentasi STATISTIKAPresentasi STATISTIKA
Presentasi STATISTIKAartyudy
 
Metrologi pengukuran
Metrologi pengukuranMetrologi pengukuran
Metrologi pengukuranartyudy
 
Makalah bahan komposit new
Makalah bahan komposit newMakalah bahan komposit new
Makalah bahan komposit newartyudy
 
Linier polarization resistance oleh wahyudin
Linier polarization resistance oleh wahyudin Linier polarization resistance oleh wahyudin
Linier polarization resistance oleh wahyudin artyudy
 
Open circuit potential (ocp) decay oleh wahyudin
Open circuit potential (ocp) decay oleh wahyudin Open circuit potential (ocp) decay oleh wahyudin
Open circuit potential (ocp) decay oleh wahyudin artyudy
 
Linier polarization resistance oleh wahyudin
Linier polarization resistance oleh wahyudin Linier polarization resistance oleh wahyudin
Linier polarization resistance oleh wahyudin artyudy
 
Coating & wrapping wahyu
Coating & wrapping wahyuCoating & wrapping wahyu
Coating & wrapping wahyuartyudy
 

More from artyudy (13)

Keramik temperatur tinggi (refractory ceramics)
Keramik temperatur tinggi (refractory ceramics)Keramik temperatur tinggi (refractory ceramics)
Keramik temperatur tinggi (refractory ceramics)
 
Pengujian tidak merusak sound level measurement
Pengujian tidak merusak sound level measurementPengujian tidak merusak sound level measurement
Pengujian tidak merusak sound level measurement
 
Pengujian tidak merusak utrasonic testing
Pengujian tidak merusak  utrasonic testingPengujian tidak merusak  utrasonic testing
Pengujian tidak merusak utrasonic testing
 
Diferensiasi numerik x
Diferensiasi numerik xDiferensiasi numerik x
Diferensiasi numerik x
 
Ac impedance measurement oleh wahyudin
Ac impedance measurement oleh wahyudin Ac impedance measurement oleh wahyudin
Ac impedance measurement oleh wahyudin
 
Presentasi STATISTIKA
Presentasi STATISTIKAPresentasi STATISTIKA
Presentasi STATISTIKA
 
Metrologi pengukuran
Metrologi pengukuranMetrologi pengukuran
Metrologi pengukuran
 
Makalah bahan komposit new
Makalah bahan komposit newMakalah bahan komposit new
Makalah bahan komposit new
 
Linier polarization resistance oleh wahyudin
Linier polarization resistance oleh wahyudin Linier polarization resistance oleh wahyudin
Linier polarization resistance oleh wahyudin
 
Open circuit potential (ocp) decay oleh wahyudin
Open circuit potential (ocp) decay oleh wahyudin Open circuit potential (ocp) decay oleh wahyudin
Open circuit potential (ocp) decay oleh wahyudin
 
Linier polarization resistance oleh wahyudin
Linier polarization resistance oleh wahyudin Linier polarization resistance oleh wahyudin
Linier polarization resistance oleh wahyudin
 
Coating & wrapping wahyu
Coating & wrapping wahyuCoating & wrapping wahyu
Coating & wrapping wahyu
 
WAHYU
WAHYUWAHYU
WAHYU
 

Metode Numerik Persamaan Diferensial

  • 2. Persamaan Diferensial • Persamaan paling penting dalam bidang rekayasa, paling bisa menjelaskan apa yang terjadi dalam sistem fisik. • Menghitung jarak terhadap waktu dengan kecepatan tertentu, 50 misalnya. 50= dt dx
  • 3.
  • 5. Persamaan Diferensial • Solusinya, secara analitik dengan integral, • C adalah konstanta integrasi • Artinya, solusi analitis tersebut terdiri dari banyak ‘alternatif’ • C hanya bisa dicari jika mengetahui nilai x dan t. Sehingga, untuk contoh di atas, jika x(0) = (x saat t=0) = 0, maka C = 0 ∫∫ = dtdx 50 Ctx += 50
  • 6. Klasifikasi Persamaan Diferensial Persamaan yang mengandung turunan dari satu atau lebih variabel tak bebas, terhadap satu atau lebih variabel bebas. • Dibedakan menurut: – Tipe (ordiner/biasa atau parsial) – Orde (ditentukan oleh turunan tertinggi yang ada – Liniarity (linier atau non-linier)
  • 7. PDO Pers.dif. Ordiner = pers. yg mengandung sejumlah tertentu turunan ordiner dari satu atau lebih variabel tak bebas terhadap satu variabel bebas. y(t) = variabel tak bebas t = variabel bebas dan turunan y(t) Pers di atas: ordiner, orde dua, linier t ety dt tdy t dt tyd =++ )(5 )()( 2 2
  • 8. PDO • Dinyatakan dalam 1 peubah dalam menurunkan suatu fungsi • Contoh: kPPkP dt dP xyx dx dy =>−= =>−= ' sin'sin
  • 9. Partial Differential Equation • Jika dinyatakan dalam lebih dari 1 peubah, disebut sebagai persamaan diferensial parsial • Pers.dif. Parsial mengandung sejumlah tertentu turunan dari paling tidak satu variabel tak bebas terhadap lebih dari satu variabel bebas. • Banyak ditemui dalam persamaan transfer polutan (adveksi, dispersi, diffusi) 0 ),(),( 2 2 2 2 =+ t txy x txy δ δ δ δ
  • 10. PDO x eyy dt sd yy =− −= =+ 3)'( 32 24''' 2 2 2 Ordiner, linier, orde 3 Ordiner, linier, orde 2 Ordiner, non linier, orde 1
  • 11. Solusi persamaan diferensial • Secara analitik, mencari solusi persamaan diferensial adalah dengan mencari fungsi integral nya. • Contoh, untuk fungsi pertumbuhan secara eksponensial, persamaan umum: kP dt dP =
  • 13. But what you really want to know is… the sizes of the boxes (or state variables) and how they change through time That is, you want to know: the state equations There are two basic ways of finding the state equations for the state variables based on your known rate equations: 1) Analytical integration 2) Numerical integration
  • 14. Suatu kultur bakteria tumbuh dengan kecepatan yang proporsional dengan jumlah bakteria yang ada pada setiap waktu. Diketahui bahwa jumlah bakteri bertambah menjadi dua kali lipat setiap 5 jam. Jika kultur tersebut berjumlah satu unit pada saat t = 0, berapa kira-kira jumlah bakteri setelah satu jam?
  • 15. • Jumlah bakteri menjadi dua kali lipat setiap 5 jam, maka k = (ln 2)/5 • Jika P0 = 1 unit, maka setelah satu jam… Solusi persamaan diferensial kP dt dP = dtk P dP t t P P ∫∫ = 1 0 1 0 )(ln 0 0 ttCk P P −= kt ePtP 0)( = )(1)1( )1)( 5 )2(ln( eP = 1487.1=
  • 16. Rate equation State equation(dsolve in Maple) The Analytical Solution of the Rate Equation is the State Equation
  • 17. There are very few models in ecology that can be solved analytically.
  • 18. Solusi Numerik • Numerical integration – Eulers – Runge-Kutta
  • 19. Numerical integration makes use of this relationship: Which you’ve seen before… Relationship between continuous and discrete time models *You used this relationship in Lab 1 to program the logistic rate equation in Visual Basic: 1where,11 =∆∆      −+=+ tt K N rNNN t ttt t dt dy yy ttt ∆+≈∆+
  • 20. , known Fundamental Approach of Numerical Integration y = f(t), unknown ∆t, specified y t yt, known dt dy yt+∆t, estimated t dt dy yy ttt ∆+≈∆+ yt+∆t, unknown
  • 21. Euler’s Method: yt+ ∆t ≈ yt + dy /dt ∆t 1where,1 =∆∆      −+=∆+ tt K N rNNN t tttt dt dN Calculate dN/dt*1 at Nt Add it to Nt to estimate Nt+ ∆t Nt+ ∆t becomes the new Nt Calculte dN/dt * 1 at new Nt Use dN/dt to estimate next Nt+ ∆t Repeat these steps to estimate the state function over your desired time length (here 30 years) Nt/K with time, lambda = 1.7, time step = 1 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0 10 20 30 40 50 time (years) Nt/K
  • 22. Example of Numerical Integration dy dt y y= −6 007 2 . Analytical solution to dy/dt Y0 = 10 ∆ t = 0.5 point to estimate
  • 23. y Euler’s Method: yt+ ∆t ≈ yt + dy /dt ∆t yt = 10 m1 = dy/dt at yt m1 = 6*10-.007*(10)2 ∆y = m1*∆t yest= yt + ∆y ∆ t = 0.5 ∆y estimated y(t+ ∆t) analytical y(t+ ∆t) dy dt y y= −6 007 2 .
  • 24. Runge-Kutta Example dy dt y y= −6 007 2 . ∆ t = 0.5 point to estimate Problem: estimate the slope to calculate ∆y ∆y
  • 25. Runge-Kutta Example yt W eighted average of > 1 slope Unknown point to estimate, yt+Δt ½ Δt Δtt estimated yt+Δt estimated yt+Δt estimated yt+Δt ∆ t = 0.5
  • 26. Uses the derivative, dy/dt, to calculate 4 slopes (m1…m4) within Δt: Runge-Kutta, 4th order ),( )2/,2/( )2/,2/( ),( 34 23 12 1 tmyttm tmyttfm tmyttfm ytfm ∆+∆+= ∆+∆+′= ∆+∆+′= ′= ),(atderivative),( ytytf =′ tmmmmyy ttt ∆++++=∆+ )22( 6 1 4321 These 4 slopes are used to calculate a weighted slope of the state function between t and t + Δt, which is used to estimate yt+ Δt:
  • 27. y Step 1: Evaluate slope at current value of state variable. y0 = 10 m1 = dy/dt at y0 m1 = 6*10-.007*(10)2 m1 = 59.3 m1=slope 1 y0
  • 28. Step 2: A) Calculate y1at t +∆t/2 using m1. B) Evaluate slope at y1. A) y1 = y0 + m1* ∆t /2 y1 = 24.82 B) m2 = dy/dt at y1 m2 = 6*24.8-.007*(24.8)2 m2 = 144.63 m2=slope 2 ∆ t = 0.5/2 y1
  • 29. Step 3: Calculate y2 at t +∆t/2 using k2. Evaluate slope at y2. y2 = y0 + k2* ∆t /2 y2 = 46.2 k3 = dy/dt at y2 k3 = 6*46.2-.007*(46.2)2 k3 = 263.0 k3 = slope 3 ∆ t = 0.5/2 y2
  • 30. Step 4: Calculate y3 at t +∆t using k3. Evaluate slope at y3. y3 = y0 + k3* ∆t y3 =141.5 k4 = dy/dt at y3 k4 = 6*141.0-.007*(141.0)2 k4 = 706.9 k4 = slope 4 ∆ t = 0.5 y2 y3
  • 31. m4 = slope 4 ∆ t = 0.5 m3 = slope3 m2 = slope 2 m1 = slope 1 Now you have 4 calculations of the slope of the state equation between t and t+Δt
  • 32. Step 5: Calculate weighted slope. Use weighted slope to estimate y at t +∆t ∆ t = 0.5 weighted slope = true value estimated value weighted slope tmmmmyy ttt ∆++++=∆+ )22( 6 1 4321 )22( 6 1 4321 mmmm +++
  • 33. Conclusions • 4th order Runge-Kutta offers substantial improvement over Eulers. • Both techniques provide estimates, not “true” values. • The accuracy of the estimate depends on the size of the step used in the algorithm. Runge-Kutta Analytical Eulers

Editor's Notes

  1. When you make a model in ecology, what usually happens is you make a box and arrow diagram
  2. And then decide how each of those boxes change…that is, the rates of input and output into and out of each box. And what you end up with is a bunch of rate equations
  3. And then decide how each of those boxes change…that is, the rates of input and output into and out of each box. And what you end up with is a bunch of rate equations
  4. If you are working with simple equations, such as the logistic, you can solve your known rate equation analytically to find the state equation and see how N changes over time with different parameter values
  5. In most cases your equation or system of equations will be too complicated to find an analytical solution. If this case we have to resort to numerical techniques to estimate the state equation
  6. Which estimates y(t + delta-t) by adding the rate equation dy/dt * change in time to the original, specified, value of y(t). Which you’ve seen before, primarily as the relationship between discrete and continuous time models…
  7. This relationship is the basis of numerical integration – that is using your known rate equation, dy/dt, to calculate the slope at y at t, which is specified, to estimate y at t+delta-t. The basic problem is that you don’t know the state equation but you want to know how y changes through time as a result of your known rate equation dy/dt. So you use the rate equation at a known point, here y at t, to find the slope of the state equation (or dy/dt) at y at t. You then use this slope, over the specified time interval, delta-t, to estimate the next point along the unknown state equation. In this case, that next point is y(t + delta-t)
  8. As I mentioned before, this is what you did when you used the logisitic rate equation to estimate points along the state function at a constant t step over a long time interval, so what I want to point out here is that this it is an iterative process. This method of numerical integration is called euler’s method, and is the simplest form of numerical integration. When delta t is small it works reasonably well but it is not always the best choice for estimating the state equation.
  9. And I will use this simple differential equation, for which there is a solution to demonstrate this idea. The main goal of any num int technique is to accurately estimate points along the unknown state function using the rate equation. Remember that we don’t really know the line, we only know its derivative. Line is there for illustration only. The line is the function whose derivative is given above.
  10. In many cases, when delta t is not very small, euler’s method does not give a very accurate or satisfying estimate of the true y (t+delta-t) because the slope at y at t does not estimate the change in y over delta-t accurately
  11. The challenge, then, is finding a slope that will more accurately estimate the change in y over delta-t to get a more accurate estimate of the point along the unknown state function – this is what runga kutta attempts to do. Remember that we don’t really know the line, we only know its derivative. Line is there for illustration only. The line is the function whose derivative is given above.
  12. If you have a relatively large delta-t and the slope of the unknown state function is not linear between t and t+delta t, the slope of the line may vary dramatically between t and t+delta-t So that using a single calculation of the slope of the state function at time between t and t + delta-t to estimate y(t+delta-t) might not give you a very good estimate the true value
  13. The fourth order runga kutta method is the most frequently used technique of numerical integration – it uses four calculations of the slope within the specified time step to more accurately represent the change in y, and therefore give a more accurate estimate of y at t+delta-t. Slope is calculated four times at t, ½ delta-t, and delta-t
  14. This slope is then used to calculate y1, which is the point along that line at ½ delta-t Dy/dt is then used to calculate the slope at y1
  15. Now you have 4 slopes, some of which are much steeper than the slope that would be needed to calculate f(t+delta-t) and some that are much less steep.
  16. All of these are used to calculate a weighted average slope of the state equation between t and t + delta t that is used to estimate y(t+delta-t) which results in a much more accurate estimate than techniques such as eulers.