The Bisection Method


The Bisection Method (cont.)



Download 263,5 Kb.
bet3/5
Sana26.04.2022
Hajmi263,5 Kb.
#583455
1   2   3   4   5
Bog'liq
fdocuments.in the-bisection-method

The Bisection Method (cont.)

  • Structure Diagram of the Bisection Algorithm:

The Bisection Method (cont.)

  • Example execution:
  • We will use a simple function to illustrate the execution of the Bisection Method
  • Function used:
  • Roots: √3 = 1.7320508... and −√3 = −1.7320508...
  • f(x) = x2 - 3

The Bisection Method (cont.)

  • We will use the starting interval [0..4] since:
  • The interval [0..4] contains a root because: sign of f(0) ≠ sign of f(4)
  • f(0) = 02 − 3 = −3
  • f(4) = 42 − 3 = 13

The Bisection Method (cont.)

  • Steps taken by the Bisection Method:
  • Iteration 1:
  • New interval: [0..2] (it contains √3 = 1.7320508.. !!!)

The Bisection Method (cont.)

  • Iteration 2:
  • New interval: [1..2] (it contains √3 = 1.7320508.. !!!)

The Bisection Method (cont.)

  • Iteration 3:
  • New interval: [1.5 .. 2] (it contains √3 = 1.7320508.. !!!)

The Bisection Method (cont.)

  • And so on
  • Result:

The Bisection Method (cont.)

  • Java program:
  • // Bisection Method - Solves: x^2 - 3 = 0
  • public class Bisection01
  • {
  • public static void main(String[] args)
  • {
  • final double epsilon = 0.00001;
  • double a, b, m, y_m, y_a;
  • a = 0; b = 4;
  • while ( (b-a) > epsilon )
  • {
  • m = (a+b)/2; // Mid point

Download 263,5 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish