CHE 306 Lesson Note 1
CHE 306 Lesson Note 1
Exam: 60 – 65 %
Mainly (80 – 100 marks)
Not all in all a Note on
the course
Bisection Method
CONTENTS
Fixed-Point Iterative (FPI) Methods
Jacobi Iteration
Gauss-Seidel Iteration
INTERPOLATION AND
POLYNOMIAL
APPROXIMATION
Linear Interpolation
Quadratic Interpolation
CONTENTS Lagrange interpolation
Divided Difference Interpolation –
Divided differences and polynomials
Equal-spaced Interpolations
Difference operators and difference Tables
Forward, backward, and central differences
NUMERICAL INTEGRATION
AND DIFFERENTIATION
Numerical Differentiation
Difference Notation and Operators
Numerical Integration
CONTENTS - Trapezoidal Rule
- Simpson’s Rule
- Mid-Point Rule
- Romberg Integration
NUMERICAL SOLUTION OF
INITIAL VALUE PROBLEMS
Euler Method
CONTENTS
Runge-Kutta Methods
Predictor-Corrector Methods.
In the process of solving problems in
Science, Engineering, Economics, etc., a
physical situation is first converted into a
mathematical model.
This is often called formulation of the
PRELIMINARIES problem.
This mathematical model often gives rise
to mathematical problems which are too
difficult to solve in a neat, closed form
e.g.
Integration: Find
Nonlinear Equation: Solve
Linear Algebra: Find the eigenvalues of a
large matrix
Differential equations: Solve a system of
nonlinear differential equations.
PRELIMINARIES When such problem arises, numerical
analysis is then used for developing
techniques to find a solution or
approximate solution of the
mathematical equations describing the
model.
A numerical method (or a combination
of numerical methods) which can be to
solve a problem is often called an
algorithm.
An algorithm is a complete and
unambiguous set of procedures leading
PRELIMINARIES
to the solution of a mathematical
problem.
The results obtained for the solution of a
problem will be affected by various
source of error.
Numerical analysts must consider how
much accuracy is required, estimate the
magnitude of round-off and discretization
errors, determine an appropriate step-size
or the number of iterations required,
provide for checks on the accuracy and
make allowance for corrective action in
PRELIMINARIES
cases of non-convergence.
The efficiency of any numerical method
(or algorithm) must also be considered.
An algorithm would be of no practical
use if it required the largest computer
error built to obtain a useful answer.
The final phase in solving a problem is
programming. Programming is the transformation
of the algorithm into a set of unambiguous step-
by-step instructions for the computer.
In this segment of the course, we will look at the
design (formulation) and analysis of various
numerical methods and assess them in terms of
accuracy, efficiency and computer effort.
PRELIMINARIES
This will involve some mathematical analysis and
some practical work using MATLAB.
It is expected that students attending this course
avail themselves some software packages and get
them installed on their computing facilities
(Laptop, PC, etc.).
You may be required to bring these facilities to the
What are numerical methods and why
should you study them?
Numerical methods are techniques by
which mathematical problems are
formulated so that they can be solved with
PRELIMINARIES arithmetic and logical operations.
Because digital computers excel at
1.1 Motivation performing such operations, numerical
methods are sometimes referred to as
computer mathematics.
In the pre–computer era, the time and
drudgery of implementing such
calculations seriously limited their practical
However, with the advent of fast, inexpensive
digital computers, the role of numerical
methods in engineering and scientific problem
solving has exploded.
Because they feature so prominently in much
of our work, I believe that numerical methods
PRELIMINARIES should be a part of every engineer’s and
scientist’s basic education.
1.1 Motivation Just as we all must have solid foundations in
the other areas of mathematics and science, we
should also have a fundamental understanding
of numerical methods.
In particular, we should have a solid
appreciation of both their capabilities and their
Beyond contributing to your overall
education, there are several additional
reasons why you should study numerical
methods:
They greatly enhance your problem-
PRELIMINARIES solving skills.
Numerical methods allow you to use
1.1 Motivation “canned” software with insight.
It enables you to design your own
programs to solve problems without
having to buy or commission expensive
software.
Numerical methods are an efficient vehicle
for learning to use computers. Because
numerical methods are expressly designed for
computer implementation, they are ideal for
illustrating the computer’s powers and
limitations.
PRELIMINARIES Numerical methods provide a vehicle for you
to reinforce your understanding of
1.1 Motivation mathematics.
1.2 Problem
Modelling Example 1.1
Formulation and
A mathematical model can be broadly
Problem Solving
defined as a formulation or equation that
expresses the essential features of a
physical system or process in
mathematical terms.
In a very general sense, it can be represented as a
functional relationship of the form
(1.1)
1.2 Problem
Formulation and
Problem Solving
(1.8)
PRELIMINARIES
(1.9)
Note that Eq. (1.9) is cast in the general form of
Eq. (1.1) where v(t) is the dependent variable, t is
the independent variable, cd and m are
parameters, and g is the forcing function.
Illustration 1: Analytical Solution to the Bungee
PRELIMINARIES Jumper Problem
Problem Statement: A bungee jumper with a
1.2 Problem mass of 68.1 kg leaps from a stationary hot air
Formulation and balloon.
Problem Solving Use Eq. (1.9) to compute velocity for the first 12
s of free fall.
Also determine the terminal velocity that will be
attained for an infinitely long cord.
Use a drag coefficient of 0.25 kg/m.
Solution: Inserting the parameters into Eq.
(1.9) yields
PRELIMINARIES
1.2 Problem
Formulation and which can be used to compute the Table
Problem Solving below
PRELIMINARIES
1.2 Problem
Formulation and
Problem Solving
According to the model, the jumper accelerates
rapidly (Fig. 1.2). A velocity of 49.4214 m/s
(about 110 mi/hr) is attained after 10 s.
Note also that after a sufficiently long
time, a constant velocity, called the
terminal velocity, of 51.6983 m/s (115.6
mi/hr) is reached.
PRELIMINARIES This velocity is constant because,
eventually, the force of gravity will be in
1.2 Problem balance with the air resistance.
Formulation and Thus, the net force is zero and acceleration
Problem Solving has ceased.
PRELIMINARIES
1.2 Problem
Formulation and
Problem Solving
FIGURE 1.2: The analytical solution for the bungee jumper
problem as computed in Example 1.1. Velocity increases with time
and asymptotically approaches a terminal velocity.
Modelling Example 1.2
0
PRELIMINARIES Cannon
Target
d
Formulation and
Where = angle of elevation.
Problem Solving
v0= muzzle speed.
From kinematic and projectile motion, the
distance travelled by the canon ball is
obtained as follows.
(1.11)
(1.12)
PRELIMINARIES
PRELIMINARIES
1.2 Problem
Formulation and
Problem Solving
(1.15)
Distance travelled to hit the target,
PRELIMINARIES
1.2 Problem
Formulation and
(1.16)
Problem Solving
PRELIMINARIES
1.2 Problem
Formulation and
(1.16)
Problem Solving
PRELIMINARIES (1.17)
(1.20)
Aside from Newton’s second law, there are
other major organizing principles in
science and engineering.
PRELIMINARIES Among the most important of these are the
conservation laws.
1.3
Although they form the basis for a variety
CONSERVATION
of complicated and powerful mathematical
LAWS IN models, the great conservation laws of
ENGINEERING science and engineering are conceptually
AND SCIENCE easy to understand.
They all boil down to
(1.24)
Change = increases - decreases
This is precisely the format that we employed when
using Newton’s law to develop a force balance for the
bungee jumper [Eq. (1.8)].
Although simple, Eq. (1.14) embodies one of the mos
PRELIMINARIES
fundamental ways in which conservation laws are
used in engineering and science-that is, to predict
1.3 changes with respect to time. We will give it a special
name-the time-variable (or transient) computation.
CONSERVATION
Aside from predicting changes, another way in which
LAWS IN conservation laws are applied is for cases where
ENGINEERING change is non-existent. If change is zero, Eq. (1.14)
AND SCIENCE becomes
Change = 0 = increases – decrease
Or
(1.25)
Increases = decreases
Thus, if no change occurs, the increases
and decreases must be in balance.
This case, which is also given a special
PRELIMINARIES
name—the steady-state calculation—has
many applications in engineering and
1.3 science. For example, for steady-state
CONSERVATION incompressible fluid flow in pipes, the
LAWS IN flow into a junction must be balanced by
ENGINEERING flow going out, as in,
AND SCIENCE Flow in = Flow out (1.26)
PRELIMINARIES
1.3
CONSERVATION
LAWS IN FIGURE 1.5: A flow balance for steady incompressible fluid flow at the junction of pipes.
ENGINEERING
AND SCIENCE
For the junction in Fig. 1.5, the balance
can be used to compute that the flow out
of the fourth pipe must be 60.
For the bungee jumper, the steady-state
condition would correspond to the case
where the net force was zero or [Eq. (1.8)
PRELIMINARIES with dv/dt = 0]
(1.26)
1.3 Thus, at steady state, the downward and
CONSERVATION upward forces are in balance and Eq. (1.26)
LAWS IN can be solved for the terminal velocity,
ENGINEERING
AND SCIENCE (1.27)
Eqs. (1.24) and (1.25) embody the two
fundamental ways that conservation laws
are employed in engineering and science.
PRELIMINARIES
1.3
CONSERVATION
LAWS IN
ENGINEERING
AND SCIENCE