Download as pdf or txt
Download as pdf or txt
You are on page 1of 51

Numerical Analysis

MAT114
MODULE 1.1
Ruth P. Serquiña, Phd
Overview
This module briefly discusses a
review of fundamental
mathematical results that can be
utilized in this course. Moreover,
it introduces the types of errors
that can be made in the
computations.

MAT114
Outline

INTRODUCTION REVIEW OF ERRORS


CALCULUS

MAT114
Intended learning
outcomes
+ At the end this module, you are expected to

1. Determine the sources of errors and the types of error;

2. Examine the ways that can limit the accuracy of a number in a calculation;

3. Distinguish between propagated and generated error and find the propagated
error for the operations addition (subtraction) and multiplication (division) ;

4. Familiarize with floating point arithmetic and compute for the generated error;
and

5. Approximate functions using series representation and analyze the error


involved.

MAT114
Module
Objectives
After successful Completion of this module, you should
be able to
1. Determine the sources of errors and the types of error;

2. Examine the ways that can limit the accuracy of a number in a


calculation;

3. Distinguish between propagated and generated error and find


the propagated error for the operations addition (subtraction)
and multiplication (division) ;

4. Familiarize with floating point arithmetic and compute for the


generated error; and

5. Approximate functions using series representation and


analyze the error involved.

MAT114
MATH 251
Caveat
This module is intended for this course of
study only. It may contain some errors
and if these have been found, please
inform the instructor. It is advised that
the student will refer to the literatures on
this subject and to self-study.

MAT114
Introduction

MAT114
Numerical analysis is an area
Introduction
of mathematics and computer science
that
▪ creates,
▪ analyzes, and
▪ Implements algorithm
for obtaining numerical solutions to
problems involving continuous
variables. [11]

MAT114
Introduction

MAT114
Introduction +Purpose:
+ insights not numbers.

MAT114
Introduction +In Mathematical
analysis, one can prove
theorems about the
existence and uniqueness
of solutions but in
general, no explicit
solution can be found.

MAT114
Introduction +An explicit solution is a
formula where for each
set of values of the
relevant parameters and
for each x, we can easily
compute the
corresponding functional
value y(x).
MAT114
Applications: Mathematical
Introduction
Models in
+Natural sciences,
+social sciences,
+engineering,
+medicine, and
+business.

MAT114
Points to consider in applying
Introduction
Numerical techniques:
▪ Obtain an approximation.
▪ Determine the accuracy of the
approximate solution.
▪ Stability of the approximate solution.
▪ Efficiency of the method.

MAT114
Approximate solution:
Introduction a numerical solution/algorithm.
Accuracy:
Determine a safety factor for the
approximation, the nature of error and
convergence of solution.
Stability:
Sensitivity of the solution to small
changes in the data or parameters.
Efficiency:
Computational cost- amount of computer time
and memory required in calculation.

MAT114
Historical Background:
Introduction
https://www.britannica.com/science/nume
rical-analysis/Historical-background

MAT114
REVIEW OF CALCULUS

MAT114
Review of Calculus
➢Rolle’s Theorem
➢Mean Value Theorem (MVT)
➢First MVT for Definite Integrals
➢Second MVT for Definite
Integrals

MAT114
Review of Calculus
➢Extreme values Theorem (EVT)
➢ Intermediate Value Theorem
(IVT)
➢Taylor’s Theorem
➢Fundamental Theorem of Algebra

MAT114
Notations
1. 𝐶 𝑆 = 𝑓: 𝑓 𝑖𝑠 𝑐𝑜𝑛𝑡𝑖𝑛𝑜𝑢𝑠 𝑖𝑛 𝑆
2. 𝐶 𝑛 𝑆 = 𝑓: 𝑓 𝑎𝑛𝑑 𝑖𝑡𝑠 1𝑠𝑡 𝑛 𝑑𝑒𝑟𝑖𝑣𝑎𝑡𝑖𝑣𝑒𝑠 𝑎𝑟𝑒 𝑐𝑜𝑛𝑡𝑖𝑛𝑜𝑢𝑠 𝑖𝑛 𝑆

MAT114
Theorem 1.1 (Rolle’s Theorem)
If 𝑓(𝑥) ∈ 𝐶 𝑎, 𝑏 and is differentiable
in 𝑎, 𝑏 , and if 𝑓 𝑎 = 𝑓(𝑏), then there
exists at least one point 𝜉 ∈ 𝑎, 𝑏 such
that
𝑓′ 𝜉 =0.

MAT114
Theorem 1.2 (Mean Value Theorem (MVT))
If 𝑓(𝑥) ∈ 𝐶 𝑎, 𝑏 and is differentiable
in 𝑎, 𝑏 , and if 𝑓 𝑎 = 𝑓(𝑏), then there
exists at least one point 𝜉 ∈ 𝑎, 𝑏 such
that
𝑓 𝑏 − 𝑓 𝑎 = (𝑏 − 𝑎)𝑓′ 𝜉 .

MAT114
Theorem 1.3 (First MVT for Definite Integrals)
Let 𝑓(𝑥) ∈ 𝐶 𝑎, 𝑏 , then there exists a
number 𝜉 ∈ 𝑎, 𝑏 such that
𝑏
‫𝑓 𝑎׬‬ 𝑥 𝑑𝑥 = 𝑓 𝜉 (𝑏 − 𝑎)
or
1 𝑏
‫׬‬ 𝑓 𝑥 𝑑𝑥 = 𝑓 𝜉 .
(𝑏−𝑎) 𝑎

MAT114
Theorem 1.4 (2nd MVT for Definite Integrals)
Let 𝑔 𝑥 be integrable function that
does not change sign on the 𝑎, 𝑏 . If
𝑓(𝑥) ∈ 𝐶 𝑎, 𝑏 , then there exists a
number 𝜉 ∈ 𝑎, 𝑏 such that
𝑏 𝑏
‫𝑓 𝑎׬‬ 𝑥 𝑔 𝑥 𝑑𝑥 = 𝑓 𝜉 ‫𝑔 𝑎׬‬ 𝑥 𝑑𝑥.

MAT114
Theorem 1.5 (Extreme values Theorem)
Let 𝑓(𝑥) ∈ 𝐶 𝑎, 𝑏 , then there exists
points 𝑥𝑚 , 𝑥𝑀 ∈ 𝑎, 𝑏 such that
𝑓 𝑥𝑚 ≤ 𝑓 𝑥 ≤ 𝑓 𝑥𝑀 ,
for any 𝑥 ∈ 𝑎, 𝑏 .

A continuous function attains its maximum and minimum on a


closed interval.

MAT114
Theorem 1.5 (Extreme values Theorem)
where
𝑓 𝑥𝑚 = min 𝑓 𝑥 Lower bound
𝑥∈ 𝑎,𝑏

𝑓 𝑥𝑀 = m𝑎𝑥 𝑓 𝑥 . upper bound


𝑥∈ 𝑎,𝑏

MAT114
Theorem 1.6 (Intermediate Value Theorem)
If 𝑓(𝑥), 𝑥𝑚 and 𝑥𝑀 are given as in
Theorem 1.5, then for any value 𝑦 ∗
such that 𝑓 𝑥𝑚 ≤ 𝑦 ∗ ≤ 𝑓 𝑥𝑀 , there
exists at least one number 𝑥 ∗ ∈ 𝑎, 𝑏 such
that
𝑓 𝑥 ∗ = 𝑦∗.

MAT114
Theorem 1.7 (Taylor’s Theorem)
Let 𝑓 𝑥 ∈ 𝐶 𝑛+1 𝑎, 𝑏 . If for any two
points 𝑥, 𝑥 ∗ ∈ 𝑎, 𝑏 , then
𝑓 𝑥 =𝑃𝑛 𝑥 + 𝑅𝑛 𝑥
where
𝑛 𝑘
𝑓 ( 𝑥 ∗)
𝑃𝑛 𝑥 = ෍ 𝑥 − 𝑥∗ 𝑘
𝑘!
𝑘=0
nth Taylor’s polynomial for 𝑓 about 𝑥 ∗ .

MAT114
Theorem 1.7 (Taylor’s Theorem)
𝑛+1
(𝜉) 𝑓
𝑅𝑛 𝑥 = 𝑥 − 𝑥∗ 𝑛+1
𝑛+1 !
Remainder term

for some number 𝜉 between 𝑥 and 𝑥 .


MAT114
Theorem 1.8 (Fundamental Theorem of Algebra)
Let
𝑛

𝑝 𝑥 = ෍ 𝑎𝑘 𝑥 𝑘
𝑘=0
be an nth degree polynomial with
𝑛 ≥ 1, 𝑎𝑘 ≠ 0. Then there exist uniquely 𝑛
𝑛
constants, 𝑟𝑗 , (“zeroes of 𝑝 𝑥 ”)
𝑗=1

MAT114
Theorem 1.8 (Fundamental Theorem of Algebra)
such that
𝑝 𝑥 = 𝑎𝑛 ς𝑛𝑗=1 𝑥 − 𝑟𝑗
Where the 𝑟𝑗 ’s need not all be distinct
or all real.

MAT114
ERRORS

MAT114
+Never in history of mankind
Errors has it been possible to produce
so many wrong answers so
quickly!
+-Cark Erik Froberg

MAT114
Errors
+Error = True value
-Approximate
value

MAT114
❑Sources of Error
Errors
❑Approximation to numbers
❑Error propagation and generation
❑Floating point arithmetic
❑Approximation to functions

MAT114
Main sources of error in
Errors obtaining numerical solutions
to mathematical problems:
+1. The model
+2. The data
+3. The numerical method
+4. The representation of numbers
+5. The arithmetic

MAT114
Main sources of error
Errors
+The model
+its construction usually
involves simplifications and
omissions.

MAT114
Errors +The Model
+Tacoma Narrows Bridge disaster
[12]
+Tacoma, Seattle, USA
+opened to traffic on July 1, 1940
+Sleek and slender, it was the third longest
suspension bridge in the world at the time,
covering 5,959 feet.

https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.creativecompositesgroup.com%2Fblog%2Ftacoma-narrows-bridge-why-we-use-wind-fairings&psig=AOvVaw1BieL-
GpNcXSM5cuXm5FOt&ust=1631324783074000&source=images&cd=vfe&ved=2ahUKEwjE9vfCpPPyAhWKAKYKHTKMDP0Qr4kDegUIARCQAQ

MAT114
Errors +The Model
+Tacoma Narrows Bridge disaster
[12]
+Collapse Nov 7, 1940 due to high winds.
+The engineers had not properly considered the
aerodynamic forces that were in play at the
location during a period of strong winds.

https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.creativecompositesgroup.com%2Fblog%2Ftacoma-narrows-bridge-why-we-use-wind-fairings&psig=AOvVaw1BieL-
GpNcXSM5cuXm5FOt&ust=1631324783074000&source=images&cd=vfe&ved=2ahUKEwjE9vfCpPPyAhWKAKYKHTKMDP0Qr4kDegUIARCQAQ

MAT114
Main sources of error
Errors
+The data
+errors in measuring or
estimating values

MAT114
Main sources of error
Errors
+The numerical method
+based on some approximation

MAT114
Main sources of error
Errors
The representation of
numbers
• for instance: approximating
an irrational number by a
finite number of digits.

MAT114
Main sources of error
Errors
+The arithmetic
+frequently errors are
introduced in carrying out
operations like sum and
product.

MAT114
+Disasters caused by computer
Errors arithmetic errors
+Patriot Missile Failure
+Feb 25, 1991
+ Gulf War, an American Patriot Missile battery
in Dharan, Saudi Arabia, failed to intercept an
incoming Iraqi Scud missile.
+The Scud struck an American Army barracks
and killed 28 soldiers.
+ https://www-users.cse.umn.edu/~arnold/455.f96/disasters.html

MAT114
+Disasters caused by computer
Errors arithmetic errors
+Explosion of the Ariane 5
+June 4, 1996
+An unmanned rocket launched by the European
Space Agency exploded just forty seconds after lift-
off.
+The rocket was on its first voyage, after a decade of
development costing $7 billion. The destroyed
rocket and its cargo were valued at $500 million.
+ https://www-users.cse.umn.edu/~arnold/455.f96/disasters.html

MAT114
Machine errors
Errors
+the representation of numbers
+the arithmetic

MAT114
Example: Motion of Simple Pendulum
Assume air resistance and friction at pivot are
neglible.
Rotational motion: (nonlinear)

𝑑2 𝜃
𝑚𝐿 2 = −𝑚𝑔𝑠𝑖𝑛𝜃
𝑑𝑡
𝑠𝑖𝑛𝜃 ≈ 𝜃 (𝜃 small)
𝑑2𝜃 2
= −𝜔 𝜃 (linear)
𝑑𝑡 2
𝜔2 = 𝑔/𝐿

MAT114
Example: Motion of Simple Pendulum
Analytical Solution:
𝜃 𝑡 = 𝐴 𝑠𝑖𝑛𝜔𝑡 + 𝐵𝑐𝑜𝑠𝜔𝑡
Let T be the period,
𝜃 𝑡+𝑇 =𝜃 𝑡
Then
2𝜋
𝑇= = 2𝜋 𝐿/𝑔
𝜔
MAT114
Example: Motion of Simple Pendulum
Type of Errors:
a. Model (from nonlinear to linear)
b. Data (measuring 𝐿,𝑔)
c. Representation of 𝜋 (finite decimal)
d. Numerical method (iterative process
in computing 𝐿/𝑔, rounding error.)
e. Arithmetic error (computing 2𝜋 𝐿/𝑔)

MAT114
Summary
+From a restricted real world problem, one can obtain a
mathematical model.
+Mathematical models are not exact description of reality.
+The purpose is to have a better understanding of the reality given
a set of assumptions.
+Not all Mathematical problems have explicit solutions so that one
would resort to numerical solutions.
+In employing numerical solutions, one has to be wary of the
errors involved.

MAT114
Numerical Analysis 2nd ed: Arnold, A member of the Hodder Headline
Group.
1. Albano, A.M. (2011), Nonlinear Dynamics and Time Series Analysis with
Scilab: Bryn Mawr College. 8. Johnson, L.W., Dean Riess, R., (1982), Numerical Analysis 2nd ed: Addison-
Wesley Publishing Co., Inc.
2. Atkinson, Kendall and Han, W. (2004), Elementary Numerical Analysis 3rd
ed: John Wiley & Sons. 9. Mathews, J. H. and Fink, K.D. ( 2004), Numerical Methods Using MATLAB,
4th, International Ed: Prentice Hall International, Inc.
3. Carnahan, B., Luther and Wilkes, J.O. (1990), Applied Numerical
Methods: Krieger Pub Co. 10. Sastry, S.S. (2006), Introductory Methods of Numerical Analysis, 4th ed: PHI
Learning Pvt. Ltd.
4. Elden, L. and Wittemeyer-Koch, L. (1990), Numerical Analysis: An
Introduction: Academic Press. Boston.
11. https://www.britannica.com/science/numerical-analysis
5. Faires, D.J. and Burden, R.L. (2010), Numerical Methods 9th ed: Brooks
Cole. 12. https://www.history.com/this-day-in-history/tacoma-narrows-bridge-
6. Gerald, C. F. and Wheatley, P.O. (2003), Applied Numerical Analysis, 7th collapses
ed: Addison Wesley
7. Hosking, R.J., Joe, S., Joyce, D.C., Turner, J.C., ( 1998), First Steps in

References

MAT114

You might also like