NUMERICAL METHODS

41
+ RaE _ Ia Ish IL Rsh VL + _ Chapter I Introduction Background An electric generator is a device that converts mechanical energy to electrical energy. A generator forces electric charge (usually carried by electrons) to flow through an external electrical circuit. It is based on the principle of production of dynamically (or motionally) induced emf (Electromotive Force). Whenever a conductor cuts magnetic flux, dynamically induced emf is produced in it according to Faraday's Laws of Electromagnetic Induction. This emf causes a current to flow if the conductor circuit is closed. A shunt generator is a method of generating electricity in which field winding and armature winding are connected in parallel, and in which the armature supplies both the load current and the field current. In a shunt generator, the armature coils and the shunt field coils are connected in parallel. where: E = generated emf in the armature (volt) 1

description

NUMERICAL METHODS

Transcript of NUMERICAL METHODS

Page 1: NUMERICAL METHODS

+

Ra’

E

_

Ia Ish ILRshVL

+

_

Chapter I

Introduction

Background

An electric generator is a device that converts mechanical energy to electrical energy. A

generator forces electric charge (usually carried by electrons) to flow through an external electrical

circuit. It is based on the principle of production of dynamically (or motionally) induced emf

(Electromotive Force). Whenever a conductor cuts magnetic flux, dynamically induced emf is produced

in it according to Faraday's Laws of Electromagnetic Induction. This emf causes a current to flow if the

conductor circuit is closed.

A shunt generator is a method of generating electricity in which field winding and armature

winding are connected in parallel, and in which the armature supplies both the load current and the

field current.

In a shunt generator, the armature coils and the shunt field coils are connected in parallel.

where: E = generated emf in the armature (volt)

Ra’ = armature equivalent resistance (ohm)

Rsh = shunt field winding resistance (ohm)

VL = terminal voltage or load voltage (volt)

Ia = armature current (ampere)

1

Page 2: NUMERICAL METHODS

Ish = shunt field current (ampere)

IL = load current (ampere)

Pg = power developed or generated in the armature (watt)

PL = power delivered to the load (watt)

Applying Kirchoff’s Voltage and Current Laws to our circuit analysis, we obtain several

equations:

Engineering Problem Posed

A shunt generator is connected to a load that draws 28.8 kW. Ra = 0.04 Ω and Rsh = 48 Ω. If

the power developed in the armature is 106.3 % of the power delivered to the load. Determine the

terminal voltage of the generator.

Mathematical Analysis

2

I sh=V LR sh

(1)

I L=PLV L

(2)

I a=I sh+ I L (3)

Pg=E I a (4)

E=V L+ I aRa (5)

Engineering Problem Expressed Mathematically

Determine the terminal voltage (VL) of a shunt generator given that PL = 28.8 kW, Ra = 0.04 Ω, Rsh

= 48 Ω, and Pg = 1.063PL.

Page 3: NUMERICAL METHODS

Obtaining the unknown value in the problem requires different mathematical methods and in

order to obtain it, rearranging the sets of equations is done so as to arrive to what is asked in the

problem.

Analytical Solution

Starting with (3),

I a=I sh+ I L

Substitute (1) and (2) to (3),

I a=V LRsh

+PLV L

(6)

Then inserting (6) to (5),

E=V L+( V L

Rsh+PLV L

)Ra (7)

Finally, (6) and (7) to (4),

Pg=[V L+(V L

R sh+PLV L )Ra][ V LR sh+ PLV L

]Simplifying yields,

f (V L )=( R sh+RaR sh2 )V L4+(PL−Pg+ 2 PLRaR sh )V L

2+PL2 Ra (8)

3

Engineering Problem Expressed Mathematically

Determine the terminal voltage (VL) of a shunt generator given that PL = 28.8 kW, Ra = 0.04 Ω, Rsh

= 48 Ω, and Pg = 1.063PL.

Page 4: NUMERICAL METHODS

Substituting the values to (8),

f(VL) = ( 48+0.04482 )V L4+(28800−1.063(28800)+ 2 (28800 )(0.04)

48 )V L2+ (28800 )2(0.04)

f(VL) = ( 120157600 )V L4+(−1766.4 )V L

2+33177600; or

f(VL) = (0.02085069444 )V L4+(−1766.4 )V L

2+33177600

By quadratic formula,

VL12=

1766.4+√(−1766.4)2−4 ( 120157600 )(33177600)2( 120157600 )

= 56607.05216

VL1 =√V L 12 = 237.9223658

VL1 = 237.9223658

VL22=

1766.4−√(−1766.4)2−4( 120157600 )(33177600)2 ( 120157600 )

= 28109.55067

VL2 =√V L 12 = 167.659031

VL2 = 167.659031

Using VL1,

Therefore,

VL = 237.9223658 Volts

4

Page 5: NUMERICAL METHODS

CHAPTER II

Methods in Obtaining Roots of the Equation

Referring to Appendix A are the figures of the flowchart of the programs being

constructed for each methods of obtaining root of an equation, it follows a subroutine

procedure. The program contains a main class obtaining the necessary methods calling for

inputs, and subclasses (Bisection, False Position, Fixed Point Iteration, Newton Raphson,

Secant, Brent) which leads to the computation of the root using any method.

Bracketing Method

It comprises different methods which the roots may be found within the two initial

guesses which are typically changes the signs. The methods present here give strategies

which reduces the width of the bracket until the root will be found.

Bisection Method

It is called the binary chopping or the Bolzano’s method. A Bracketing method which

finds root of a given continuous function over an interval x l andxu such that f(x l) and f(xu)

will have an opposite signs that gives f(x l) f(xu) < 0. The method divides the interval in two

by computing the midpoint xr= (x l+xu)/2 of the interval. Either f(x l) and f(xr) or f(xr) and f(

xu) will have opposite signs and it brackets a root, we must select a subinterval within the

interval and apply the same bisection step. There will be a 50% of chance of getting a

function equals to zero. If f(x l) f(xr) < 0, then the method sets equal xu toxr , and if f(xu) f(xr)

5

Page 6: NUMERICAL METHODS

< 0, then the method sets x lequal to xr. For both cases, the new f(x l) and f(xu) will have

opposite signs, so that the method is applicable to this smaller interval.

The continuous function on the given interval [x l,xu ] and f(x l) f(xu) < 0 states that

the bisection converges to a root of the function and the true error is halved in each step

and the method converges linearly if f(x l) and f(xu) will have different signs. This method

gives only a range where the root exists and not the estimation where is the roots location.

The smallest bracket is where the root can be found. Its true error of n steps can be solved

by the equation;

False Position Method/Regula Falsi Method

It is also called the linear interpolation method. An alternative method based on the

graphical method. The false position method starts with a two points x l and xu such that the

functions f(x l) and f((xu ) will have an opposite signs then one of the end-points will converges

and the other will remain fixed for all the iterations function f a root. It is given by the

formula,

The root xr is from the graphical representation of joining the function f(x l) and f((xu )

by a straight line and which the point that intersects the line and the axis is the improve

root. The value of the root replaces f(x l) and f((xu ) with the same sign as f( xr¿¿ so that the

root is always at the interval of the two point x l and xu.

6

xr=xu−f ( xu ) (xu−x l)f (xl )− f (xu)

(2.2)

ε t=x l+ xu2

(2.1)

Page 7: NUMERICAL METHODS

The termination of the computation will be the same as the bisection method and

same as the algorithm, but the equation for finding xr is used. The error of the regula falsi is

more efficient for root finding than the bisection since one of the points will stay throughout

the computation and the others converges quickly and makes the approximate error

conservative.

Modified False Position Method

It is the remedy of being one-sided of the false position method. It divides the

function value that was stuck. The algorithm implements the strategies on how the counters

are used to determine the root when the one is bound stays fixed for the two iterations and

through this, the function value is bound halved.

It is more than the bisection and the false position method for setting the stopping

criterion as 1.01% since it gives only 12 iterations compare with the 14 and 25 of the

bisection and false position method.

Open Method

It composed of different methods that are based on the formulas that requires only a

single starting value of x or two starting values that do not necessarily bracket the root. It

may diverge or converges as the computation progresses.

Simple Fixed Point Method

It is also called the One-point iteration or the successive substitution method. It

rearranges the function f(x)=0 to x=g(x) It can be obtained by adding both sides a x of the

equation or by simply doing algebraic manipulation. The guess roots x i can be used to

estimate as x i+1 and can be expressed as x i+1=g(x).

7

Page 8: NUMERICAL METHODS

The convergence or the divergence of this method can be depicted graphically through its

behavior and structure or it can also be predicted by separating the it into two components

parts and the x values obtained by the intersections are the roots of the function f(x)=0.

The two-curve method also shows the convergence and the divergence of the simple fixed-

point method. To find for the approximate error of this method can be solve using this

formula,

Newton Raphson Method

The widely used for finding the root for approximations to the zeroes of a real valued

function. It converges quickly for the iterations which are near on the desired root. It also

detects and overcomes the convergences failure.

This method starts with an initial guess which is close to the true root, the given

function is approximated by its tangent line then computes the x-intercept of this tangent

line. This x-intercept will be the approximation to the function's root than the original guess,

and the method can be repeated. The formula for this method is given by

The termination of the Newton- Raphson method is the same as for computing the

other methods. The convergence depends on the accuracy of the initial guess root and the

nature of the problem.

Secant Method

8

ε a=( x i+1−xix i+1 )100% (2.3)

x i+1=x i+f (x i)f '(x i)

(2.4)

Page 9: NUMERICAL METHODS

It is an open method which assumes a function that can be approximately linear in

the region of interest. The formula for the needs two initial estimates of x but the f(x) is not

required to change the signs between the two estimates and is given by this equation,

The two values can sometimes lie on the same root and sometimes this can cause

the divergence. The convergence of this method is that the root is within the bracketing

which is the reason that it was compared with the false position method.

Modified Secant Position Method

This method uses an alternative approach which involves the fractional perturbation

of the independent variable to estimate the f’(x) instead of using the two arbitrary values.

The formula for the iteration is given by

Bairstow’s Method

It is a method that finds complex roots of a polynomial of a quadratic formula and

can be used for solving the root all kinds of a polynomial. It uses the Newton’s method to

adjust the coefficients u and v in the quadratic x2 + ux + v until its roots are also roots of the

polynomial being solved. The root can be found be found by dividing the polynomial by the

quadratic to eliminate the roots and then it can be repeated until the polynomial becomes

quadratic or linear and all roots will be determined. The values of u and v can be found by

picking the starting and repeating the Newton’s method in two dimensions until it

9

x i+1=x1−f (x i ) f ( xi−1−x i)f (x i−1−x i )−f (x i)

(2.5)

x i+1=x i−δ x i f (x i )

f (x i+δ x i )−f (x i ) (2.6)

Page 10: NUMERICAL METHODS

converges, for the quadratic equations of multiplicity higher than one it converges to that

factor is a linear and quadratic factors that have a small value which has real roots will tend

to diverge to infinity. To find for the zero of polynomial can be implemented with a

programming language.

Müller's method

A root finding method that solves for the root of the form f(x) = 0 of the single variable x and

a scalar function whenever there’s no information about the derivatives that exists. It’s the

generalizes the secant method but it uses three points of quadratic interpolation noted by as

xk, xk-1 and xk-2.The The parabola going through the three points (xk, f(xk)), (xk-1, f(xk-1))

and (xk-2, f(xk-2)) when

It can be written in the Newton form, where f[xk, xk-1] and f[xk, xk-1, xk-2] denote divided

differences ;

where;

Brent’s Method

It is a method that combines that bisection method, the secant method. The idea is

to use the secant method because they converge faster, but to fall back to the more robust

bisection method if necessary.

10

Page 11: NUMERICAL METHODS

Given a specific numerical tolerane δ, | δ | < | bk − bk − 1 |must hold and the results is

used in the iteration and if previous step is perform interpolation then the inequality gives |

δ | < | bk − 1 − bk − 2 |. Also, if the previous step used the bisection method, the inequality

must hold, otherwise the bisection method is performed and

the result used for the next iteration. If the previous step performed interpolation, then the

inequality is used instead. Most of the N2 iterations, where N

denotes the number of iterations for the bisection method, if the function f is well-behaved,

and this method will usually proceed by either inverse quadratic or linear interpolation, in

which case it will converge linearly.

`

11

Page 12: NUMERICAL METHODS

Chapter III

Source Code

The following are the listing for the source code of the different methods of obtaining

the root of the function.

Listing 1. Main Program

package es84;

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

int choice,answer;

do{

Scanner ee = new Scanner(System.in);

System.out.println("Choose a method for finding the root!");

System.out.println("1. Bisection" + "\n2. False Position" "\n3. Fixed Point"+ "\n4. Newton Raphson"+ "\n5. Secant"+ "\n6. Muller"+ "\n7. Bairstow");

choice = ee.nextInt();

if(choice==1){Bisection mark = new Bisection();

mark.bisection1();}

if(choice==2){FalsePosition mark = new FalsePosition();

mark.falseposition1();}

if(choice==3){FixedPoint mark = new FixedPoint();

mark.fixedpoint2();}

if(choice==4){NewtonRaphson mark = new NewtonRaphson();

mark.newtonraphson2(); }

if(choice==5){Secant mark = new Secant();

12

Page 13: NUMERICAL METHODS

mark.secant2(); }

if(choice==6){Muller mark = new Muller();

mark.muller3(); }

if(choice==7){Bairstow mark = new Bairstow();

mark.bairstow3(); }

do{

System.out.println("Perform another operation(Press 1 or 2):");

System.out.println("1. Yes"+"\n2. No");

answer = ee.nextInt();

}while(answer!=1 && answer!=2);

}while(answer==1);

}

}

13

Page 14: NUMERICAL METHODS

Listing 2. Bisection Method

package es84;

import java.util.Scanner;

public class Bisection {

public void bisection1(){

Scanner mark = new Scanner (System.in);

double xl,xu,xr,i=0,xrold=0,test,fxl,fxr,ea,es=0.00000001;

System.out.println("Lower limit (xl):");

xl = mark.nextDouble();

System.out.println("Upper limit (xu):");

xu = mark.nextDouble();

System.out.println("\tIterations" + " \txl" + " \txu" + " \txr" + " \tea"+"");

do{ i=i+1;

xr = (xl+xu)/2;

ea = Math.abs((xr-xrold)/xr)*100;

if(i==1){System.out.println("\t" +i+ "\t " +xl+ "\t " +xu+ "\t " +xr+ "\t ---");}else{System.out.println("\t" +i+ "\t " +xl+ "\t " +xu+ "\t " +xr+ "\t "+ea+"\t");}

fxl = 0.02085069444*xl*xl*xl*xl -1766.4*xl*xl + 33177600;

fxr = 0.02085069444*xr*xr*xr*xr -1766.4*xr*xr + 33177600;

test = fxl*fxr;

if(test<0){xu=xr;}

if(test>0){ xl=xr;}

xrold=xr;

}while(ea>es);

System.out.println("The root is "+xr+".");

14

Page 15: NUMERICAL METHODS

}}

Listing 3. False Position Method

package es84;

import java.util.Scanner;

public class FalsePosition {

public void falseposition1(){

Scanner mark = new Scanner (System.in);

double xl,xu,xr,i=0,xrold=0,test,fxl,fxr,ea,es=0.00000001,fxu;

System.out.println("Lower limit (xl):");

xl = mark.nextDouble();

System.out.println("Upper limit (xu):");

xu = mark.nextDouble();

System.out.println("Iterations" + " xl" + " xu" + " xr" + " ea"+"");

do{ i=i+1;

fxl = 0.02085069444*xl*xl*xl*xl -1766.4*xl*xl + 33177600;

fxu = 0.02085069444*xu*xu*xu*xu -1766.4*xu*xu + 33177600;

xr = xu - (fxu)*(xl-xu)/(fxl-fxu);

ea = Math.abs((xr-xrold)/xr)*100;

if(i==1){System.out.println("\t" +i+ "\t " +xl+ "\t " +xu+ "\t " +xr+ "\t ---");}else{System.out.println("\t" +i+ "\t " +xl+ "\t " +xu+ "\t " +xr+ "\t "+ea+"\t");}

fxr = 0.02085069444*xr*xr*xr*xr -1766.4*xr*xr + 33177600;

test = fxl*fxr;

if(test<0){xu=xr;}

if(test>0){xl=xr;}

xrold=xr;

15

Page 16: NUMERICAL METHODS

}while(ea>es);

System.out.println("The root is "+xr+".");}}

Listing 4. Fixed Point Iteration Method

package es84;

import java.util.Scanner;

public class FixedPoint {

public void fixedpoint2(){

Scanner mark = new Scanner (System.in);

double xr,i=1,ea,es=0.00000001,xrold;

System.out.println("Initial guess (xr):");

xr= mark.nextDouble();

System.out.println("Iterations" + " x" +" ea"+"");

System.out.println("" +i+ " " +xr+" "+"");

do{i=i+1;

xrold=xr;

xr = Math.sqrt(Math.sqrt((1766.4*xrold*xrold - 33177600)/0.02085069444));

ea=Math.abs((xr-xrold)/xr)*100;

System.out.println("" +i+ " " +xr+" "+ea+"");

}while(ea>es);

System.out.println("The root is "+xr+".");

}

}

16

Page 17: NUMERICAL METHODS

Listing 5. Newton Raphson Method

package es84;

import java.util.Scanner;

public class NewtonRaphson {

public void newtonraphson2(){

Scanner mark = new Scanner (System.in);

double xr,i=1,ea,es=0.00000001,xrold;

System.out.println("Initial guess (xr):");

xr= mark.nextDouble();

System.out.println("Iterations" + " x" +" ea"+"");

System.out.println("" +i+ " " +xr+" "+"");

do{i=i+1;

xrold=xr;

xr = xrold-(0.02085069444*xrold*xrold*xrold*xrold -1766.4*xrold*xrold + 33177600)/(4*0.02085069444*xrold*xrold*xrold -2*1766.4*xrold);

ea=Math.abs((xr-xrold)/xr)*100;

System.out.println("" +i+ " " +xr+" "+ea+"");

}while(ea>es);

System.out.println("The root is "+xr+".");

}

}

17

Page 18: NUMERICAL METHODS

Listing 5. Secant Method

package es84;

import java.util.Scanner;

public class Secant {

public void secant2(){

Scanner mark = new Scanner (System.in);

double xr,i=0,ea,es=0.00000001,x0,x1,xt=237.9223659,fx0,fx1,et;

System.out.println("Initial guess (x0):");

x0= mark.nextDouble();

System.out.println("Initial guess (x1):");

x1= mark.nextDouble();

System.out.println("Iteration" + " \tx0"+ " \tx1"+ " \txr" +" \tet"+"");

do{i=i+1;

fx1=0.02085069444*x1*x1*x1*x1 -1766.4*x1*x1 + 33177600;

fx0=0.02085069444*x0*x0*x0*x0 -1766.4*x0*x0 + 33177600;

xr=x1 - (fx1*(x0-x1))/(fx0-fx1);

et=Math.abs((xr-xt)/xr)*100;

System.out.println("" +i+ " "+x0+ " "+x1+ " " +xr+" "+et+"");

x0=x1;

x1=xr;

}while(et>es);

System.out.println("The root is "+xr+".");

}

}

18

Page 19: NUMERICAL METHODS

Listing 6. Muller’s Method

package es84;

import java.util.Scanner;

public class Muller {

public void muller3(){

Scanner mark = new Scanner (System.in);

double x0,x1,x2,es=0.00000001,ea,fx0,fx1,fx2,h0,h1,pert0,pert1,a,b,c,den,rad,xr,i=1;

System.out.println("Initial guess (x0):");

x0= mark.nextDouble();

System.out.println("Initial guess (x1):");

x1= mark.nextDouble();

System.out.println("Initial guess (x2):");

x2= mark.nextDouble();

System.out.println("Iterations" + " x0" +" x1"+" x2"+" ea");

do{

fx0=0.02085069444*x0*x0*x0*x0 -1766.4*x0*x0 + 33177600;

fx1=0.02085069444*x1*x1*x1*x1 -1766.4*x1*x1 + 33177600;

fx2=0.02085069444*x2*x2*x2*x2 -1766.4*x2*x2 + 33177600;

h0=x1-x0;

h1=x2-x1;

pert0=(fx1-fx0)/h0;

pert1=(fx2-fx1)/h1;

19

Page 20: NUMERICAL METHODS

a=(pert1-pert0)/(h1+h0);

b=a*h1 + pert1;

c=fx2;

rad=Math.sqrt(b*b - 4*a*c);

if(Math.abs(b+rad)>Math.abs(b-rad)){

den=b+rad;

}else{

den=b-rad;

}

xr=x2 - 2*c/den;

ea=Math.abs((xr-x2)/xr)*100;

System.out.println("" +i+ " " +x1+" "+x2+" "+xr+" "+ea+"");

i=i+1;

x0=x1;

x1=x2;

x2=xr;

}while(ea>es);

System.out.println("The root is "+xr+".");

}

}

20

Page 21: NUMERICAL METHODS

Listing 7. Bairstow’s Method

package es84;

import java.util.Scanner;

public class Bairstow {

public void bairstow3(){

Scanner mark = new Scanner (System.in);

double g,r,s,es=0.00000001,ear,eas,b4,b3,b2,b1,b0,c4,c3,c2,c1,i=1,det,dr,ds,x1,x2,disc,r1,r2,i1,i2,xr;

System.out.println("Initial guess (xr):");

g= mark.nextDouble(); r=g;

s=g;

System.out.println("Iteration" + "\tr" + "\ts" + "\tear" + "\teas");

do{

b4=0.02085069444;

b3=r*b4;

b2=-1766.4 + r*b3 + s*b4;

b1=r*b2 + s*b3;

b0= 33177600 + r*b1 + s*b2;

c4=b4;

c3=b3 + r*c4;

c2=b2 + r*c3 + s*c4;

c1=b1 + r*c2 + s*c3;

det=c2*c2 - c3*c1;

21

Page 22: NUMERICAL METHODS

dr=(-b1*c2 + b0*c3)/det;

ds=(-c2*b0 + b1*c1)/det;

ear=Math.abs(dr/r)*100;

eas=Math.abs(ds/s)*100;

r=r+dr;

s=s+ds;

System.out.println(""+i+ "\t"+r+ "\t" +s+ "\t"+ear+ "\t"+eas+"");

i=i+1;

}while(ear>es && eas>es);

disc = r*r + 4*s;

if(disc>0){

r1=(r + Math.sqrt(disc))/2;

r2=(r - Math.sqrt(disc))/2;

i1=0;

i2=0;

}else{

r1=r/2;

r2=r1;

i1=Math.sqrt(Math.abs(disc))/2;

i2=-i1;

}

xr=r1;

System.out.println("The root is "+xr+".");}}

22

Page 23: NUMERICAL METHODS

Chapter IV

Results and Discussion

A. Graphical Representation

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 200.00000001

0.0000001

0.000001

0.00001

0.0001

0.001

0.01

0.1

1

10

BisectionFalse PositionFixed PointNewton RaphsonSecantMuller

Iterations

Appr

oxim

ate

Erro

r

Figure 1 Approximate Error versus Iterations Graph

Figure 1 shows the graphical representation between the approximate errors(ϵ a) and

the number of iterations. The results were obtained through the use of the different methods

stated.

23

Page 24: NUMERICAL METHODS

B. Screenshots of Outputs

The following figures are the actual results or screenshots obtained using the source

codes accessible on Chapter 3.

Figure 2. Screenshot of the Result for Bisection Method

Figure 3. Screenshot of the Result for False Position Method

24

Page 25: NUMERICAL METHODS

Figure 4. Screenshot of the Result for Fixed Point Iteration Method

Figure 5. Screenshot of the Result for Newton Raphson Method

Figure 6. Screenshot of the Result for Secant Method

25

Page 26: NUMERICAL METHODS

Figure 7. Screenshot of the Result for Muller’s Method

26

Page 27: NUMERICAL METHODS

Figure 8. Screenshot of the Result for Bairstow’s Method

C. Table of Results

The following are the tabular presentation of the results obtained after employing the

different methods for solving the function (8).

Iteration Xr Ea

1 225  ---

2 237.5 5.263157895

3 243.75 2.564102564

4 240.625 1.298701299

5 239.0625 0.653594771

6 238.28125 0.327868852

7 237.890625 0.164203612

8 238.0859375 0.082034454

9 237.98828125 0.041034058

10 237.939453125 0.020521239

11 237.9150390625 0.010261673

12 237.92724609375 0.005130573

13 237.921142578125 0.002565352

14 237.9241943359375 0.00128266

15 237.92266845703125 6.41E-04

16 237.92190551757812 3.21E-04

17 237.9222869873047 1.60E-04

18 237.92247772216797 8.02E-05

19 237.92238235473633 4.01E-05

20 237.9223346710205 2.00E-05

21 237.92235851287842 1.00E-05

22 237.92237043380737 5.01E-06

23 237.9223644733429 2.51E-06

24 237.92236745357513 1.25E-06

25 237.92236596345901 6.26E-07

26 237.92236521840096 3.13E-07

27 237.92236559092999 1.57E-07

28 237.9223657771945 7.83E-08

29 237.92236587032676 3.91E-08

30 237.9223659168929 1.96E-08

31 237.92236589360982 9.79E-09

Table 1. Results for Bisection Method

27

Page 28: NUMERICAL METHODS

Table 1 shows the obtained results for solving the roots of (8) using the Bisection

Method. As shown, the root was obtained after 31 iterations and is equal to Xr =

237.92236589360982, where the condition εa < εs was satisfied after 31 iterations such that

εa = 9.785992282792908E-9, which is less than the inputted stopping εs =0.00000001. The

limits used in solving the problem are 200 and 250, the lower and upper limits respectively.

Iteration Xr Ea1 224.67536444828656 ---2 234.89347895440497 4.35010565282735853 237.318847516671 1.02198733376862054 237.8057078164819 0.20473028350800435 237.89995110002397 0.039614671254149176 237.9180640649125 0.0076131104040878777 237.92154046339786 0.0014611533191110968 237.9222075074168 2.8036223517251274E-49 237.9223354919107 5.379255110118232E-510 237.9223600478178 1.0320974911360553E-511 237.9223647592592 1.9802431876803654E-612 237.92236566322387 3.7994101934363575E-713 237.92236583666377 7.28976866272087E-814 237.922365869941 1.3986586466724268E-815 237.92236587632573 2.6835384088661486E-9

Table 2. Results for False Position Method

Table 2 shows the obtained results for solving the roots of the function (8) using the

False Position Method. As seen above, the root was obtained after 15 iterations, which was

evaluated from the lower and upper limits, 200 and 250 respectively, where the value of the

approximation error is εa = 2.6835384088661486E-9, which satisfies the condition εa < εs,

where εs = 0.00000001.

28

Page 29: NUMERICAL METHODS

Iteration Xr Ea1 250 ---2 246.692356058754 1.34079709403652013 244.3413107877861 0.96219720823622964 242.6477219025026 0.69796199692490765 241.4157066841177 0.51032935483230256 240.51295756237394 0.375343237592365767 239.8479223621773 0.27727369645188468 239.35605376505686 0.205496618691428639 238.99118391918697 0.1526708391022775810 238.71992526132217 0.1136305055256069711 238.51792927238526 0.0846879685536080512 238.36732599237288 0.0631811761051492113 238.25493697970256 0.04717174556592497514 238.1710082825081 0.03523883859739694615 238.10830081504878 0.02633569146672759516 238.06143090246846 0.0196881588095309617 238.02638855081756 0.01472204483891486618 238.00018348513868 0.01101052330933032819 237.98058390531727 0.00823578944961353820 237.96592301779395 0.00616091889855320721 237.95495539107782 0.00460911885533644822 237.9467500967798 0.00344837418232663723 237.94061109952733 0.002580054419502115424 237.93601788205498 0.00193044227319312125 237.9325811255118 0.001444424520140787426 237.93000960702986 0.00108078778553005227 237.92808546397575 8.087078288211644E-428 237.92664570374905 6.051277789605556E-429 237.92556837857458 4.527992438162895E-430 237.92476224630875 3.388181449570302E-431 237.92415903713163 2.53530023834406E-432 237.92370766870454 1.89711412753269E-433 237.9233699185065 1.4195755471943424E-434 237.92311718609338 1.0622440396106702E-435 237.92292807067116 7.948600151737888E-536 237.92278655861176 5.947814475748947E-537 237.92268066729923 4.4506607033909525E-538 237.9226014303962 3.3303646876332864E-539 237.9225421385649 2.4920644671710202E-540 237.92249777132687 1.8647769098841955E-541 237.92246457194176 1.395386735529298E-542 237.92243972930007 1.0441487453380839E-543 237.92242113989136 7.813222739563813E-644 237.92240722968967 5.846528643250487E-6

29

Page 30: NUMERICAL METHODS

45 237.92239682087407 4.374878421269796E-646 237.9223890320978 3.2736625965750265E-647 237.92238320386136 2.449637724273955E-648 237.9223788426703 1.8330310419125377E-649 237.9223755792495 1.3716325756699129E-650 237.9223731372754 1.0263742990649673E-651 237.92237130997887 7.680221574536923E-752 237.92236994263732 5.747007118705481E-753 237.92236891947394 4.300408501600424E-754 237.92236815385445 3.2179382524022694E-755 237.92236758095163 2.4079401450141426E-756 237.9223671522561 1.8018294538031221E-757 237.92236683146893 1.3482850309186008E-758 237.92236659142822 1.008903547760194E-759 237.92236641180892 7.549491651142079E-860 237.9223662774022 5.649183838690552E-861 237.92236617682747 4.227208206080775E-862 237.92236610156874 3.163163123622907E-863 237.92236604525363 2.3669534336761066E-864 237.92236600311378 1.7711594794063636E-865 237.9223659715811 1.3253353787261695E-866 237.9223659479856 9.917300419164622E-9

Table 3. Results for Fixed Point Iteration Method

Table 3 shows the obtained results for solving the roots of the function (8) using the

Fixed-Point Iteration Method. From the table, a root of Xr = 237.9223659479856 is obtained

after 66 iterations, where the condition εa < εs is satisfied, where εa = 9.917300419164622E-

9and εs = 0.00000001. The initial guess used is 250.

Iteration Xr Ea1 250 ---2 239.93823075475302 4.1934831367208713 237.99439326059897 0.81675768387774 237.92246319633293 0.030232565391139615 237.9223658780196 4.090339004635533E-56 237.92236587784157 7.482843708920579E-11

Table 4. Results for Newton Raphson Method

30

Page 31: NUMERICAL METHODS

Table 4 shows the obtained results for solving the function (8) using the Newton-

Raphson Method. From the table, a root of Xr = 237.92236587784157 is obtained after 6

iterations with a relative approximate error of εa = 7.482843708920579E-11, which satisfies

the condition εa < εs, where εs = 0.00000001. The initial guess used is 250.

Iteration Xr Ea1 239.79161317846024 3.84016217226354772 238.24802035030942 0.6478932441416263 237.93344315249146 0.13221226644307484 237.9224333513766 0.0046274749966903775 237.92236589189025 2.835357075690802E-56 237.92236587784157 5.904732995302025E-9

Table 5. Results for Secant Method

Table 5 shows the results after computing for the root of the function (8) using

Secant Method where the root was found out to be equal to Xr=237.92236587784157. This

root was obtained in the 6th iteration where the relative approximate error is equal ε a=

5.904732995302025E-9 which is less than the required stopping condition εs=0.00000001. The

initial estimate used is 250 and 249 respectively.

Iteration Xr Ea1 237.82154154021524 4.2798723756752722 237.9231796737367 0.042718886684707243 237.9223659364772 3.420179756127264E-44 237.9223658778416 2.464484848913563E-85 237.9223658778416 0.0

Table 6. Results for Muller’s Method

The table above shows the results obtained after computing for the root of the

function (8) by employing Muller’s Method. As shown above, the root, Xr =

237.9223658778416, was obtained in the 5th iteration where the computed approximate error

Ea=0.0 satisfies the terminating condition εa<εs where εs = 0.00000001.

In evaluating the root of the function using the formula for Muller’s Method, the initial

guesses where 250, 249 and 248 respectively.

31

Page 32: NUMERICAL METHODS

Table 7. Results for Bairstow’s Method

Table 7 shows the results after computing for the root of the function (8) using

Bairstow’s Method where the root was found out to be equal to Xr= 237.92236587784157

although not shown in the data but was shown on the Screenshot for bairstow’s method . This root

was obtained in the 15th iteration with the initial guess of 250.

32

Iteration r s ear es1 1899.799518 -329685.4962 659.9198072 131974.19852 389.1164048 2246889.881 79.51802803 781.52524363 180.9560812 1267478.757 53.49564321 43.589636184 88.02951397 680346.5905 51.35310547 46.322840775 43.45613273 367412.1016 50.63458746 45.996333826 21.55977473 206627.1092 50.38726786 43.761485187 10.66817429 125463.6913 50.51815513 39.280140068 5.169861904 85221.39625 51.53939404 32.07485349 2.297490939 66181.91209 55.55991665 22.3412018510 0.737404216 58538.2074 67.90393367 11.549537411 0.082723041 56723.57508 88.78185948 3.0999109912 6.68E-04 56607.54488 99.19223979 0.20455375713 2.31E-08 56607.05219 99.9965424 8.70E-0414 1.60E-17 56607.05218 99.99999993 1.74E-0815 -1.23E-32 56607.05218 100 2.22E-14

Page 33: NUMERICAL METHODS

Chapter V

Conclusion

The Muller’s Method gives the least approximate true error over other methods in

finding the root of equation (8). Equation (8) is much more approximately equal to zero

when the root obtained using the same method is substituted. In addition, these methods

give a lesser relative approximation error, though εa and εt for this technique has a

considerable difference compared to the other methods.

The Newton Raphson and Secant Methods displayed significant results as the root for

(8) were obtained with almost least number of iterations and approximate error which

means that the root finding is fast and mostly accurate. While on the other hand, the

Bisection and Fixed-Point Iteration Methods holds the most number of iterations which

means the approximate error converges slowly to the desired stopping criterion or shall we

say the process of root finding takes longer time than the previous methods.

Based on experiences and readings, the performance of each method is not the same

in every function. There are some cases that in a certain function, one method performs

better than the other but in another or different sets of functions, it performs poorly. But the

thing is, with the help of these numerical methods, one can obtain the root(s) of a function

by just inputting the values of the function.

33