Module 1
Module 1
CHEMICAL ENGINEERING
CHE 2241
MODULE 1
INTRODUCTION TO NUMERICAL METHODS
By the end of this module (Unit 1 and 2):
In the pre-computer era, there were generally three different ways in which engineers
approached problem solving:
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.
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.
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.
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.
If this relationship holds, our result is assumed to be within the prespecified acceptable level
;B .
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:
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 ….)
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:
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
Thus, after six terms are included, the approximate error falls below ;B = 0.05% and the
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
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
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
4. Datamelt (or DMelt) is a free math software for numerical computation and 2D/3D
visualization.
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.
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
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
2. Transcendental functions
These are non-algebraic functions. Thus, they are either trigonometric, exponential,
logarithmic, etc.
Examples are;
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
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.
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
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
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].
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
p1 = (a+b)/2
p1 = (1 + 2)/2 = 1.5
Second iteration
a2 = 1 and b2 = 1.5
p2 = (1 + 1.5)/2 = 1.25
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
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
p1 = (a+b)/2
p1 = (1 + 2)/2 = 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
p2 = (1 + 1.5)/2 = 1.25
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
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:
m (n)(* − n)
.=n−
m (*) − m (n)
(wxx.YXgexy)(Iee.yXwYHxIY)
. = 5− Iee.yXwYHxIwxx.YXgexy
= 3.176817
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
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
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
Second Iteration:
a = 5 and b = 7.5
p2 = (5 + 7.5)/2 = 6.25
Last Iteration:
a = 5 and b = 6.25
p2 = (5 + 6.25)/2 = 5.625
c) False Position
First Iteration:
a = 5 and b = 10
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
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
m (n)(* − n)
.=n−
m (*) − m (n)
(ITX.Y)(Y.TygyggIwX)
. = 10 − = 5.532623
w.XYXHyY{TX.Y
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
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
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
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
Illustration:
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:
Solution:
The function can be separated directly and expressed as xi+1 = e-xi
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.
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
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
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
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
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
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
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
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
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
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
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
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.
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