Metode prediktor–korektor: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
Tidak ada ringkasan suntingan |
Tidak ada ringkasan suntingan |
||
Baris 86:
2.0000 3.0735
=====metode Trapesium-Euler====
a=1;b=2;h=0.1;t01=0.0001;
y=1;xy=[a y];
for t=a+h:h:b,
y0=y+h*t*sqrt(y);y1=y0;
y2=y+h*(t*sqrt(y)+(t+h)*sqrt(y1))/2;
while abs(y2-y1)>=t01,
y1=y2;y2=y+h*(t*sqrt(y)+(t+h)*sqrt(y1))/2;
end
xy=[xy; t y2];y=y2;end
xy
xy =
1.0000 1.0000
1.1000 1.1185
1.2000 1.2547
1.3000 1.4107
1.4000 1.5883
1.5000 1.7899
1.6000 2.0176
1.7000 2.2741
1.8000 2.5619
1.9000 2.8837
2.0000 3.2426
# Elemen 3
|