1-misol. Ushbu x4–x3–2x2+3x–3 = 0 tenglamaning ildizlarini analitik yo‘l bilan ajrating va uning ildizlaridan birini ε = 0,01 aniqlik bilan kesmani teng ikkiga bo‘lish usulidan foydalanib toping.
67
Yechish. Yuqorida 3-misolda biz bu tenglamaning ikkita haqiqiy ildizi mavjudligini, ular x1[–2; –1]; x2[1; 2] kesmalarda yotganligini aniqlagan edik. Ushbu tenglamaning, masalan x1[–2; –1] oraliqdagi haqiqiy ildizini ε = 0,01 aniqlikda topaylik. Barcha hisoblashlar natijalarini jadval ko‘rinishida ifodalaymiz:
n
|
a
n
|
b
n
|
xn = an bn
2
|
f (xn )
|
0
1
2
3
4
5
6
7
|
–2,00
–2,00
–1,75
–1,75
–1,75
–1,75
–1,75
–1,74
|
–1,00
–1,50
–1,50
–1,63
–1,69
–1,72
–1,73
–1,73
|
–1,50
–1,75
–1,63
–1,69
–1,72
–1,73
–1,74
|
–3,5625
0,3633
–1,8140
–0,7981
–0,2363
–0,0406
0,1592
|
Javob: x1 ≈ –1,73. Ikkinchi ildizni ham xuddi shunday topish mumkin.
2.13-rasm. Kesmani teng ikkiga bo‘lish usulining blok-sxemasi.
68
Yuqoridagi hisoblashlarni bajarish uchun Maple dasturining ushbu Numerical- Analysis paketiga murojaat qilamiz:
# Paketga murojaat qilish
with(Student[NumericalAnalysis]):
# Funsiyaning berilishi
f:= x4–x3–2x2+3x–3;
# Funksiyaning grafigini chizish (2.14-rasn)
plot(f , x=–2..2);
# Tenglamaning ildizlari
solve(f);
# Tenglama ildizlarining o‘nli kasr ko‘rinishi 2.14-rasn.
# Biseksiya funsiyasiga murojaat va uning natijasi
Bisection (f , x = [–2, –1], tolerance = 0.0005);
–1.731933594
# Usulning hisob qadamlaridagi intervallar
Bisection(f, x=[–2, –1], tolerance=0.0005, output=sequence);
[–2,. –1], [–2., –1.500000000], [–1.750000000, –1.500000000], [–1.750000000,
–1.625000000], ], [–1.750000000, –1.687500000], [–1.750000000, –1.718750000],
[–1.734375000, –1.718750000], [–1.734375000, –1.726562500], [–1.734375000,
–1.730468750], [–1.732421875, –1.730468750], [–1.732421875, –1.731445312]
# Approksimatsiya kriteriyasi bo‘yicha iteratsiyalarning to‘xtashi natijasi
Bisection(f, x=[–2, –1], tolerance=0.0005, stoppingcriterion=absolute);
–1.731933594
# Kesmani teng ikkiga bo‘lish jarayonining grafigi va animatsiyaning bosh- lang‘ich holati (2.15,a-rasm)
Bisection(f, x=[–2, –1], output=animation, tolerance=0.0005, stoppingcriterion=function_value);
# Kesmani teng ikkiga bo‘lish jarayonining grafigi va animatsiyaning oxirgi holati (2.15,b-rasm)
Bisection(f, x=[–2, –1], output=animation, tolerance=0.0005, maxiterations=10, stoppingcriterion=relative);
69
a b
2.15-rasm. Kesmani teng ikkiga bo‘lish jarayonining grafigi va animatsiyasi.
# Usul hisobining har bir qadami bo‘yicha natijalarning jadval ko‘rinishidagi ifodasi
Roots(f, x=[–2, –1], method=bisection, tolerance=0.01, output=information);
Do'stlaringiz bilan baham: |