The Hong Kong University of Science and Technology
Numerical Analysis
MATH 3312

Fall 2012
MATH231
Tutorial note 0
1. FloatingPoint Numbers
Within any electronic computer, since the machine itself is finite, we can represent
only a finite set of numbers, but of course the set of real numbers which we use in, for
example calculus is infinite. I
The Hong Kong University of Science and Technology
Numerical Analysis
MATH 3312

Fall 2012
MATH231
Tutorial note 8
1. Composite Numerical Integration
b
Suppose f C 2 [a, b] . In order to approximate
f ( x)dx ,
we can subdivide the
a
interval [a,b] into n subintervals and apply Trapezoidal rule on each subinterval. That
is, we let h =
ba
and xk
The Hong Kong University of Science and Technology
Numerical Analysis
MATH 3312

Fall 2012
MATH231
Tutorial note 7
1. Numerical Integration
b
f ( x)dx ,
Given a function f which is continuous on [a,b]. If we are asked to evaluate
a
we can try to find an antiderivative of f, F ( x) , and then apply the formula
b
f ( x)dx = F (b) F (a) .
a
2
Un
The Hong Kong University of Science and Technology
Numerical Analysis
MATH 3312

Fall 2012
MATH231 Tutorial note 10
1. Introduction
Solving sets of linear of equations is the most frequently used numerical procedure
when realworld situations are modeled. Linear equations are the basis for
mathematical models foe economics, weather predictions,
The Hong Kong University of Science and Technology
Numerical Analysis
MATH 3312

Fall 2012
MATH231
Tutorial note 9
1. Initial value problem (IVP)
Consider the ordinary differential equation (ODE)
dy
= f ( t , y (t ) )
dt
y (t0 ) = y0
N +1
where f is a function from
into N for some N > 0 (if N = 1, then we have a
scalar equation; otherwise a
The Hong Kong University of Science and Technology
Numerical Analysis
MATH 3312

Fall 2012
MATH231 Tutorial note 11
1. Introduction
Given a matrix A and a vector b, both known, we can use Gaussian Elimination for
finding the vector x such that
Ax = b .
However if the A is very large and sparse (the number of nonzero elements is a small
fraction
The Hong Kong University of Science and Technology
Numerical Analysis
MATH 3312

Fall 2012
MATH231 Tutorial note 2
1. Newtons Method
Newtons method is the classic algorithm for finding roots of functions. It appears to
have been first used by Newton in 1669, although the ideas were known to others
beforehand.
Suppose f '( x) exists on [a,b] and
The Hong Kong University of Science and Technology
Numerical Analysis
MATH 3312

Fall 2012
MATH231
Tutorial note 6
1. Numerical differentiation
Give a function which is differentiable, one can always differentiate it ready. However,
equations with derivatives, that is differential equations, are rarely solvable. Because
of the importance of the
The Hong Kong University of Science and Technology
Numerical Analysis
MATH 3312

Fall 2012
MATH231
Tutorial note 1
utorial
1. Root finding
For any functionfx: , a root of f is a value p such that f ( p ) = 0 . p is also
called the zero of the function f.
It is impossible to obtain the exact root(s) of many functions using algebraic met
possible
The Hong Kong University of Science and Technology
Numerical Analysis
MATH 3312

Fall 2012
MATH231 Tutorial note 4
1. Divided differences
The Lagrange form of the interpolating polynomial gives us a very tidy construction,
but it does not lead itself well to actual computation. One of the reasons is that
whenever we decide to add a point to the
The Hong Kong University of Science and Technology
Numerical Analysis
MATH 3312

Fall 2012
MATH231 Tutorial note 3
1. Interpolation
One of the oldest problems in mathematics is the problem of construction an
approximation to a given function f from among simple functions, typically (but not
always) polynomial. A slight variation of this problem
The Hong Kong University of Science and Technology
Numerical Analysis
MATH 3312

Fall 2012
MATH231
Tutorial note 5
1. Data fitting
An important area in approximation is the problem of fitting a curve to experimental
data. Since the data is experimental, we must assume that it is polluted with some
degree of error, most common measurement error,
The Hong Kong University of Science and Technology
Numerical Analysis
MATH 3312

Fall 2012
MATH231
Tutorial note 12
1. Data fitting
An important area in approximation is the problem of fitting a curve to experimental
data. Since the data is experimental, we must assume that it is polluted with some
degree of error, most common measurement error