Question #17175

Use all programming techniques that you have learnt so far, approximate the root of f(x) = x3 - 3 with the bisection method starting with the interval [1, 2] and use εstep = 0.1 and εabs = 0.1.

Write a flowchart for your design.

Hints:

Initial Requirement:

We have an initial bound [a, b] on the root, that is, f(a) and (b) have opposite signs.

Iteration Process:

Given the interval [a, b], define c = (a + b)/2. Then

•if f(c) = 0 (unlikely in practice), then halt, as we have found a root,.

•if f(c) and f(a) have opposite signs, then a root must lie on [a, c], so assign b = c,.

•else f(c) and f(b) must have opposite signs, and thus a root must lie on [c, b], so assign a = c..

Halting Conditions:

There are three conditions which may cause the iteration process to halt:

1.As indicated, if f(c) = 0..

2.We halt if both of the following conditions are met: ◦The width of the interval (after the assignment) is sufficiently small, that is b - a < εstep, and.

◦The function evaluated at one of the end point |f(a)| or |f(b)| < εabs..

.

If we halt due to Condition 1, we state that c is our approximation to the root. If we halt according to Condition 2, we choose either a or b, depending on whether |f(a)| < |f(b)| or |f(a)| > |f(b)|, respectively.

Write a flowchart for your design.

Hints:

Initial Requirement:

We have an initial bound [a, b] on the root, that is, f(a) and (b) have opposite signs.

Iteration Process:

Given the interval [a, b], define c = (a + b)/2. Then

•if f(c) = 0 (unlikely in practice), then halt, as we have found a root,.

•if f(c) and f(a) have opposite signs, then a root must lie on [a, c], so assign b = c,.

•else f(c) and f(b) must have opposite signs, and thus a root must lie on [c, b], so assign a = c..

Halting Conditions:

There are three conditions which may cause the iteration process to halt:

1.As indicated, if f(c) = 0..

2.We halt if both of the following conditions are met: ◦The width of the interval (after the assignment) is sufficiently small, that is b - a < εstep, and.

◦The function evaluated at one of the end point |f(a)| or |f(b)| < εabs..

.

If we halt due to Condition 1, we state that c is our approximation to the root. If we halt according to Condition 2, we choose either a or b, depending on whether |f(a)| < |f(b)| or |f(a)| > |f(b)|, respectively.

Expert's answer

Unfortunately, your question requires a lot of work and cannot be done for free.

Submit it with all requirements as an assignment to our control panel and we'll assist you.

Learn more about our help with Assignments: C#

## Comments

## Leave a comment