Numerical Lecture Note Chap1 31048
Numerical Lecture Note Chap1 31048
Mathematical Modeling,
Errors and Approximations in Computation
Mikiyas G/samuel
Department of Mathematics
College of Natural Sciences
Arba Minch University
[email protected]
Abstract
Module Summary: The purpose of this module is to show you how
mathematical models can be formulated and introduce you with the major
sources of errors & their approximations involved in numerical methods.
Table of Contents
1 Motivation
What are numerical methods?
Why should you study numerical methods?
2 Mathematical Modeling
A Simple Mathematical Model
Conservation Laws in Engineering and Science
where,
the dependent variable is a characteristic that reflects the behavior or
state of the system:
the independent variables are usually dimensions, such as time and
space.
the parameters are reflective of the system’s properties or
composition; and
the forcing functions are external influences acting upon it.
Note: the above mathematical expression can range from a simple
algebraic relationship to large complicated sets of differential equations.
Mikiyas G/samuel (MSc.) Numerical Methods 3 / 23
Cont...
For example, on the basis of his observations, Newton formulated his
second law of motion, which states that the time rate of change of
momentum of a body is equal to the resultant force acting on it. The
mathematical expression, or model, of the second law is the
well-known equation
F = ma (1)
where F is the net force acting on the body (kg m/s2 ), m is the mass
of the object (kg), and a is its acceleration (m/s2 ).
By dividing both sides by m, the second law can be written as:
F
a= (2)
m
Here, a is the dependent variable reflecting the system’s behavior, F
is the forcing function, and m is a parameter. Note that for this
simple case there is no independent variable because we are not yet
predicting how acceleration varies in time or space.
Mikiyas G/samuel (MSc.) Numerical Methods 4 / 23
Cont...
Equation (2) has a number of characteristics that are typical of
mathematical models of the physical world.
It describes a natural process or system in mathematical terms.
It represents an idealization and simplification of reality. That is, the
model ignores negligible details of the natural process and focuses on
its essential manifestations. Thus, the second law does not include
the effects of relativity that are of minimal importance when applied
to objects and forces that interact on or about the earth’s surface at
velocities and on scales visible to humans.
Finally, it yields reproducible results and, consequently, can be used
for predictive purposes. For example, if the force on an object and
its mass are known, Eq. (2) can be used to compute acceleration.
Because of its simple algebraic form, the solution of Eq. (2) can be
obtained easily. However, other mathematical models of physical
phenomena may be much more complex, and either cannot be solved
exactly or require more sophisticated mathematical techniques than
simple algebra for their solution.
Mikiyas G/samuel (MSc.) Numerical Methods 5 / 23
Cont...
Fore example, If we consider the model for a falling object which encounters air
resistance that is proportional to its velocity ν. Then, the rate of change of the
velocity is given by:
dν
= kν − 9.8
dt
, where the acceleration due to gravity is −9.8 m/sec2 and k is constant. if the
object is initially at rest (v = 0 at t = 0), a simple calculus can be used to solve
the above equation as a function of time t for:
.
This is called an analytical or exact solution because it exactly satisfies the
original differential equation. Unfortunately, there are many mathematical models
that cannot be solved exactly. In many of these cases, the only alternative is to
develop a numerical method that approximates the exact solution.
Numerical methods are those in which the mathematical problem is reformulated
so it can be solved by arithmetic operations.
We’ll discuss it in more detail when we turn to differential equations later in this
course.
Mikiyas G/samuel (MSc.) Numerical Methods 6 / 23
Conservation Laws
Conservation laws are major organizing principles in science and engineering.
They all reduce to:
Eq. (3) is one of the most fundamental ways in which conservation laws are used in
engineering and science-that is important to predict changes with respect to time.
If change is zero, Eq. (3) becomes
Thus, if no change occurs, the increases and decreases must be in balance. This
case, which is also given a special name-the steady-state calculation-has many
applications in engineering and science.
For the junction in Fig. 1, the balance equation can be used to compute that the
flow out of the fourth pipe must be 60.
change of
the amount of mass the amount of mass
mass of a chemical = −
flowing in flowing out
in the reactor
2 Civil and mechanical engineers often focus on models developed from the
conservation of momentum. For civil engineering, force balances are utilized to
analyze structures such as the simple truss presented below. The same principles are
employed for the mechanical engineering case studies to analyze the transient
up-and-down motion or vibrations of an automobile.
F = mg (6)
Types of Errors
1 Inherent Error:
is the error due to the simplified assumptions of the formulated mathematical problem
or due to the errors in the physical measurements of the parameters of the problem.
2 Round-off error:
arise because digital computers cannot represent some quantities exactly.
There are two major facets of round-off errors involved in numerical calculation
1 Digital computers have size and precision limits on their ability to represent numbers.
2 Certain numerical manipulations are highly sensitive to round-off errors.
3 Truncation errors: are those that result from using an approximation in place of an
exact mathematical procedure.
Mikiyas G/samuel (MSc.) Numerical Methods 12 / 23
Cont...
Example 1: Consider the mathematical description of
the simple pendulum oscillation:
x2 x3
ex = 1 + x + + + ... (9)
2 3!
results in a truncation error.
|x − x
e|
εp = × 100% = εr × 100% (12)
x
Mikiyas G/samuel (MSc.) Numerical Methods 14 / 23
Cont...
Example 1:
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
absolute error, εa , (b) the relative error εr and (c) the percentage error, εp for each case.
Solution:
(a) The absolute error for measuring the bridge is |10 − 9| 1
εr = = = 0.1 cm
ε = |x − x e| 10 10
a
= |10, 000 − 9999| = 1 cm (c) The percentage error for the bridge is
(b) The relative error for the bridge is εp = 0.1 × 100% = 10%
Assume all ∆xi ’s are small fractions and 1, the the terms containing (∆xi )2 and higher powers of ∆xi will be neglected and Eq.
∆xi
xi
15 can be rewritten as:
∂u ∂u
u + ∆u = f (x1 , x2 , ..., xn ) + ∆x1 + ... + ∆xn . (16)
∂x1 ∂xn
This implies,
∂u ∂u
∆u = ∆x1 + ... + ∆xn (17)
∂x1 ∂xn
is the general formula for errors.
By taking modulus and dividing both sides of Eq. 17 by u we get, maximum absolute error:
∂u ∂u
(εa )max = |∆u| ≤ ∆x1 + ... + ∆xn . (18)
∂x1 ∂xn