Numerical Methods Lecture (Autosaved)
Numerical Methods Lecture (Autosaved)
BY
ENGR. JORGE P. BAUTISTA
EE, MEP-ECE
REFERENCES
- Applied Numerical Analysis (1994), 5th ed,
Gerald and Wheatley, Addison Wesley
- Numerical Methods for Engineers (2002) 4th
ed, Chapra and Canale, McGraw Hills
- Numerical methods in Engineering Practice (
1986), Al-Khafaji and Tooley,CBS College
Publishing
- https://www.symbolab.com/solver/taylor-
series-calculator/taylor%20ln%5Cleft(x-
1%5Cright)%2C2
COURSE OUTLINE
1. APPROXIMATION AND ERRORS
2. MATRIX AND DETERMINANTS
3. LINEAR EQUATIONS
4. NON-LINEAR EQUATIONS
5. EIGEN VECTORS
6. CURVE FITTING AND INTERPOLATIONS
7. NUMEIRCAL DIFFERENTIATION
8. NUMERICAL INTEGRATION
Lesson No. 1
Approximation and Errors
Lesson objectives: at the end of the lesson,
the student would be able to
1. Explain the need of numerical analysis
2. Recognize the importance of numerical
approximations and errors
3. Write the series expansion of binomial
theorem, Taylor and Mclaurin’s
What is numerical methods?
Numerical analysis is the study
of algorithms that use
numerical approximation (as opposed to
general symbolic manipulations) for the
problems of mathematical analysis (as
distinguished from discrete mathematics).
Problems that can not be solved
analytically can be solved using
numerical methods.
f(x) = x – tan x , x2 + 4x = -4, etc
The numerical solutions of engineering
problems involves repeated operations. In
this lesson we shall examine the question
of errors in terms of their sources and they
may affect the solution of engineering
problems. In the analysis of the accuracy
of calculated results, the numerical
analyst should be capable of tracing all
the possible sources of errors in each
stage of the computational process and
determine the extent to which these errors
can affect the final answer.
Algorithm - a step by step procedure that
produces a systematic solution to a
problem.
Programmming:
1. Excel
2. c++
3. MATLAB
Concept of Errors
Sources of errors
1. Gross errors – due to human , mechanical or
electrical mistakes
2. Round-off errors
0.33333333… to 0.3333
with error = 0.00003333
0.6666666… to 0.6667
with error = 0.0000334
3. Introduction of constant in as many decimal
places like , e and √7
Three types of error often occur in a
computation, the initial data, truncation
and round-off.
Initial data errors are caused by idealistic
assumption made to simplify the model,
inaccurate measurement of data,
miscopying of figures or the inaccurate
representation of mathematical
constants.
Truncation error occurs when the analyst is force
to use mathematical techniques that give
approximate rather than exact answers
usually encountered in numerical methods.
Rounding-off error is caused by the disregard in
the use of significant figure.
Et = true value – approximation
Et = exact value of the error
True fractional relative error = true error/true
value
If this is multiplied by 100%, it is known as relative
error.
A short coming of this definition is that it takes
no account of the order of magnitude of the
value under examination.
The errors associated with both calculations
and measurements can be characterized
with regard to their accuracy and
precision. Accuracy refers to how closely
a computed or measured values agrees
with the true value. Precision refers to how
closely individual computed or measured
values agree with each other. These
concepts can be illustrated graphically
using an analogy from target practice.
The bullet holes on each target can be
thought of as the prediction of a
numerical technique whereas the bull’s
eye represent the truth. Inaccuracy also
called bias is defined as systematic
deviation from the truth. Imprecision also
called uncertainty refers to the
magnitude of the scatter.
Example no. 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
cm and 10 cm, respectively. Compute
a. The true error
b. The true percent relative error for each
case.
Both of them have an error of 1cm, the
relative error of the rivet is much greater
and the impact is high.
2. The equation below is the expansion of ex
ex = 1 + x + x2/2! + x3/3! + x4/4! + x5/5! … +
xn/n!
Estimate e0.5 and determine the amount of
error for each incremental terms.
3. A parachutist of mass 68.1kg jumps out of
a stationary hot air balloon. The drag
coefficient is 12.5kg/s. To compute the
velocity prior to opening the cute is
v(t) = gm(1 – e-(c/m)t)/c
where g = gravitational force
m = mass of the falling object
c = drag coefficient
Determine the terminal velocity of the man.
4. Evaluate the polynomial
y = x3 – 7x2 + 8x - 0.35 at x = 1.374. use 3
digit arithmetic with chopping. Evaluate the
percent relative error.
re-evaluate the polynomial using Horne’s
method.
Binomial theorem
Construct the Pascal’s triangle:
From binomial polynomial:
(x + y)0 = 1
(x + y)1 = x + y
(x+ y)2 = x2 + 2xy + y2
(x + y)3 = x3 + 3x2y + 3xy2 + y3
Notice the coefficient of the terms.
The coefficient of the first term decreases
while the coefficient of the second term
increases.
The binomial expansion
The binomial theorem states that:
(x+y)n = nk = 0 C(n,k) xn-k yk
f(x) @ P s(s + 1)
s(s + 1) . . . (s +
n(x) =
Ñ2fn +...+ n -1) Ñnfn
fn +
sÑfn + 2! n!
Assignment No. 7
Use newton forward formula to estimate the
polynomial of the given points
X 2 5 8 11
f(x) 7.5 141 634.5 1731
Use lagrange equation to estimate the
polynomial of the given points
x 0 1 2 4
f(x) 1 1 2 -2