Comparing Convergence Of False Position And Bisection Methods Engineering Essay

Explain with example that rate of convergence of fake position method is faster than that of the bisection method.

Introduction

False position method

In numerical evaluation, the wrong position method or regula falsi method is a root-finding algorithm that combines features from the bisection method and the secant method.

The method:

The first two iterations of the wrong position method. The red curve shows the function f and the blue lines are the secants.

Like the bisection method, the phony position method starts off with two points a0 and b0 in a way that f(a0) and f(b0) are of other signs, which implies by the intermediate value theorem that the function f has a main in the period [a0, b0], presuming continuity of the function f. The technique proceeds by producing a collection of shrinking intervals [ak, bk] that all contain a root of f.

At iteration amount k, the number

is computed. As discussed below, ck is the root of the secant line through (ak, f(ak)) and (bk, f(bk)). If f(ak) and f(ck) have the same sign, then we place ak+1 = ck and bk+1 = bk, in any other case we established ak+1 = ak and bk+1 = ck. This process is repeated until the root is approximated sufficiently well.

The above solution is also used in the secant method, however the secant method always retains the previous two computed tips, while the phony position method keeps two details which certainly bracket a main. On the other hand, the only difference between the wrong position method and the bisection method is that the last mentioned uses ck = (ak + bk) / 2.

Bisection method

In mathematics, the bisection method is a root-finding algorithm which consistently bisects an interval then selects a subinterval in which a root must lie for further processing. It is a very simple and strong method, but it is also relatively sluggish.

The method does apply when we wish to solve the equation for the scalar adjustable x, where f is a continuous function.

The bisection method requires two initial factors a and b in a way that f(a) and f(b) have opposite signs. This is called a bracket of your root, for by the intermediate value theorem the continuous function f will need to have at least one root in the interval (a, b). The method now divides the interval in two by processing the midpoint c = (a+b) / 2 of the interval. Unless c is itself a root--which is very unlikely, but possible--there are now two choices: either f(a) and f(c) have opposite signals and bracket a root, or f(c) and f(b) have other signs or symptoms and bracket a main. We select the subinterval that is a bracket, and apply the same bisection step to it. In this manner the interval that may contain a zero of f is reduced in width by 50% at each step. We continue until we've a bracket sufficiently small for our purposes. That is similar to the computer knowledge Binary Search, where in fact the range of possible solutions is halved each iteration.

Explicitly, if f(a) f(c) < 0, then your method places c as the new value for b, and if f(b) f(c) < 0, then your method pieces c as the new a. In both cases, the new f(a) and f(b) have contrary signs, so the method is applicable to this smaller interval. A practical execution of the method must guard against the uncommon occurrence that the midpoint is definitely a remedy.

Advantages and downsides of the bisection method

Advantages of Bisection Method

The bisection method is always convergent. Because the method brackets the main, the technique is assured to converge.

As iterations are conducted, the interval gets halved. So one can guarantee the reduction in the problem in the perfect solution is of the equation.

Drawbacks of Bisection Method

The convergence of bisection method is sluggish as it is merely based on halving the period.

If one of the initial guesses is nearer to the root, it will take larger variety of iterations to reach the root.

If a function is so that it just details the x-axis (Amount 3. 8) such as

it will be unable to find the lower guess, , and top figure, , such that

For functions where there's a singularity and it reverses indication at the singularity, bisection method may converge on the singularity (Physique 3. 9).

An example include

and, are valid primary guesses which satisfy

.

However, the function is not constant and the theorem a root exists is also not suitable.

Figure. 3. 8. Function has an individual root at that can't be bracketed.

Figure. 3. 9. Function has no root but changes indication.

Explanation

Source code for Bogus position method:

Example code of False-position method

C code was written for clearness rather than efficiency. It was designed to solve the same problem as resolved by the Newton's method and secant method code: to find the positive amount x where cos(x) = x3. This issue is altered into a root-finding problem of the proper execution f(x) = cos(x) - x3 = 0.

#include <stdio. h>

#include <math. h>

double f(double x)

 

return cos(x) - x*x*x;

 

double FalsiMethod(dual s, dual t, dual e, int m)

 

int n, part=0;

double r, fr, fs = f(s), ft = f(t);

for (n = 1; n <= m; n++)

 

r = (fs*t - foot*s) / (fs - foot);

if (fabs(t-s) < e*fabs(t+s)) chance;

fr = f(r);

if (fr * ft > 0)

 

t = r; foot = fr;

if (part==-1) fs /= 2;

side = -1;

 

else if (fs * fr > 0)

 

s = r; fs = fr;

if (side==+1) feet /= 2;

side = +1;

 

else break in the action;

 

return r;

 

int main(void)

 

printf("%0. 15f\n", FalsiMethod(0, 1, 5E-15, 100));

return 0;

 

After jogging this code, the final answer is about 0. 865474033101614

Example 1

Consider finding the root of f(x) = x2 - 3. Let step = 0. 01, stomach muscles = 0. 01 and begin with the period [1, 2].

Table 1. False-position method put on f(x) = x2 - 3.

a

b

f(a)

f(b)

c

f(c)

Update

Step Size

1. 0

2. 0

-2. 00

1. 00

1. 6667

-0. 2221

a = c

0. 6667

1. 6667

2. 0

-0. 2221

1. 0

1. 7273

-0. 0164

a = c

0. 0606

1. 7273

2. 0

-0. 0164

1. 0

1. 7317

0. 0012

a = c

0. 0044

Thus, with the third iteration, we note that the last step 1 1. 7273 ' 1. 7317 is less than 0. 01 and |f(1. 7317)| < 0. 01, and for that reason we chose b = 1. 7317 to be our approximation of the root.

Note that after three iterations of the false-position method, we've a satisfactory answer (1. 7317 where f(1. 7317) = -0. 0044) whereas with the bisection method, it took seven iterations to discover a (well known less correct) acceptable answer (1. 71344 where f(1. 73144) = 0. 0082)

Example 2

Consider locating the reason behind f(x) = e-x(3. 2 sin(x) - 0. 5 cos(x)) on the interval [3, 4], this time with step = 0. 001, stomach muscles = 0. 001.

Table 2. False-position method applied to f(x) = e-x(3. 2 sin(x) - 0. 5 cos(x)).

a

b

f(a)

f(b)

c

f(c)

Update

Step Size

3. 0

4. 0

0. 047127

-0. 038372

3. 5513

-0. 023411

b = c

0. 4487

3. 0

3. 5513

0. 047127

-0. 023411

3. 3683

-0. 0079940

b = c

0. 1830

3. 0

3. 3683

0. 047127

-0. 0079940

3. 3149

-0. 0021548

b = c

0. 0534

3. 0

3. 3149

0. 047127

-0. 0021548

3. 3010

-0. 00052616

b = c

0. 0139

3. 0

3. 3010

0. 047127

-0. 00052616

3. 2978

-0. 00014453

b = c

0. 0032

3. 0

3. 2978

0. 047127

-0. 00014453

3. 2969

-0. 000036998

b = c

0. 0009

Thus, following the sixth iteration, we remember that the ultimate step, 3. 2978 ' 3. 2969 has a size significantly less than 0. 001 and |f(3. 2969)| < 0. 001 and therefore we chose b = 3. 2969 to be our approximation of the main.

In this case, the solution we found was not as good as the solution we found using the bisection method (f(3. 2963) = 0. 000034799) however, we only used six rather than eleven iterations.

Source code for Bisection method

#include<stdio. h>

#include<math. h>

#define epsilon 1e-6

main()

 

double g1, g2, g, v, v1, v2, dx;

int found, converged, i;

found=0;

printf(" type in the first figure\n");

scanf("%lf", &g1);

v1=g1*g1*g1-15;

printf("value 1 is %lf\n", v1);

while (found==0)

 

printf("enter the second think\n");

scanf("%lf", &g2);

v2=g2*g2*g2-15;

printf(" value 2 is %lf\n", v2);

if (v1*v2>0)

found=0;

else

found=1;

 

printf("right figure\n");

i=1;

while (converged==0)

 

printf("\n iteration=%d\n", i);

g=(g1+g2)/2;

printf("new think is %lf\n", g);

v=g*g*g-15;

printf("new value is%lf\n", v);

if (v*v1>0)

 

g1=g;

printf("another think is %lf\n", g);

dx=(g1-g2)/g1;

 

else

 

g2=g;

printf("another figure is %lf\n", g);

dx=(g1-g2)/g1;

 

if (fabs(dx)'less than' epsilon

converged=1;

i=i+1;

 

printf("\nth determined value is %lf\n", v);

 

Example 1

Consider locating the root of f(x) = x2 - 3. Let step = 0. 01, ab muscles = 0. 01 and begin with the period [1, 2].

Table 1. Bisection method put on f(x) = x2 - 3.

a

b

f(a)

f(b)

c = (a + b)/2

f(c)

Update

new b  ' a

1. 0

2. 0

-2. 0

1. 0

1. 5

-0. 75

a = c

0. 5

1. 5

2. 0

-0. 75

1. 0

1. 75

0. 062

b = c

0. 25

1. 5

1. 75

-0. 75

0. 0625

1. 625

-0. 359

a = c

0. 125

1. 625

1. 75

-0. 3594

0. 0625

1. 6875

-0. 1523

a = c

0. 0625

1. 6875

1. 75

-0. 1523

0. 0625

1. 7188

-0. 0457

a = c

0. 0313

1. 7188

1. 75

-0. 0457

0. 0625

1. 7344

0. 0081

b = c

0. 0156

1. 71988/td>

1. 7344

-0. 0457

0. 0081

1. 7266

-0. 0189

a = c

0. 0078

Thus, with the 7th iteration, we note that the final interval, [1. 7266, 1. 7344], has a width significantly less than 0. 01 and |f(1. 7344)| < 0. 01, and for that reason we chose b = 1. 7344 to be our approximation of the root.

Example 2

Consider finding the root of f(x) = e-x(3. 2 sin(x) - 0. 5 cos(x)) on the period [3, 4], this time with step = 0. 001, washboard abs = 0. 001.

Table 1. Bisection method put on f(x) = e-x(3. 2 sin(x) - 0. 5 cos(x)).

a

b

f(a)

f(b)

c = (a + b)/2

f(c)

Update

new b  ' a

3. 0

4. 0

0. 047127

-0. 038372

3. 5

-0. 019757

b = c

0. 5

3. 0

3. 5

0. 047127

-0. 019757

3. 25

0. 0058479

a = c

0. 25

3. 25

3. 5

0. 0058479

-0. 019757

3. 375

-0. 0086808

b = c

0. 125

3. 25

3. 375

0. 0058479

-0. 0086808

3. 3125

-0. 0018773

b = c

0. 0625

3. 25

3. 3125

0. 0058479

-0. 0018773

3. 2812

0. 0018739

a = c

0. 0313

3. 2812

3. 3125

0. 0018739

-0. 0018773

3. 2968

-0. 000024791

b = c

0. 0156

3. 2812

3. 2968

0. 0018739

-0. 000024791

3. 289

0. 00091736

a = c

0. 0078

3. 289

3. 2968

0. 00091736

-0. 000024791

3. 2929

0. 00044352

a = c

0. 0039

3. 2929

3. 2968

0. 00044352

-0. 000024791

3. 2948

0. 00021466

a = c

0. 002

3. 2948

3. 2968

0. 00021466

-0. 000024791

3. 2958

0. 000094077

a = c

0. 001

3. 2958

3. 2968

0. 000094077

-0. 000024791

3. 2963

0. 000034799

a = c

0. 0005

Thus, after the 11th iteration, we remember that the final interval, [3. 2958, 3. 2968] has a width significantly less than 0. 001 and |f(3. 2968)| < 0. 001 and for that reason we decided to go with b = 3. 2968 to be our approximation of the root.

Convergence Rate

Why don't we always utilize incorrect position method?

There are times it may converge very, very little by little.

Example:

What other methods can we use?

Comparison of rate of convergence for bisection and false-position method


  • More than 7,000 students prefer us to work on their projects
  • 90% of customers trust us with more than 5 assignments
Special
price
£5
/page
submit a project

Latest posts

Read more informative topics on our blog
Shiseido Company Limited Is A Japanese Makeup Company Marketing Essay
Marketing Strength: Among the main talents of Shiseido is its high quality products. To be able to satisfy customers, the company invested a great deal...
Fail To Plan You Plan To Fail Management Essay
Management This report will concentrate on two aspects of project management, their importance within the overall project management process. The report...
Waste To Prosperity Program Environmental Sciences Essay
Environmental Sciences Urban and rural regions of India produce very much garbage daily and hurting by various kinds of pollutions which are increasing...
Water POLLUTING OF THE ENVIRONMENT | Analysis
Environmental Studies Pollution Introduction Many people across the world can remember having walked on the street and seen smoke cigars in the air or...
Soft System Methodology
Information Technology Andrzej Werner Soft System Methodology can be described as a 7-step process aimed to help provide a solution to true to life...
Strategic and Coherent methods to Recruiting management
Business Traditionally HRM has been regarded as the tactical and coherent method of the management of the organizations most appreciated assets - the...
Enterprise Rent AN AUTOMOBILE Case Analysis Business Essay
Commerce With a massive network of over 6,000 local rental locations and 850,000 automobiles, Organization Rent-A-Car is the greatest rental car company...
The Work OF ANY Hotels Front Office Staff Travel and leisure Essay
Tourism When in a hotel there are careers for everyone levels where in fact the front office manager job and responsibilities,assistant professionals...
Strategy and international procedures on the Hershey Company
Marketing The Hershey Company was incorporated on October 24, 1927 as an heir to an industry founded in 1894 by Milton S. Hershey fiscal interest. The...
Check the price
for your project
we accept
Money back
guarantee
100% quality