numerical solver report

Upload: bwiino-keefa

Post on 07-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/4/2019 Numerical Solver Report

    1/39

    ROOT FINDING NUMERICAL SOLVER: A CASE STUDY OF

    MATHEMATICS STUDENTS MBARARA UNIVERSTY OF

    SCIENCE AND TECHNOLOGY

    A PROJECT REPORT

    Submitted by

    Dickson. N and Keefa. B

    +256774941425 +256775526587

    [email protected] [email protected]

    in partial fulfillment for the award of the degree

    of

    Bachelors of Computer Science

    Supervisor

    MR. TOM OKARE

    Institute of Computer Science

    Mbarara University of Science and Technology

    [email protected]

    +256-702324624

    April 2010

  • 8/4/2019 Numerical Solver Report

    2/39

    i

    Declaration

    We the Root Finding Numerical solver group hereby declares that this Project Report is original

    and has not been published or submitted for any other degree award to any other University

    before.

    BWIINO KEEFA NATWAZAGYE DICKSON

    2007/BCS/003 2007/BCS/007/PS

    Date.

  • 8/4/2019 Numerical Solver Report

    3/39

    ii

    Approval

    This Project Report has been submitted for Examination with the approval of the following

    supervisor.

    Signed: ...

    Date: ..

    MR. TOM OKARE

  • 8/4/2019 Numerical Solver Report

    4/39

    iii

    Dedication

    We dedicate this to our almighty God, Parents, Uncles, Aunts, brothers and sisters for their

    support they have contributed towards the success of this project.

  • 8/4/2019 Numerical Solver Report

    5/39

    iv

    Acknowledgement

    We would like to extend our sincere gratitude and thanks to all those people who have helped us

    towards the success of this project.

    Special thanks to our supervisor MR.TOM OKARE, and other lecturers MR. KAWUMA

    SIMON, MR. MUGONZA ROBERT, MR.JOHN BUSINGYE for all their contributions,

    support and advice rendered to us during the course of our project

    We also thank our parents for their support both morally and financially may they live longer to

    enjoy the fruits of our success.

  • 8/4/2019 Numerical Solver Report

    6/39

    v

    Table of contents

    Declaration..................................................................................................................................i

    Approval .....................................................................................................................................ii

    Dedication .................................................................................................................................iii

    Acknowledgement.....................................................................................................................iv

    List of Figures............................................................................................................................vii

    CHAPTER ONE.............................................................................................................................1

    1.0 INTRODUCTION.....................................................................................................................1

    1.1 Problem Statement...............................................................................................................4

    1.2 Main Objective .....................................................................................................................5

    1.4 Scope.......................................................................................................................................................5

    1.5 Significance.....................................................................................................................5

    CHAPTER TWO............................................................................................................................6

    2.0 Literature Review............................................................................................................6

    CHAPTER THREE..........................................................................................................................9

    3.1 Rapid Prototyping ......................................................................................................................... 9

    3.1.1 Requirements specification (Analysis) phase .............................................................................9

    3.1.2 Design ...................................................................................................................................... 10

    3.1.3 Building prototype ................................................................................................................... 10

    3.1.4 Evaluation and Refine Requirements of the system.................................................................10

    3.1.5 Root Finding Numerical Solver ................................................................................................. 11

    3.2 Methods of data collection .................................................................................................11

    3.2.1 Interviews ................................................................................................................................ 11

    3.2.2 Observation.............................................................................................................................. 11

    3.2.3 Review of the literature ...........................................................................................................11

    CHAPTER FOUR.........................................................................................................................12

    4.0 Evaluation and discussion of the methods........................................................................... 12

    4.1 Newtons Method ....................................................................................................................... 12

    4.2 BISECTION METHOD.................................................................................................................... 12

  • 8/4/2019 Numerical Solver Report

    7/39

    vi

    4.3 SECANT METHOD ........................................................................................................................ 13

    4.4 TOLERANCE ................................................................................................................................. 13

    CHAPTER 5................................................................................................................................14

    5.0 PRESENTATION OF THE RESULTS ........................................................................................... 14

    5.1 Description of inputs and parameters to the system............................................................. 14

    5.2 System Flow ................................................................................................................................ 14

    5.2 SYSTEM PAGES....................................................................................................................16

    5.1.1 Start Page .......................................................................................................................... 16

    5.1.2 ITERATIONS CALCULATOR PAGE............................................................................ 17

    5.1.3 SOLUTION FOR ITERATION CALCULATOR........................................................................... 18

    5.1.4 NEWTONS METHOD PAGE................................................................................................ 19

    5.3.5 SOLUTION FOR NEWTONS METHOD ....................................................................................... 20

    5.1.5 THE BISECTION PAGE ......................................................................................................... 21

    5.1.6 THE BISECTION SOLUTION PAGE........................................................................................ 22

    5.1.7 THE BISECTION METHOD ERROR PAGE.............................................................................. 23

    5.1.8 THE SECANT PAGE.............................................................................................................. 24

    5.1.9 THE SECANT METHOD SOLUTION PAGE............................................................................. 25

    5.1.10 THE HELP PAGE .................................................................................................................. 26

    CHAPTER SIX.............................................................................................................................27

    6.0 Individual critical analysis ...................................................................................................... 27

    6.1 Personal contributions .......................................................................................................... 27

    6.2 Recommendations................................................................................................................. 27

    6.3 Future Work............................................................................................................................ 27

    REFERENCES..............................................................................................................................28

    7.0 APPENDICES........................................................................................................................29

    7.0.1 Appendix 1: Gantt chart ........................................................................................................... 29

    Table 1: Gantt chart .......................................................................................................................... 29

    7.0.2 Appendix 2: Budget.................................................................................................................. 29

  • 8/4/2019 Numerical Solver Report

    8/39

    vii

    List of Figures

  • 8/4/2019 Numerical Solver Report

    9/39

    viii

    ABSTRACT

    A Root finding Numerical Approximation Solver is a system that finds an approximation to the

    root of an equation given the error bound (TOL) from which the real root lies using Numerical

    methods of Bisection, Newton and Secant.

    A Root finding Numerical Approximation Solver covers Polynomial equations ranging from

    linear, quadratic, cubic, up to the power of ten, trigonometric equations, Exponentials and

    Logarithmic equations.

    The Solver provides user friendly interfaces from which the user enters coefficients and other

    numbers required in the text fields provided on the interfaces.

    A Root finding Numerical Approximation Solver provides a brief working steps to the solution

    and then generates a table of iterations and finally notifies you on the number of iterations it

    performed to generate the root and then states the root to the given equation basing on the error

    bound (TOL) and the initial approximation to the root (Po).

  • 8/4/2019 Numerical Solver Report

    10/39

    1

    CHAPTER ONE

    1.0 INTRODUCTION

    Numerical approximation is a part of numerical analysis whose objective is to solve complex

    numerical problems using only the simple operations of arithmetic, to develop and evaluate

    methods for computing numerical results from given data.

    The methods of computation are called algorithms. A root-finding algorithm is a numerical

    method for finding a valuex such thatf(x) = 0, for a given functionf. Such anx is called a root of

    the functionf.

    This software is concerned with finding real roots, approximated as floating point numbers.,

    Finding a root off(x) g(x) = 0 is the same as solving the equation f(x) = g(x). Here,x is called

    the unknown in the equation. Conversely, any equation can take the canonical form f(x) = 0, so

    equation solving is the same thing as computing (orfinding) a root of a function.

    Numerical root-finding methods use iteration, producing a sequence of numbers that hopefully

    converge towards a limit (the so called "fixed point") which is a root. The first values of this

    series are initial guesses. The method computes subsequent values based on the old ones and the

    functionf.

    The root finding numerical approximation solver will determine the root of polynomial,

    logarithmic, exponential and even trigonometric equations using numerical methods by simply

    prompting the user to enter coefficients into the text fields provided on the interface. It will

    display the results for the user after performing the required iterations.

    Numerical approximations are techniques for finding appropriate solutions to mathematical

    problems. Such techniques have been known for a long time Euler is credited with having

    introduced, in 1768, finite differences to approximate derivatives in ordinary differential

    equations.

    Real progress on the development of applications of numerical methods is the product of the 20th

    century, the beginning of which witnessed increased efforts by scientists to invent, analyze and

  • 8/4/2019 Numerical Solver Report

    11/39

    2

    apply numerical methods to solve equations that represented mathematical models of physical

    phenomena.

    Early contribution of historical importance was made by scientists like Runge Kutta, Richardson,

    Liebmantz, Courant, Friedrichs, and Von Neumann among others.

    There are 2 kinds of solving mathematical problems thus analytical and numerical methods, the

    former produces when possible an exact analytical solution in the form of general math

    expressions.

    Numerical methods on the other hand produce approximate solutions in the form of discrete

    values or numbers.

    The simplest of these is a linear algebraic equation where the solution to this is immediate and

    consists of a single value point. Finding solutions to higher-order algebraic equations will not in

    general be a feasible task and numerical methods must be employed to find approximate

    solutions instead.

    Finding roots of polynomials

    Much attention has been given to the special case that the functionf is a polynomial; there exist

    root-finding algorithms exploiting the polynomial nature off.

    For a univariate polynomial of degree less than five, we have closed form solutions such as the

    quadratic formula. However, even this degree-two solution should be used with care to ensure

    numerical stability, the degree-four solution is unwieldy and troublesome, and higher-degree

    polynomials have no such general solution.

    For real roots, Sturm's theorem provides a guide to locating and separating roots. This plus

    interval arithmetic combined with Newton's method yields a robust algorithm, but other choices

    are more common.

    One possibility is to form the companion matrix of the polynomial. Since the eigen values of this

    matrix coincide with the roots of the polynomial, one can use any eigen value algorithm to find

    the roots of the polynomial. For instance the classical Bernoulli's method to find the root greater

    in modulus, if it exists, turns out to be the power method applied to the companion matrix. The

    inverse power method, which finds some smallest root first, is what drives the JenkinsTraub

    method and gives it its numerical stability and fast convergence even in the presence of multiple

    or clustered roots.

  • 8/4/2019 Numerical Solver Report

    12/39

    3

    Laguerre's method, as well as Halley's method, use second order derivatives and complex

    arithmetic, including the complex square root, to exhibit cubic convergence for simple roots,

    dominating the quadratic convergence displayed by Newton's method.

    Bairstow's method uses Newton's method to find quadratic factors of a polynomial with real

    coefficients. It can determine both real and complex roots of a real polynomial using only real

    arithmetic.

    The simple Durand-Kerner and the slightly more complicated Aberth method simultaneously

    find all the roots using only simple complex number arithmetic.

    The splitting circle method is useful for finding the roots of polynomials of high degree to

    arbitrary precision; it has almost optimal complexity in this setting. Another method with this

    style is the Dandelin-Grffe method (actually due to Lobachevsky) which factors the polynomial.

    Wilkinson's polynomial illustrates that high precision may be necessary when computing the

    roots of a polynomial.

  • 8/4/2019 Numerical Solver Report

    13/39

    4

    1.1 Problem Statement

    Numerical approximations are procedures that depend on many repetitive calculations possibly

    millions. For sufficiently simple problems, mathematics students always get solutions of the

    equations manually using a piece of paper, a simple calculator and a pen and one needs to have

    understood all the mathematical concepts concerning solving a particular equation and is

    supposed to remember all the steps involved in solving a particular problem leading to time

    wastage and it needs a lot of concentration.

    The root finding numerical approximation solver is interactive, a system where the user helps

    guide the calculation by asking the user to enter the coefficients of a particular equation into a

    text field area provided on the graphical user interface and the results are displayed after clicking

    the SOLVE button on the interface.

  • 8/4/2019 Numerical Solver Report

    14/39

    5

    1.2 Main Objective

    To develop a system that will help in finding approximate solutions to higher-order algebraicequations and also provide user interfaces to users for entry of data.

    1.3 Specific Objectives

    To review the literature related to the system

    To identify data and user requirements of the system

    To develop the system

    To test and validate the system

    1.4 Scope

    The software covers foundations of numerical mathematics, Synthesis and Analysis of

    Algorithms, Analysis of Error together with Programs and Program Libraries used in numerical

    analysis.

    It makes use of the numerical root finding methods of Bisection, Newton Raphson and Secant to

    solve complex Polynomial, trigonometric and exponential equations.

    1.5Significance.The system reduces the tiresome manual calculations by performing millions of iterations on a

    click of a SOLVE button in a few seconds.

    Due to its interactivity with the end user, the numerical solver saves time by only asking the user

    to enter the coefficients of a particular equation and instantly the results displayed after clicking

    the SOLVE button on the interface.

    The problem of higher order polynomials together with complex exponential and trigonometric

    equations examining the foundations, Synthesis and Analysis of Algorithms, Analysis of Error is

    solved hence obtaining the most convergent answer, correctly and accurately using the methods

    of Newton, Secant and Bisection.

    The system is able to be accessed and used by anyone with a computer over the world once it is

    put on a server, because it is server compatible, therefore can be used online.

    The software clearly shows step-by-step procedures of working on each problem by providing

    the methods and steps followed in solving a particular numerical problem expressed as a

    polynomial, trigonometric or exponential equation.

  • 8/4/2019 Numerical Solver Report

    15/39

    6

    CHAPTER TWO

    2.0Literature ReviewMiquel et al., (2007)[1], argues that a technique to construct iterative methods to approximate the

    zeros of a nonlinear equation F(x) = 0, where Fis a function of several variables. This technique

    is based on the approximation of the inverse function ofFand on the use of fixed point iteration.

    Depending on the number of steps considered in the fixed point iteration, or in other words, the

    number of evaluations of the function F, we obtain some variants of classical iterative processes

    to solve nonlinear equations. These variants improve the order of convergence of classical

    methods. Finally, we show some numerical examples, where we use adaptive multi-precision

    arithmetic in the computation that show a smaller cost.

    According to Richard and Karl (2007)[9], the roots of any polynomial may be expressed in terms

    of multivariate hyper geometric functions. Numerically solving a polynomial equation in one

    unknown is easily done on a computer by the Durand-Kerner method or by some other root

    finding algorithm. The reduction of equations in several unknowns to equations each in one

    unknown is discussed in the article Buchbergers algorithm. The special case where all the

    polynomials are of degree one is called a system of linear equations, for which a range of

    different solution methods exist, including the classical Gaussian elimination.

    Donald, (2005) [8] concludes that This solver solves any linear, quadratic, or cubic equation.

    Just enter the coefficients of the following equation: AX3+BX2+CX+D=0. For the sake of

    mathematical completeness, this solver allows you to enter complex numbers as coefficients.

    Chances are that most people using this will want the coefficients to be real numbers. In that

    case, just leave the imaginary parts of A, B, C, D equal to zero. After entering our coefficients,

    press the solve button to see the solutions

    In conclusion, Kai, et al (2006)[7] specify that, We consider the problem of implementing

    fast algorithms for the numerical solution of initial value problems of the form x(i)(t) =f (t,x(t)),

    x(0) =x0, wherex(i) is the derivative ofx of order i in the sense of Caputo and 0

  • 8/4/2019 Numerical Solver Report

    16/39

    7

    spread to most disciplines. There is every reason to believe that this trend will continue to

    accelerate in the foreseeable future more so in the field of numerical analysis which explores all

    aspects and numerical approximations of higher order polynomials.

    Hilderbrand (2000)[5], stresses that the ultimate aim of the field of numerical analysis is to

    provide convenient methods for obtaining useful solutions to mathematical problems in terms of

    algebraic or transcendental equation, an ordinary or partial differential equation, or an integral

    equation or in terms of a set of such equations. The formulation may correspond exactly to the

    situation which it is intended to describe, more often, it will not. Generally, the numerical analyst

    does not strive for exactness. Instead, he attempts to devise a method which will yield an

    approximation differing from exactness by less than a specified tolerance or by an amount

    which has less than a specified probability of exceeding that tolerance. Clearly, it is desirable

    first of all to choose the coordinate functions which are convenient for calculation purposes.

    Weistreass (1885), states that any function f(x) which is continuous on a closed interval [a, b]

    can be uniformly approximated with any prescribed tolerance, on that interval, by some

    polynomial, therefore given any tolerance , there is a polynomial p(x) such that |f(x)-p(x)|

    Polynomial approximation of wide general use when a function is to be approximated is

    continuous and the interval of approximation is finite. The n+1 functions ,1, x, x2, .xn , which

    generate the algebraic polynomials of degree n or less, are particularly appropriate, since

    polynomials are readily evaluated and since their integrals, derivatives and products are also

    polynomials.

    As said by Ward and David (2004)[4], the solution to a scientific problem is a number about

    which we have little information other than that it satisfies some equation. Since an equation can

    be written so that a function stands on one side and a zero on the other, the desired number must

    be a zero of the function thus f(x)=0, thus if we possess an arsenal of methods for locating zeros

    of functions, we shall be able to solve such problems.

    In accordance with Quo and Wang (2006)[3], numerical solvers currently used to solve

    mathematical models in systems biology can be ill-conditioned due to stiffness. As researchers

    discover more unknown biological systems and invent increasingly complex analytical models to

    describe these systems, the role of numerical solvers in handling these models becomes

    increasingly important. . At the same time, the numerical solution to this problem is difficult due

    to stiffness and sensitivity of the system to initial conditions. In this study, we determine the

  • 8/4/2019 Numerical Solver Report

    17/39

    8

    optimal numerical solver(s), which can predict limit cycle behavior, by systematically comparing

    performance measures such as accuracy, sensitivity to initial conditions, empirical convergence

    rates and computational cost of different numerical solvers. We use Simulink and various

    numerical solvers to conduct the investigation. The comparison results from our work form an

    initial basis for deriving a set of rules to select the optimal numerical solver(s) for complex

    oscillatory systems.

    According to Sturm's theorem (2000)[2], First, we need to determine whetherp(x) has a multiple

    root. Ifp(x) has a multiple root at r, then its derivativep(x) will also have a root at r(one fewer

    than p(x) has there). So we calculate the greatest common divisor of the polynomials p(x) and

    p(x); adjust the leading coefficient to be one and call it g(x). (See Ifg(x) = 1, thenp(x) has no

    multiple roots and we can safely use those other root-finding algorithms which work best whenthere are no multiple roots, and then exit. Now suppose that there is a multiple root. Notice that

    g(x) will have a root of the same multiplicity at rthatp(x) has and the degree of the polynomial

    g(x) will generally be much less than that ofp(x). Recursively call this routine, using g(x) in

    place ofp(x). Now suppose that we have found the roots ofg(x). Since rhas been found, we can

    factor (xr) out ofp(x) repeatedly until we have removed all of the roots at r. Repeat this for any

    other multiple roots until there are no more multiple roots. Then the quotient can be factored in

    the usual way with one of the other root-finding algorithms.

  • 8/4/2019 Numerical Solver Report

    18/39

    9

    CHAPTER THREE

    3.0 METHODOLOGY

    The methodology refers to the way in which information is found or something is done. This

    includes the methods, procedures, tools and techniques used to collect and analyze information.

    For the objectives of this study to be achieved, a thorough and detailed process was followed asanalyzed below;

    3.1 Rapid Prototyping

    Rapid prototyping was used as a Methodology with the iteration technique. After considerations

    of time and cost were made in respect to this project, and for this system rapid prototyping was

    the appropriate since there was checking of errors it was thought to be the most convenient. The

    steps followed were looped through multiple times to improve the levels of detail and accuracy.

    Here is the illustration;

    Figure1: system development life cycle

    3.1.1 Requirements specification (Analysis) phase

    The definition of the scope and the conduction of the feasibility study was done, and the project

    launched. It involved the study of the problem statement, requirements specification and analysis

  • 8/4/2019 Numerical Solver Report

    19/39

    10

    and the formulae to solve equations derived, software requirements specification, data was

    collected to determine the system requirement specifications, processing was done and analysis

    of the type of output also done.

    The main aim was to gather the required information, drawing activity time plans and schedule

    as well as activity network graphs and documentation about the developed system.

    3.1.2 Design

    This involved defining structural components of the developed system. The information gathered

    during the analysis phase was used to formulate models that represented the solution system.

    Design systems for the entire system, the application software and the user interfaces were

    drawn. Modeling and identification of structural components was done and represented by flow

    charts, data flow diagrams (DFD) and Entity-relationship Diagrams (ERD)The developed system was broken into three modules using the top down approach; that is the

    input module, operations module and output section which helped speeding up the development

    and the understanding of the system.

    The input and output modules contains user interactive interfaces which allow a user to input

    information related to the system and produce user demands according the system instructions.

    The operations module contains programs and operations that are able to execute the user

    demands and requests.

    3.1.3 Building prototype

    A tentative working model of the whole system was built and used to test the feasibility, and it

    was verified and validated in order to help identify requirements and to compare different design

    and interface alternatives.

    3.1.4 Evaluation and Refine Requirements of the system

    Here the developed prototype was tested against its test cases and requirements specification thus

    verification and validation were effected at this stage. This is advantageous in a way that all the

    odds in the system which could affect the system after its implementation like wrong or

    unauthorized entities, could be removed.

  • 8/4/2019 Numerical Solver Report

    20/39

    11

    3.1.5 Root Finding Numerical Solver

    At this point, after a thorough testing of the prototype, the actual development of the proposed

    system was implemented.

    3.2 Methods of data collection

    3.2.1 InterviewsUnstructured (oral) interviews were carried out with the stake holders such as lecturers, friends,

    mathematics students as well as my supervisor. This method was projected to attain hard facts,

    goals and informal procedures about numerical analysis methods of finding the root of an

    equation/polynomial. This method was used because of its richness in stipulation of data since

    the interview is open ended and the researcher could probe in great depth about the system work

    which could not be achieved by other methods. And also, the researchers were sure that the

    information is from a reliable source since it was from selected respondents.

    This kind of interview could give the respondents an expression, hence digging deeper into roots

    of the problem and identifying the requirements and parameters of the system developed.

    3.2.2 Observation

    Observation of the already existing systems was used as a means of finding out how the Root

    Finding Numerical Solver was to work in comparison with the existing systems in terms of

    efficiency, features, time complexity and accuracy and this helped to provide the basis upon

    which the developed system was improved.

    3.2.3 Review of the literature

    A review of research work from journals, internet sources and other projects already developed

    which are related to this subject area was done. A full analysis of the existing literature on the

    subject was primed with the objective of revealing contributions, weaknesses and failures.

  • 8/4/2019 Numerical Solver Report

    21/39

    12

    CHAPTER FOUR

    4.0 Evaluation and discussion of the methodsThe following methods were used to find solutions to complex polynomial equations to utmost

    the 10th degree of higher order, exponential and trigonometric equations.

    4.1 Newtons Method

    Newton's method assumes the functionfto have a continuous derivative. Newton's method may

    not converge if started too far away from a root. However, when it does converge, it is faster

    than the bisection method, and is usually quadratic. Newton's method is also important because it

    readily generalizes to higher-dimensional problems.

    4.2 BISECTION METHOD

    This method is the simplest root-finding algorithm. It works whenfis a continuous function and

    it requires previous knowledge of two initial guesses, a and b, such that f(a) and f(b) have

    opposite signs. Although it is reliable, it converges slowly, gaining one bit of accuracy with eachiteration.

  • 8/4/2019 Numerical Solver Report

    22/39

    13

    4.3 SECANT METHOD

    Replacing the derivative in Newton's method with a finite difference, we get the secant method.

    This method does not require the computation (nor the existence) of a derivative, but the price is

    slower convergence (the order is approximately 1.6). The secant method also arises if oneapproximates the unknown functionf by linear interpolation

    4.4 TOLERANCE

    Tolerance is the stopping criterion with in which we expect to obtain our root. The tolerance

    usually abbreviated by TOL is the amount of error in calculation. To obtain any numerical

    solution, someone is required to enter the tolerance, this is used to determine the number of

    iterations as well as the stopping of the iterations, or else, the system can iterate the whole day

    and sometimes do not produce the approximated results. It is not usually a whole number, neither

    a negative but it is always a positive float or double value for example 10-4.

    Given the interval [a,b], the tolerance is given by (b-a) TOL/2N

    Where TOL=| pn-pn-1| and N= number of iterations

  • 8/4/2019 Numerical Solver Report

    23/39

    14

    CHAPTER 5

    5.0 PRESENTATION OF THE RESULTSThe Root Finding Numerical Approximation solver system can be regarded as a web based

    system. It can be run online on the internet or across intranets and extranets as long as it is

    uploaded into a server connected.

    The system runs on client machines with JavaScript enabled browsers like internet explorer,

    Firefox Mozilla, safari and Netscape browsers. The computer or client must have installed wamp

    server to run php and Js programs.

    The Root Finding Numerical solver does not use a database; the systems inputs are processed by

    Js codes in the systems catalog and directory to produce the output. This enhances efficiency,

    time management and increases productivity of the system

    5.1 Description of inputs and parameters to the system.The inputs to the system are numerical data in form of numbers which are entered into the text

    fields of the systems graphical user interface. Only the following inputs are accepted

    /^ [+\-\0-9] +$/. The parameters and variables of the method being used are internally

    manipulated into the systems directory. The interfaces require the following inputs;

    - Coefficients for polynomial equations to utmost the 10th degree of higher order,exponential and trigonometric equations.

    - Interval [a, b] from which the root is to be estimated for any of the above equations forthe case of Newton and Bisection methods.

    - The first two approximations p0 and p1 for the case of secant method.- The tolerance or the maximum error which is used as the stopping criteria.

    5.2 System Flow

    This is the hierarchical illustration showing the functionalities of the system. It orders the system

    functionalities in a top down fashion, creating logical links between related functionalities. It

    looks like a tree or an organization chart and this is illustrated below;

  • 8/4/2019 Numerical Solver Report

    24/39

    15

    Figure 2: process flow of the system.

    ITERATION

    CALCULATOR

    SECANT

    BISECTION

    NEWTON

    THE SYSTEM

    ROOT FINDING

    NUMERICAL SOLVER

    NEWTONS

    METHOD

    BISECTION

    METHOD

    SECANT

    METHOD

    HOME ITERATIONSCALCULATOR

    HELP

    POLYNOMIALS

    TRIGONOMETRIC

    EXPONENTIALS

    POLYNOMIALS POLYNOMIALS

    TRIGONOMETRIC TRIGONOMETRIC

    EXPONENTIALS EXPONENTIALS

  • 8/4/2019 Numerical Solver Report

    25/39

    16

    5.2 SYSTEM PAGES

    5.1.1 Start Page

    Figure3: Start page

    This is the first page that displays when the Root Finding Numerical Solver is started. It shows

    all the features that the system incorporates and clearly stipulates the out flow and organization

    of the system.

  • 8/4/2019 Numerical Solver Report

    26/39

    17

    5.1.2 ITERATIONS CALCULATOR PAGE

    Figure 4: ITERATION CALCULATOR PAGE

    It is at this page of the system that the user can enter the co-efficient for the interval [a, b] from

    which the root is expected

  • 8/4/2019 Numerical Solver Report

    27/39

    18

    5.1.3 SOLUTION FOR ITERATION CALCULATOR

    Figure5: ITERATION CALCULATOR SOLUTION

    This page displays the solutions for the number of iterations. It gives the working of a few brief

    steps and generates the final number of iterations answers after rounding off. The user enters the

    interval [a, b]=[1, 2] for this case and the tolerance TOL =0.01.

  • 8/4/2019 Numerical Solver Report

    28/39

    19

    5.1.4 NEWTONS METHOD PAGE

    Figure 6: Newtons method page

    This is the page for solving equations using Newtons method. The user clicks on NEWTON

    option at the top which has a drop down menu containing polynomials, trigonometric and

    exponentials. On selecting one of these, the format of equations for which the system handles

    appear in the left side of the system and the user chooses the option, enters the coefficients and

    click the solve button for the answer to be displayed.

  • 8/4/2019 Numerical Solver Report

    29/39

    20

    5.3.5 SOLUTION FOR NEWTONS METHOD

    Figure 8: SOLUTIONFOR NEWTONS METHOD

    The system first provides a few steps that are followed while solving equations using the

    Newtons method. It then finally produce a table of iterations, identifies the number of iterations,

    the equation entered by the user and the solution to the equation which is polynomial,

    exponential or trigonometric.

  • 8/4/2019 Numerical Solver Report

    30/39

    21

    5.1.5 THE BISECTION PAGE

    Figure 9: THE BISECTION PAGE

    This page displays after the user places a cursor on the Bisection option, which has three options

    polynomials, trigonometric and exponential equations. The user is required to enter the

    coefficients of a particular equation, enter the interval [a, b] from which the root is to be

    estimated, the stopping criteria and then at this point, the user is ready to solve the equation using

    bisection method.

  • 8/4/2019 Numerical Solver Report

    31/39

    22

    5.1.6 THE BISECTION SOLUTION PAGE

    Figure 10: THE BISECTION SOLUTION PAGE

    The Bisection Solution Page displays when the user clicks on the solve button on the bisection

    page interface. It displays the steps taken in solving a particular equation, and finally ends with

    the table of iterations depending on the tolerance value.

  • 8/4/2019 Numerical Solver Report

    32/39

    23

    5.1.7 THE BISECTION METHOD ERROR PAGE

    Figure 11: THE BISECTION METHOD ERROR PAGE

    This page displays when the entered interval [a, b] is such that f(a)f(b)>0 yet Bisection method

    requires that f(a)f(b)0 and instructsthe user to re-enter the interval from which the root is to be estimated.

  • 8/4/2019 Numerical Solver Report

    33/39

    24

    5.1.8 THE SECANT PAGE

    Figure 11: THE SECANT SOLVER

    This is the page that displays when the user selects SECANT from the menu. It drops down and

    produces three options, thus polynomials, Trigonometric and exponential. The user selects the

    optional equation type from the left. After entering the coefficients, the first two initialapproximations and the stopping criteria (TOL)/ tolerance, then the user can click the solve

    button for the solutions to be displayed instantly.

  • 8/4/2019 Numerical Solver Report

    34/39

    25

    5.1.9 THE SECANT METHOD SOLUTION PAGE

    Figure 12: THE SECANT METHOD PAGE

    The Secant Method Solution Page displays when the user clicks the solve button after satisfying

    the secant interface inputs. This page displays the solution by giving a few steps followed in

    solving equations using Secant Method, then the table of iterations and eventually notifies the

    user about the total number of iterations and the root to the specified question.

  • 8/4/2019 Numerical Solver Report

    35/39

    26

    5.1.10 THE HELP PAGE

    Figure 12: THE HELP PAGE

    From the main menu, when the user selects HELP option, it provides three options thus

    Bisection, Newton and Secant methods from which the user can learn about how they work and

    how they are used in solving the equations, polynomials, trigonometric and secant. The userchooses the option and the help message is displayed in the right hand side.

  • 8/4/2019 Numerical Solver Report

    36/39

    27

    CHAPTER SIX

    6.0 Individual critical analysis6.1 Personal contributions

    6.2 RecommendationsThe research recommends that wamp server should be installed on every machine and every

    machine should have an internet browser which is JavaScript enabled like internet explorer,

    Mozilla Firefox.

    Hardware specifications include 128 MB of RAM, a processor of minimum 500 MHz ,a 21 inch

    screen and a hard disk of at least 10 megabytes.

    6.3 Future Work

    In the future, research should also be carried out in calculating higher order polynomials up to n-

    powers and the applications or relationships between the environment and numerical

    mathematics.

  • 8/4/2019 Numerical Solver Report

    37/39

    28

    REFERENCES

    1. Miquel ,Grau-Snchez. Josep ,M. and Gutirrez,M. (2007), Accelerated iterativemethods for finding solutions of a system of nonlinear equations, Available online 28

    February 2007

    2. Sterm theorem (2000), Algorithm for finding roots of polynomials [online].Available:http://www.wikepedia.com

    3. Quo, C and Wang, D,(2006), Systematic study of Numerical Solvers for complexOscillatory Biochemical System Models, Atlanta, USA pp1-2

    4. Ward ,C and Kincaid ,D (2004), Numerical Mathematics and computing. [online].Avalaible:http://www.thomsonedu.com

    5. Prof. Hilderbrand, B. (2000), Introduction to Numerical Analysis, 2nd edition, DoverPublications, INC. Newyork, pp 34-63 .

    6. Ellis and Schwalbe, (1992), Theoretical Methods in the Physical Sciences Availableonline web.mit.edu/maple/www/plibrary/books-eng.html

    7. Kai, D., Ford, J., Neville, F. and Weilbeer, M, (2006), Journal of Computational andApplied Mathematics, Available on line: http://www.sciencedirect.com, pp 1-3.

    8. Donald, D,(2005),Polynomial equation solver, Available on line:http://cosinekitty.com/solver.htm

    9. Richard and Karl, (2007), Solving Polynomials.from http://www.wikipedia.math.com10.H. Binous, "Simulink implementation of the Oregonator model" [Online]. Available:

    http://www.mathworks.com/matlabcentral/. Accessed May 1 2006.

    11.Riley K.I and Hobson M.P etal (2004), Mathematical Methods for physics andengineering. 2nd edition. Chapter 1 pg1-4

    12.Jheriko (2002). Polynomial solver, from http://www.showthread.php.htm

  • 8/4/2019 Numerical Solver Report

    38/39

    29

    7.0 APPENDICES

    7.0.1 Appendix 1: Gantt chart

    Activity July Aug Sep Oct Nov Dec Jan Feb. Mar Apr May

    Feasibility study X x X

    Data collection x X x x

    Analysis x X x x

    Proposal writing x X x x

    Design x x x x X

    Coding and validation x x x X x

    Implementation X X X

    Report writing X X

    Presentation X

    Table 1: Gantt chart

    7.0.2 Appendix 2: Budget

    ITEM QUANTITY UNIT PRICE(SHS) AMOUNT(SHS)

    1 Laptop 1 2,000,000 2,000,000

    2 Flash Disk Drive(USB) 1 (1 GB) 30,000 30,000Others

    4 Communication (Airtime) 12 pcs 5,000 60,000

    5 Printing and Binding 200 pages 500 100,000

    6 Internet surfing time 3 months 10,000 30,000

    Total Amount 2,220,000

    Table 2: Budget

    2009 2010

  • 8/4/2019 Numerical Solver Report

    39/39