The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
Review of theorems
Nested Interval Theorem
If I n = [an , bn ] is such that I1 I 2 I 3 . , then
II
n
= [ a, b] , where
n =1
II
a = lim an lim bn = b . If lim(bn an ) = 0 , then
n
n
n
n
contains exa
The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
Numerical answers for note 3
(1)
(2)
P2 ( x) = 0
( x 1)( x 2)
( x 0)( x 2)
( x 0)( x 1)
+ 1
+ 8
(0 1)(0 2)
(1 0)(1 2)
(2 0)(2 1)
( x (1)( x 0)( x 1)( x 2)
(2 (1)(2 0)(2 1)(2 2)
( x (2)( x (1)( x 1)(
The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
MATH230
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
The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
B: MATLAB Introduction
The name MATLAB stands for matrix
laboratory.
Features:
Math and computation
Algorithm development
Data acquisition
Modeling, simulation, and prototyping
Data analysis, explorat
The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
Numerical answers for note 1
(1)
(2)
p4 = 0.85085
p10 = 0.64160
(3)
(a) 2
(b) 2
(c) 1
(4)
We define g ( x) =
x + cos x
and p4 = 0.73912 . (You may get different p4 's
2
for other definitions of g(x).)
The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
MATH230
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 numbe
The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
MATH230 Extra tutorial note 1
1 Root finding
For any function f ( x) : , a root of f is a value p such that f ( p ) = 0 .
1.1 Bisection method
Suppose f is a continuous function defined on the interva
The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
MATH230
Tutorial note 1
1. Root finding
For any function f ( x) : , 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 r
The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
MATH230
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
The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
MATH230 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 r
The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
MATH230
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 wi
The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
MATH230
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
The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
MATH230 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
The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
MATH230
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 th
The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
MATH230
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
The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
MATH230
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
The Hong Kong University of Science and Technology
MATH 3311

Spring 2010
MATH230
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 spa