You are on page 1of 35

MODULE IN

CHEMICAL ENGINEERING

CHE 2241

Department of Chemical Engineering

SCHOOL OF ENGINEERING AND ARCHITECTURE


REF SEA-BSCHE-CHE2241-2020

MODULE 1
INTRODUCTION TO NUMERICAL METHODS
By the end of this module (Unit 1 and 2):

You should be adequately prepared to embark on your studies of numerical methods. In


general, you should have gained a fundamental understanding of the importance of
computers and the role of approximations and errors in the implementation and
development of numerical methods. In addition, the objective of these units is to
introduce you to mathematical modeling and its role in engineering problem solving.

UNIT 1. NUMERICAL AND ERROR ANALYSIS


ENGAGE
Did you wonder how mathematicians, scientists and engineers solved complex math
problems before the age of computers?

In the pre-computer era, there were generally three different ways in which engineers
approached problem solving:

1. Solutions were derived for some problems using analytical, or


exact, methods. These solutions were often useful and
provided excellent insight into the behavior of some systems.
However, analytical solutions can be derived for only a limited
class of problems. These include those that can be
approximated with linear models and those that have simple
geometry and low dimensionality. Consequently, analytical
solutions are of limited practical value because most real
problems are nonlinear and involve complex shapes and
processes.

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 12
2. Graphical solutions were used to characterize the
behavior of systems. These graphical solutions usually took the
form of plots or nomographs. Although graphical techniques can
often be used to solve complex problems, the results are not very
precise. Furthermore, graphical solutions (without the aid of
computers) are extremely tedious and awkward to implement.
Finally, graphical techniques are often limited to problems that
can be described using three or fewer dimensions.

3. Calculators and slide rules were used to implement


numerical methods manually. Although in theory such
approaches should be perfectly adequate for solving complex
problems, in actuality several difficulties are encountered. Manual
calculations are slow and tedious. Furthermore, consistent results are elusive because
of simple blunders that arise when numerous manual tasks are performed.

Since the late 1940s the widespread availability of


digital computers has led to a veritable explosion in
the use and development of numerical methods. At
first, this growth was somewhat limited by the cost of
access to large mainframe computers, and,
consequently, many engineers continued to use simple analytical
approaches in a significant portion of their work. Needless to say, the
recent evolution of inexpensive personal computers has given us
ready access to powerful computational capabilities. There are
several additional reasons why you should study numerical methods:

1. Numerical methods are extremely powerful problem-solving tools. They are capable
of handling large systems of equations, non linearities, and complicated geometries
that are not uncommon in engineering practice and that are often impossible to
solve analytically. As such, they greatly enhance your problem-solving skills.

2. During your careers, you may often have occasion to use commercially available
prepackaged, or “canned,” computer programs that involve numerical methods.
The intelligent use of these programs is often predicated on knowledge of the basic
theory underlying the methods.

3. Many problems cannot be approached using canned programs. If you are


conversant with numerical methods and are adept at computer programming, you
can design your own programs to solve problems without having to buy or commission
expensive software.

4. Numerical methods are an efficient vehicle for learning to use computers. It is well

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 13
known that an effective way to learn programming is to actually write computer
programs. When you successfully implement numerical methods on a computer and
then apply them to solve otherwise intractable problems, you will be provided with a
dramatic demonstration of how computers can serve your professional development.
At the same time, you will also learn to acknowledge and control the errors of
approximation that are part and parcel of large scale numerical calculations.

5. Numerical methods provide a vehicle for you to reinforce your understanding of


mathematics. Because one function of numerical methods is to reduce higher
mathematics to basic arithmetic operations.

EXPLORE
Numerical Analysis/Methods

Numerical analysis is the study of algorithms that use numerical approximation for the
problems of mathematical analysis which is different from discrete mathematics.

Numerical methods are techniques by which mathematical problems are formulated so that
they can be solved with arithmetic operations. Although there are many kinds of numerical
methods, they have one common characteristic: they invariably involve large numbers of
tedious arithmetic calculations. It is little wonder that with the development of fast, efficient
digital computers, the role of numerical methods in engineering problem solving has
increased dramatically in recent years.

Error Definitions/Analysis

Numerical errors arise from the use of approximations to represent exact mathematical
operations and quantities. These include truncation errors, which result when approximations
are used to represent exact mathematical procedures, and round-off errors, which result
when numbers having limited significant figures are used to represent exact numbers.

Two major forms of numerical error: round-off error and truncation error.

1. Round-off error is due to the fact that computers can represent only quantities with a
finite number of digits.
2. Truncation error is the discrepancy introduced by the fact that numerical methods
may employ approximations to represent exact mathematical operations and
quantities. Other errors are not directly connected with the numerical methods
themselves. These include blunders, formulation or model errors, and data
uncertainty.

For both types, the relationship between the exact, or true, result and the approximation can
be formulated as
!" = %&'( )*+'( – -..&/012*3( )*+'(

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 14
where !" is used to designate the exact value of the error. The subscript t is included to
designate that this is the “true” error.

One way to account for the magnitudes of the quantities being evaluated is to normalize
the error to the true value, as in
3&'( (&&/&
%&'( 4&*531/6*+ 7(+*318( !&&/& =
3&'( 8*+'(
3&'( (&&/&
%&'( 9(&5(63 7(+*318( !&&/&, ;" = 0 100%
3&'( 8*+'(

Note: Since in the real-world applications, we may not always know TRUE VALUE but can only
APPROXIMATE. Hence, for iterations
*..&/012*3( (&&/&
;? = 0 100%
*..&/012*31/6
5'&&(63 *..&/012*31/6 − .&(81/'A *..&/012*31/6
;? = 0 100%
5'&&(63 *..&/012*31/6

where the subscript a signifies that the error is normalized to an approximate value.

The signs of the previous equations may be either positive or negative. If the approximation
is greater than the true value (or the previous approximation is greater than the current
approximation), the error is negative; if the approximation is less than the true value, the error
is positive. Also, in all the equations given, the denominator may be less than zero, which can
also lead to a negative error. We are interested in whether the percent absolute value is
lower than a prespecified percent tolerance ;B . Therefore, it is often useful to employ the
absolute value of all the equations.

For such cases, the computation is repeated until


|;? | < ;B

If this relationship holds, our result is assumed to be within the prespecified acceptable level
;B .

;B = (0.5 0 10HIJ ) 0100

EXPLAIN
Let’s the following problems;

1) Suppose that you have the task of measuring the lengths of a bridge and a rivet and
come up with 9999 and 9 cm, respectively. If the true values are 10,000 and 10 cm,
respectively, compute (a) the true error and (b) the true percent relative error for each
case.

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 15
Solution:

(a) The error for measuring the bridge is


!" = 10,000 − 9999 = MNO
And for the rivet it is
!" = 10 − 9 = MNO

(b) The percent relative error for the bridge is


1
;" = 0 100% = P. PM%
10,000
And for the rivet it is
1
;" = 0 100% = MP%
10
2) In mathematics, functions can often be represented by infinite series. For example, the
exponential function below can be computed using the Maclaurin Series, find (a) true
percent error and (b) approximation error by estimating e0.5. Note: As more terms are
added in sequence, the approximation becomes a better and better estimate of the
true value of e X.
0H 0T 0J
(Q = 1 + 0 + + + ⋯ +
2 3! 6!
Solution:

Starting with the simplest version, ( Q = 1, add terms one at a time to estimate ( X.Y . After
each new term is added, compute the true and approximate percent relative errors Add
terms until the absolute value of the approximate error estimate |;? | < ;B conforming to
three significant figures, n=3. (note that the true value of ( X.Y = 1.648721 ….)

;B = (0.5 0 10HIT ) 0100 = 0.05%

1st estimate:

( X.Y = 1
1.648721 − 1
;" = 0 100% = 39.3%
1.648721
There is no ;? for the first estimate since we do not have previous approximation.

2nd estimate:

( X.Y = 1 + 0.5 = 1.5


1.648721 − 1.5
;" = 0 100% = 9.02%
1.648721
1.5 − 1
;? = 0 100% = 33.3%
1.5

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 16
3rd estimate:
0.5H
( X.Y = 1 + 0.5 + = 1.625
2
1.648721 − 1.625
;" = 0 100% = 1.44%
1.648721
1.625 − 1.5
;? = 0 100% = 7.69%
1.625

Continue the estimation until |;? | < ;B

Thus, after six terms are included, the approximate error falls below ;B = 0.05% and the

computation is terminated. Therefore, _P.` is estimated to be equal to 1.648698

ELABORATE
Formative Assessment 1:

Give at least 3 examples of under the Chemical Engineering Field that uses
numerical analysis. Include the device used, organizing principle, and the
mathematical expression.
For example:

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 17
EVALUATE
Summative Assessment 1

1. Determine the number of terms necessary to approximate cos x to 8 significant


figures using the Maclaurin series approximation. Calculate the approximation using a
value of 0 = 0.3a. Show complete solution and tabulate your answers.
0H 0e 0f 0g
cos 0 = 1 − + − + − ⋯
2 4! 6! 8!

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 18
UNIT 2. INTRODUCTION TO MATHEMATICAL SOFTWARES
ENGAGE
During the pre-computer era, significant amounts of energy were expended on the solution
technique itself, rather than on problem definition and interpretation. This unfortunate
situation existed because so much time and drudgery were required to obtain numerical
answers using pre-computer techniques.

Today, computers and numerical methods provide an alternative for such complicated
calculations. Using computer power to obtain solutions directly, you can approach these
calculations without recourse to simplifying assumptions or time-intensive techniques.
Although analytical solutions are still extremely valuable both for problem solving and for
providing insight, numerical methods represent alternatives that greatly enlarge your
capabilities to confront and solve problems. As a result, more time is available for the use of
your creative skills. Thus, more emphasis can be placed on problem formulation and solution
interpretation and the incorporation of total system, or “holistic,” awareness.

EXPLORE
Some of the Mathematical software that will be discussed under this units are Matlab,
TKSolver and Matchcad. Below are the links for the introduction of these software.

https://www.youtube.com/watch?v=ROonhizDeFQ matlab

https://www.youtube.com/watch?v=IlIuOIVGzIY tksolver

https://www.youtube.com/watch?v=UV7aU7HXv7E Mathcad

EXPLAIN
Mathematical Software

1. TK Solver is a mathematical modeling and problem solving software system based on


a declarative, rule-based language, commercialized by Universal Technical Systems
Inc. TK Solver was originally created as an equation solver, and has grown to become
a powerful mathematical modeling program. It uses a declarative programming
language and an object-based interface. While still a powerful iterative equation
solver, TK Solver is capable of much more.

2. The Netlib repository contains various collections of software routines for numerical
problems, mostly in Fortran and C. It contains freely available software, documents,
and databases of interest to the numerical, scientific computing, and other
communities. The repository is maintained by AT&T Bell Laboratories, the University of
Tennessee and Oak Ridge National Laboratory, and by colleagues world-wide. The

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 19
collection is replicated at several sites around the world, automatically synchronized,
to provide reliable and network efficient service to the global community. Popular
libraries stored at Netlib include BLAS, EISPACK, LAPACK, LINPACK, MINPACK, SLATEC

3. NAG Library is an extensive software library of highly optimized numerical analysis


routines for various programming environments. It is developed and sold by The
Numerical Algorithms Group. It is a software library of numerical analysis routines,
containing more than 1,700 mathematical and statistical algorithms. Areas covered
by the library include linear algebra, optimization, quadrature, the solution of ordinary
and partial differential equations, regression analysis, and time series analysis.

4. Datamelt (or DMelt) is a free math software for numerical computation and 2D/3D
visualization.

5. GNU Octave is a high-level language, primarily intended for numerical computations.


It provides a convenient command line interface for solving linear and nonlinear
problems numerically, and for performing other numerical experiments using a
language that is mostly compatible with MATLAB.

6. MATLAB (matrix laboratory) is a multi-paradigm numerical computing environment


and fourth-generation programming language, and is a widely used proprietary
software for performing numerical calculations. It comes with its own programming
language, in which numerical algorithms can be implemented. A proprietary
programming language developed by MathWorks, MATLAB allows matrix
manipulations, plotting of functions and data, implementation of algorithms, creation
of user interfaces, and interfacing with programs written in other languages, including
C, C++, C#, Java, Fortran and Python.

7. Mathcad attempts to bridge the gap between spreadsheets like Excel and notepads.
Mathcad is essentially an interactive notepad that allows engineers and scientists to
perform a number of common mathematical, data-handling, and graphical tasks.
Mathcad can perform tasks in either numeric or symbolic mode.

8. Scilab is advanced numerical analysis package similar to MATLAB or Octave.

9. Either Excel or MATLAB software can be used to solve a system of linear equations or
to generate of plot of x-y values. Excel is the spreadsheet produced by Microsoft, Inc.
Spreadsheets are a special type of mathematical software that allow the user to enter
and perform calculations on rows and columns of data. As such, they are a
computerized version of a large accounting worksheet on which large

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 20
interconnected calculations can be implemented and displayed. Because the entire
calculation is updated when any value on the sheet is changed, spreadsheets are
ideal for “what if?” sorts of analysis.

Excel has some built-in numerical capabilities including equation solving, curve fitting, and
optimization. It also includes VBA as a macro language that can be used to implement
numerical calculations. Finally, it has several visualization tools, such as graphs and three-
dimensional surface plots, that serve as valuable adjuncts for numerical analysis. In the
present section, we will show how these capabilities can be used to solve the parachutist
problem. To do this, let us first set up a simple spreadsheet. As shown below, the first step
involves entering labels and numbers into the spreadsheet cells.

The final spreadsheet is shown below. You can perform sensitivity analyses by changing the
values for each of the parameters. As each new value is entered, the computation and the
graph would be automatically updated. It is this interactive nature that makes Excel so
powerful. However, recognize that the ability to solve this problem hinges on being able to
write the macro with VBA.

***

Note that these are just a few of the different software used for numerical analysis. Those
provided above were chosen on the basis that they are common-use and would somehow
be utilized by the students in their curriculum.

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 21
ELABORATE
Formative Assessment 2
Aside from the given mathematical software, give at least 3 software that are used in
numerical analysis and their descriptions.
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________

EVALUATE
Summative Assessment 2
Solve Summative Assessment 1 using Excel Worksheet. Write a program to
determine your result. Label your data completely.

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 22
UNIT 3. ROOTS OF NON-LINEAR SINGLE EQUATIONS
(BRACKETING METHOD)
By the end of this module (Unit 3):

You will be able to know and apply bracketing methods for finding roots. These methods,
specifically bisection and false position method, start with guesses that bracket, or contain,
the root and then systematically reduce the width of the bracket. You will also be able to
provide visual insight into the techniques using graphical methods.

ENGAGE
Recall the different methods/theorems used for finding zeros of polynomials. List them below
and describe how it is used in solving for the roots of equations.

________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________

EXPLORE
ROOTS OF EQUATIONS

Years ago, you learned to use the quadratic formula


Ih±√h kIe?l
0 = H?
(Eq.1)

to solve

m(0) = *0 H + n0 + 5 = 0 (Eq.2)

The values calculated with Eq.1 are called the “roots” of Eq.2. They represent the values of x
that make Eq.2 equal to zero. Thus, we can define the root of an equation as the value of x
that makes f (x) = 0. For this reason, roots are sometimes called the zeros of the equation.

Although the quadratic formula is handy for solving Eq.2, there are many other functions for
which the root cannot be determined so easily. For these cases, other numerical methods
(to be discussed later) provide efficient means to obtain the answer.

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 23
EXPLAIN
Definition of Terms:

1. Algebraic functions

By definition, a function given by y = f (x) is algebraic if it can be expressed in the form

fnyn + fn-1yn-1 + … + f1y + f0 = 0

where fi = an ith-order polynomial in x. Polynomials are a simple class of algebraic


functions that are represented generally by

fn(x) = a0 + a1x + a2x2 + … +anxn

where n = the order of the polynomial and the a’s = constants.

2. Transcendental functions

These are non-algebraic functions. Thus, they are either trigonometric, exponential,
logarithmic, etc.

Examples are;

f(x) = ln x2 – 1 and f(x) = e -0.2x sin (3x – 0.5)

Roots of equations may be either real or complex. Although there are cases where complex
roots of nonpolynomials are of interest, such situations are less common than for polynomials.
As a consequence, the standard methods for locating roots typically fall into two somewhat
related but primarily distinct problem areas:

1. The determination of the real roots of algebraic and transcendental equations. These
techniques are usually designed to determine the value of a single real root on the
basis of foreknowledge of its approximate location.
2. The determination of all real and complex roots of polynomials. These methods are
specifically designed for polynomials. They systematically determine all the roots of
the polynomial rather than determining a single real root given an approximate location

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 24
METHODS OF FINDING ROOTS OF EQUATIONS

A. BRACKETING METHOD:

These deals with methods that exploit the fact that a function typically changes sign in
the vicinity of a root. These techniques are called bracketing methods because two
initial guesses for the root are required. As the name implies, these guesses must
“bracket,” or be on either side of, the root. The particular methods described herein
employ different strategies to systematically reduce the width of the bracket and,
hence, home in on the correct answer.

1. Graphical Method
2. Bisection Method
3. False Position Method

A1. GRAPHICAL METHOD

Ø Limited practical value since it is not precise


Ø Used to obtain rough estimates of roots
Ø Important tool for understanding the properties of the function

Graphical techniques are of limited practical value because they are not precise. However,
graphical methods can be utilized to obtain rough estimates of roots. These estimates can
be employed as starting guesses for numerical methods discussed in this and the next
chapter. Aside from providing rough estimates of the root, graphical interpretations are
important tools for understanding the properties of the functions and anticipating the pitfalls
of the numerical methods.

Occurrence (or absence) of a root within an interval (a, b) for f(x):

a) No roots within the interval

f(x)

a b

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 25
b) A single root bracketed by a negative and positive f(x)
f(x)

a b

c) Two roots within the interval

f(x)

a b

d) f(a) and f(b) are on opposite sides of the x-axis but shows 3 roots within the interval

f(x)

a b

Generalizations from the figures:

Ø From figure b & d,


In general, if f(a) and f(b) have opposite signs, there are an odd number of roots within
the interval.

Ø From figure a & c,


In general, if f(a) and f(b) have the same sign, there are either no roots or an even

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 26
number of roots within the interval.

Note: Although the above observations are generally true, there are cases wherein they do
no hold.

e) Functions that are tangential to the axis like f(x) = (x – 2)(x – 2)(x – 4)

x = 2 makes two terms in the polynomial equal to zero. Hence, x = 2 is a multiple root.

f(x)

a b

f) Discontinuous functions

f(x)

a b

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 27
A2. BISECTION METHOD

The bisection method, which is alternatively called binary chopping, interval halving, or
Bolzano’s method, is one type of incremental search method in which the interval is always
divided in half. If a function changes sign over an interval, the function value at the midpoint
is evaluated. The location of the root is then determined as lying at the midpoint of the
subinterval within which the sign change occurs. The process is repeated to obtain refined
estimates.

Suppose f(x) is a continuous function defined on the interval [a,b] with f(a) and f(b) of
opposite signs. Using the Intermediate Value Theorem, there exists p in [a,b] with f(p)=0.

Although the procedure works for the case when f(a) and f(b) have opposite signs and there
is more than one root in the interval (a,b), we assume that the root in this interval is unique.

Procedure:

1. Choose lower x=a and upper x=b guesses for the root such that the function changes
sign over the interval. This can be checked by ensuring that the f(a)f(b)<0.
2. Set a1=a and b1=b and let p be the midpoint of [a,b], that is, p=(a+b)/2.
3. If f(p)=0 then p=p1.
If f(p)≠0, then f(p1) has the same sign as either f(a1) or f(b1).
4. If f(p1) and f(a1) have the same signs, then p∈(p1 , b1) and set a2=p1 and b2=b1.
If f(p1) and f(a1) have opposite signs, then p∈(a1 , b1) and set a2=a1 and b2=p1.
5. Reapply the process to the interval [a,b].

A3. FALSE-POSITION METHOD

Although bisection is a perfectly valid technique for determining roots, its “brute-force”
approach is relatively inefficient. False position is an alternative based on a graphical insight.
A shortcoming of the bisection method is that, in dividing the interval from a to b into equal
halves, no account is taken of the magnitudes of f(a) and f(b). For example, if f (a) is much
closer to zero than f (b), it is likely that the root is closer to a than to b, see figure below. An
alternative method that exploits this graphical insight is to join f (a) and f (b) by a straight line.
The intersection of this line with the x-axis represents an improved estimate of the root. The
fact that the replacement of the curve by a straight line gives a “false position” of the root
is the origin of the name, method of false position, or in Latin, regula falsi. It is also called the
linear interpolation method.

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 28
Consider the graph of f(x)

Using similar triangles in the above figure, the intersection of the straight line with the x-axis
can be estimated as
m(0p ) m(0r )
=
0q − 0p 0q − 0r

Thus,
m(0r )(0p − 0r )
0q = 0r −
m(0p ) − m(0r )

This is the false-position formula. The value of xr computed with above then replaces
whichever of the two initial guesses, xl or xu, yields a function value with the same sign as f
(xr). In this way, the values of xl and xu always bracket the true root. The process is repeated
until the root is estimated adequately. The algorithm is identical to the one for bisection with
the exception that the equation is used for step 2. In addition, the same stopping criterion is
used to terminate the computation.

Definition: The stopping criterion is a value set to limit the number of iterations in the problem.
Normally, this is in terms of percent true error.

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 29
ELABORATE
Problems:

BISECTION METHOD

1. The equation f(x) = x3 + 4x2 – 10 = 0 has a root in [1,2]. Find this root.

Solution:

Choose lower x=a and upper x=b guesses for the root such that the function changes sign
over the interval. This can be checked by ensuring that the f(a)f(b)<0. True value is equal to
1.36523.

First iteration

lower x = 1, upper x = 2 or a1 = 1 and b1 = 2

f(1) = 13 + 4(1)2 -10 = -5

f(2 )= 23 + 4(2)2 -10 = 14

p1 = (a+b)/2

p1 = (1 + 2)/2 = 1.5

f(1.5) = (1.5)3 + 4(1.5)2 -10 = 2.375


1.36523 − 1.5
|;" | = 0 100 = 9.8716 %
1.36523
since both f(1) and f(1.5) have opposite signs, then a2 = 1 and b2 = 1.5

Second iteration

a2 = 1 and b2 = 1.5

f(1) = 13 + 4(1)2 -10 = -5

f(1.5 )= 23 + 4(2)2 -10 = 2.375

p2 = (1 + 1.5)/2 = 1.25

f(1.25) = (1.25)3 + 4(1.25)2 -10 = - 1.796875


1.25 − 1.5
|;? | = 0 100 = 20 %
1.25
1.36523 − 1.25
|;" | = 0 100 = 0.844034 %
1.36523

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 30
since both f(1) and f(1.25) have the same signs, then a3 = 1.25 and b3 = 1.5

Continue the iteration until the |;? | < 0.05%

The table shows the following iterations

Iteration a b p s(t) s(u) s(v)


1 1 2 1.5 -5 14 2.375
2 1 1.5 1.25 -5 2.375 -1.79688
3 1.25 1.5 1.375 -1.79688 2.375 0.162109
4 1.25 1.375 1.3125 -1.79688 0.162109 -0.84839
5 1.3125 1.375 1.34375 -0.84839 0.162109 -0.35098
6 1.34375 1.375 1.359375 -0.35098 0.162109 -0.09641
7 1.359375 1.375 1.367188 -0.09641 0.162109 0.032356
8 1.359375 1.367188 1.363281 -0.09641 0.032356 -0.03215
9 1.363281 1.367188 1.365234 -0.03215 0.032356 7.2E-05
10 1.363281 1.365234 1.364258 -0.03215 7.2E-05 -0.01605
11 1.364258 1.365234 1.364746 -0.01605 7.2E-05 -0.00799
Therefore, at the 11th iteration the approximated root is equal to 1.364746.

2. The equation f(x) = 9x4 – 15x3 + 8x2 + 20x – 38 = 0 has a root in [1,2]. Find this root.
Solution:

Choose lower x=a and upper x=b guesses for the root such that the function changes sign
over the interval. This can be checked by ensuring that the f(a)f(b)<0. True value is equal to
1.41681.

First iteration

lower x = 1, upper x = 2 or a1 = 1 and b1 = 2

f(1) = 13 + 4(1)2 -10 = -16

f(2 )= 23 + 4(2)2 -10 = 58

p1 = (a+b)/2

p1 = (1 + 2)/2 = 1.5

f(1.5) = (1.5)3 + 4(1.5)2 -10 = 4.9375


1.36523 − 1.5
|;" | = 0 100 = 5.87164 %
1.36523
since both f(1) and f(1.5) have opposite signs, then a2 = 1 and b2 = 1.5

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 31
Second iteration

a2 = 1 and b2 = 1.5

f(1) = 13 + 4(1)2 -10 = -16

f(1.5) = (1.5)3 + 4(1.5)2 -10 = 4.9375

p2 = (1 + 1.5)/2 = 1.25

f(1.25) = (1.25)3 + 4(1.25)2 -10 = -7.82422


1.25 − 1.5
|;? | = 0 100 = 20 %
1.25
1.36523 − 1.25
|;" | = 0 100 = 11.77363%
1.36523
since both f(1) and f(1.25) have the same signs, then a3 = 1.25 and b3 = 1.5

Continue the iteration until the |;? | < 0.05%

The table shows the following iterations


Iteration a b p s(t) s(u) s(v)
1 1 2 1.5 -16 58 4.9375
2 1 1.5 1.25 -16 4.9375 -7.82422
3 1.25 1.5 1.375 -7.82422 4.9375 -2.19897
4 1.375 1.5 1.4375 -2.19897 4.9375 1.154678
5 1.375 1.4375 1.40625 -2.19897 1.154678 -0.57246
6 1.40625 1.4375 1.421875 -0.57246 1.154678 0.278125
7 1.40625 1.421875 1.414063 -0.57246 0.278125 -0.15036
8 1.414063 1.421875 1.417969 -0.15036 0.278125 0.063078
9 1.414063 1.417969 1.416016 -0.15036 0.063078 -0.04384
10 1.416016 1.417969 1.416992 -0.04384 0.063078 0.009568
11 1.416016 1.416992 1.416504 -0.04384 0.009568 -0.01715

Therefore, at the 11th iteration the approximated root is equal to 1.416504.

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 32
FALSE-POSITION METHOD

1. Determine the real root of x3.5 = 80 with the false-position method to within ;B = 2.5%.
Use initial guesses of 2.0 and 5.0. true value= 3.497372

Solution;
f(x) = x3.5 – 80
a = 2 and b = 5

First Iteration:
f(a) = f(2) = (2)3.5 – 80 = -68.686292
f(b) = f(5) = (5)3.5 – 80 = 199.508497

m (n)(* − n)
.=n−
m (*) − m (n)

(wxx.YXgexy)(HIY)
. = 5 − Ifg.fgfHxHIwxx.YXgexy = 2.768318

f(p) = f(2.768318) = (2.768318)3.5 – 80 = -44.701529

3.497372 − 2.768318
|;" | = 0 100 = 20.845767%
3.497372

since both f(2) and f(2.768318) have the same signs, then a2 = 2.768318 and b2 = 5

Second Iteration:

f(a) = f(2.768318) = (2.768318)3.5 – 80 = -44.701529


f(b) = f(5) = (5)3.5 – 80 = 199.508497

m (n)(* − n)
.=n−
m (*) − m (n)

(wxx.YXgexy)(Iee.yXwYHxIY)
. = 5− Iee.yXwYHxIwxx.YXgexy
= 3.176817

f(p) = f(3.176817) = (3.176817)3.5 – 80 = -22.855720

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 33
3.176817 − 2.768318
|;? | = 0 100 = 12.858757 %
3.176817

3.497372 − 3.176817
|;" | = 0 100 = 9.165592%
3.497372

since both f(2.768318) and f(3.176817) have the same signs, then a3 = 3.176817 and b3
=5

Continue the iteration until the |;? | < 2.5%

Iteration a b p s(t) s(u) s(v)


1 2.000000 5.000000 2.768318 -68.686292 199.508497 -44.701529
2 2.768318 5.000000 3.176817 -44.701529 199.508497 -22.855720
3 3.176817 5.000000 3.364213 -22.855720 199.508497 -10.161927
4 3.364213 5.000000 3.443493 -10.161927 199.508497 -4.229976
Therefore, at the 4th iteration the approximated root is equal to 3.443493.

2. Determine the real roots of f (x) = − 0.6x2 + 2.4x + 5.5


a) Using the quadratic formula.
b) Using three iterations of the bisection method to determine the highest root.
Employ initial guesses of a = 5 and b = 10. Compute the percent true error after
each iteration.
c) Using three iterations of the false-position method to determine the highest root.
Employ initial guesses of a = 5 and b = 10. Compute the percent true error after
each iteration.

Solution:

a) Quadratic equation

−n ± √nH − 4*5
0 =
2*
−2.4 ± z(2.4)H − 4(−0.6)(5.5)
0 =
2(−0.6)
0 = −1.628590 0 = 5.628590

b) Bisection method

First Iteration:

a = 5 and b = 10

f(5) = − 0.6(5)2 + 2.4(5) + 5.5 = 2.5

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 34
f (10) = − 0.6(10)2 + 2.4(10) + 5.5 = - 30.5

p2 = (5 + 10)/2 = 7.5

f (7.5) = − 0.6(7.5)2 + 2.4(7.5) + 5.5 = -10.25


5.628590 − 7.5
|;" | = 0 100 = 33.248291%
5.628590
since both f(5) and f(7.5) have opposite signs, then a2 = 5 and b2 = 7.5

Second Iteration:

a = 5 and b = 7.5

f(5) = − 0.6(5)2 + 2.4(5) + 5.5 = 2.5

f (7.5) = − 0.6(10)2 + 2.4(10) + 5.5 = -10.25

p2 = (5 + 7.5)/2 = 6.25

f (6.25) = − 0.6(6.25)2 + 2.4(6.25) + 5.5 = -2.9375


5.628590 − 6.25
|;" | = 0 100 = 11.040243%
5.628590
since both f(5) and f(6.25) have opposite signs, then a3 = 5 and b3 = 6.25

Last Iteration:

a = 5 and b = 6.25

f(5) = − 0.6(5)2 + 2.4(5) + 5.5 = 2.5

f (6.25) = − 0.6(6.25)2 + 2.4(6.25) + 5.5 = -2.9375

p2 = (5 + 6.25)/2 = 5.625

f (6.25) = − 0.6(6.25)2 + 2.4(6.25) + 5.5 = 0.015625


5.628590 − 5.625
|;" | = 0 100 = 0.063782%
5.628590
The approximate root is 5.625

c) False Position

First Iteration:
a = 5 and b = 10

f(5) = − 0.6(5)2 + 2.4(5) + 5.5 = 2.5

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 35
f (10) = − 0.6(10)2 + 2.4(10) + 5.5 = - 30.5

m (n)(* − n)
.=n−
m (*) − m (n)

(ITX.Y)(YIwX)
. = 10 − H.Y{TX.Y
= 5.378788

f(p) = f(5.378788) = − 0.6(5.378788)2 + 2.4(5.378788) + 5.5 = 1.050275


5.628590 − 5.378788
|;" | = 0 100 = 4.438094%
5.628590

since both f(5) and f(10) have the same signs, then a2 = 5.378788 and b2 = 10

Second Iteration:
a = 5.378788 and b = 10
f(5.378788) = − 0.6(5.378788)2 + 2.4(5.378788) + 5.5 = 1.050275

f (10) = − 0.6(10)2 + 2.4(10) + 5.5 = - 30.5

m (n)(* − n)
.=n−
m (*) − m (n)

(ITX.Y)(Y.TygyggIwX)
. = 10 − = 5.532623
w.XYXHyY{TX.Y

f(p) = f(5.532623) = − 0.6(5.532623)2 + 2.4(5.532623) + 5.5 = 0.412344


5.628590 − 5.532623
|;" | = 0 100 = 1.704989%
5.628590

since both f(5.378788) and f(10) have the same signs, then a3 = 5.532623 and b3 = 10

Last Iteration:
a = 5.532623 and b = 10
f(5.532623) = − 0.6(5.532623)2 + 2.4(5.532623) + 5.5 = 0.412344

f (10) = − 0.6(10)2 + 2.4(10) + 5.5 = - 30.5

m (n)(* − n)
.=n−
m (*) − m (n)

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 36
(ITX.Y)(Y.YTHfHTIwX)
. = 10 − = 5.592214
X.ewHTeeY{TX.Y

f(p) = f(5.592214) = − 0.6(5.592214)2 + 2.4(5.592214) + 5.5 = 0.157599


5.628590 − 5.592214
|;" | = 0 100 = 0.646269%
5.628590

The approximate root is 5.592214

EVALUATE
Summative Assessment 3
1. Determine the real root of f (x) = − 26 + 85x − 91x2 + 44x3 − 8x4 + x5
a) Using bisection to determine the root to |eT| = 10%. Employ initial guesses of a =
0.5 and b = 1.0.
b) Perform the same computation as in a) but use the false-position method and
|eT| = 0.2 %.
2. Determine the real root of lnx4 = 0.7
a) Using three iterations of the bisection method. Employ initial guesses of a = 0.5
and b = 2.0.
b) Using three iterations of the false-position method with the same initial guesses as
a).
3. Determine the positive square root of 18 using false-position method to within |eT| =
0.5 %. Employ initial guesses of 4 and 5.
4. Find the positive real root of f(x) = x4 - 8x3 - 35x2 + 450x - 1001 using the false-position
method and bisection method. Use initial guesses of a = 4.5 and b = 6 and perform
five iterations. Compute both the true and approximate errors based on the fact that
the root is 5.60979. Use a plot to explain your results and perform the computation to
within es = 1.0%.
5. Determine the real root of f(x) = -25 + 82x - 90x2 + 44x3 - 8x4 + 0.7x5:
a. Graphically.
b. Using bisection to determine the root to es 5 10%. Employ initial guesses of a =
0.5 and b = 1.0.
c. Perform the same computation as in b but use the false-position method and
es = 0.2%.

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 37
UNIT 4. ROOTS OF NON-LINEAR SINGLE EQUATIONS
(OPEN METHOD)
By the end of this module (Unit 4):

You will be able to apply Open Methods in finding the roots of a single equation. You will
discover One-point iteration and Newton Method. You will be able to recognize Formula
that were developed that provide an idea of how fast open methods home in on the root.

ENGAGE
What are the differences of finding the root using the Bracketing Method to the Open
Method?

________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________

EXPLORE

OPEN METHODS:

For the bracketing methods discussed previously, the root is located within an interval
prescribed by a lower and an upper bound. Repeated application of these methods
always results in closer estimates of the true value of the root. Such methods are said to
be convergent because they move closer to the truth as the computation progresses
(Fig. a).

In contrast, the open methods described in this chapter are based on formulas that
require only a single starting value of x or two starting values that do not necessarily
bracket the root. As such, they sometimes diverge or move away from the true root as
the computation progresses (Fig. b). However, when the open methods converge (Fig.
c), they usually do so much more quickly than the bracketing methods.

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 38
a) Bracketing method

b) Diverging open method

c) Converging open method

Types of Open Methods:

1. Simple Fixed-Point Iteration


2. Newton-Raphson Method
3. The Secant Method
4. Brent’s Method

SIMPLE FIXED-POINT ITERATION/ METHOD OF SUCCESSIVE SUBSTITUTION (MOSS)

Ø Also called one-point iteration or successive substitution.


Ø For a given function f(x) = 0, transform it into g(x) = x. This may be done by algebraic
manipulation or by successive addition of x.

The equation must be in the form of;

x = g(x)

Example:
Q k {T
1. 02 – 20 + 3 = 0 can be simply manipulated to yield 0 = H
2. sin x = 0 can be simply manipulated by adding x to both sides to yield x = sin x + x

Thus, given an initial guess at the root xi, the equation can be used to compute a new
estimate xi+1 as expressed by the iterative formula:

xi+1 = g(xi)

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 39
Convergence for Fixed-Point Iteration:

NEWTON-RAPHSON METHOD

Ø This is the most widely used method.


Ø If initial guess is at root xi, a tangent can be extended from point ( xi , f(xi) ). The point
where this tangent crosses the x–axis usually represents an improved estimate of the
root.

Illustration:

Finding the slope of the tangent line, f’(xi) = m


m(0} )– 0
m’(0} ) =
(0} – 0}{w )

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 40
Rearranging to obtain the Newton-Raphson Formula
m (0} )
0}{w = 0} −
m’(0} )

ELABORATE
MOSS Problems:

1. Find the root of f(x) = e– x – x . Assume an initial guess x0 = 0.

Solution:
The function can be separated directly and expressed as xi+1 = e-xi

Starting with the initial guess x0 = 0

x1 = e-(0) = 1
x2 = e-(1) = 0.367879
x3 = e-(0.367879) = 0.692201

The iteration is repeated until the estimate is closer to the true value.

2. Use simple fixed-point iteration to locate the root of m (0) = sin(√0) − 0. Use an initial
guess xi = 0.5 and iterate until eT ≤ 0.001 %.

Solution:
True value = 0.768649
The function can be expressed as: 0 = sin(√0) by adding x to both sides of the equation.

Starting with the initial guess x0 = 0.5

x1 = sin(√0.5) = 0.649636
x2 = sin(√0.649636) = 0.721523
x3 = sin(√0.721523) = 0.750901

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 41
i xi Et (100)
1 0.500000 34.9508
2 0.649637 15.48328
3 0.721524 6.130913
4 0.750901 2.308965
5 0.762097 0.852424
6 0.766248 0.312348
7 0.767772 0.114141
8 0.768329 0.041676
9 0.768532 0.015219
10 0.768606 0.005564
11 0.768633 0.002042
12 0.768643 0.000757

The approximate root is 0.768643

Newton-Raphson Problems:

1. Obtain the unique solution for f(x) = x3 + 4x2 – 10 on the interval [1,2].

Solution:
Initial guess is in between the interval given x0=1.5

m (0} )
0}{w = 0} −
m’(0} )

f(x) = x3 + 4x2 – 10
f’(x) = 3x2 + 8x

First Iteration
f(1.5) = (1.5)3 +4(1.5)2 – 10 = 2.375
f’(1.5) = 3(1.5)2 + 8(1.5) = 18.75

m (0} ) 2.375
0}{w = 0} − = 1.5 − = 1.373333
m’(0} ) 18.75

x1 now is equal to 1.373333

Second Iteration
f(1.373333) = (1.373333)3 +4(1.373333)2 – 10 = 0.134345
f’(1.373333) = 3(1.373333)2 + 8(1.373333) = 16.6448

m (0} ) 0.134345
0}{w = 0} − = 1.373333 − = 1.365262
m’(0} ) 16.6448

x2 now is equal to 1.365262

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 42
Third Iteration
f(1.365262) = (1.365262)3 +4(1.365262)2 – 10 = 0.000528
f’(1.365262) = 3(1.365262)2 + 8(1.365262) = 16.513917

m (0} ) 0.000528
0}{w = 0} − = 1.365262 − = 1.365230
m’(0} ) 16.513917

x3 now is equal to 1.36523

Fourth Iteration
f(1.36523) = (1.36523)3 +4(1.36523)2 – 10 = -2.21512x10-7

f(x3) is approximately near to zero thus the estimate root of the equation is 1.36523
i xi f(xi) f’(xi) xi+1 ea (100)
0 1.500000 2.375000 18.750000 1.373333
1 1.373333 0.134345 16.644800 1.365262 -0.092233
2 1.365262 0.000528 16.513917 1.365230 -0.0059119
3 1.365230 0.000000 16.513399 1.365230 -2.344E-05

2. Estimate the root of f(x) = e– x – x using an initial guess of x0 = 0.

Solution:
Initial guess is x0=0

m (0} )
0}{w = 0} −
m’(0} )

f(x) = e– x – x
f’(x) = -e– x – 1
First Iteration
f(0) = e– 0 – 0 = 1
f’(0) = -e– 0 – 1 = -2

m (0} ) 1
0}{w = 0} − =0− = 0.5
m’(0} ) −2

x1 now is equal to 0.5

Second Iteration
f(0.5) = e– 0.5 – 0.5 = 0.106531
f’(0.5) = -e– 0.5 – 1 = -1.606531

m (0} ) 0.106531
0}{w = 0} − = 0.5 − = 0.566311
m’(0} ) −1.606531

x2 now is equal to 0.566311

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 43
Third Iteration
f(0.566311) = e– 0.566311– 0.566311= 0.001305
f’(0.566311) = -e– 0.566311– 1 = -1.567616

m (0} ) 0.001305
0}{w = 0} − = 0.566311 − = 0.567143
m’(0} ) −1.567616

x3 now is equal to 0.567143

Fourth Iteration
f(0.567143) = e– 0.567143– 0.567143= 4.551138 x 10-7

f(x3) is approximately near to zero thus the estimate root of the equation is 0.567143

i xi f(xi) f’(xi) xi+1 ea (100)


0 0.000000 1.000000 -2.000000 0.500000
1 0.500000 0.106531 -1.606531 0.566311 1
2 0.566311 0.001305 -1.567616 0.567143 0.1170929
3 0.567143 0.000000 -1.567143 0.567143 0.0014673

3. Find the solution to within 10 – 4 of the function f(x) = sinx – e– x , [0, 1].

Solution:
Initial guess is x0=0.5

m (0} )
0}{w = 0} −
m’(0} )

f(x) = sinx – e– x
f’(x) = cosx + e– x

First Iteration
f(0.5) = sin(0.5) – e– 0.5 = -0.127105
f’(0.5) = cos(0.5) + e– 0.5 = 1.484113

m (0} ) −0.127105
0}{w = 0} − = 0.5 − = 0.585644
m’(0} ) 1.484113

x1 now is equal to 0.585644

Second Iteration
f(0.585644) = sin(0.585644) – e– 0.585644= -0.004011
f’(0.585644) = cos(0.585644) + e– 0.585644= 1.390104

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 44
m (0} ) −0.004011
0}{w = 0} − = 0.585644 − = 0.588529
m’(0} ) 1.390104

x2 now is equal to 0.588529

continue the iteration until xi = xi+1

i xi f(xi) f’(xi) xi+1 ea (100)


0 0.500000 -0.127105 1.484113 0.585644
1 0.585644 -0.004011 1.390104 0.588529 0.1462387
2 0.588529 -0.000005 1.386901 0.588533 0.0049031
3 0.588533 0.000000 1.386897 0.588533 5.66E-06

The estimate root of the equation is 0.588533.

ELABORATE
In what areas or types of functions is the MOSS and Newton-Raphson method a
disadvantage? Give at least 3.

EVALUATE
Summative Assessment #4

Answer the following problems. Give step by step solution for the first three iterations only.
Tabulate every data used in the iterations. Box your final answer.

1. Find the solution to within 10 – 4 of the function f(x) = x3 + 3x2 – 1, [– 3, – 2]. Use MOSS.

2. Determine the highest real root of f(x) = 2x3 - 11.7x2 + 17.7x - 5


a. Graphically.
b. Fixed-point iteration method (three iterations, x0 = 3). Note: Make certain that
you develop a solution that converges on the root.
c. Newton-Raphson method (three iterations, x0 = 3).

3. Use the Newton-Raphson method to find the root of f(x) = e-0.5x(4 - x) – 2. Employ initial
guesses of (a) 2, (b) 6, and (c) 8.

Property of and for the exclusive use of SLU. Reproduction, storing in a retrieval system, distributing, uploading or posting online, or transmitting in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise of any part of this document, without the prior written permission of SLU, is strictly prohibited. 45

You might also like