Numerical answers for note 6
(1)
Forward difference: f '(0.68) 11.658
Backward difference: f '(0.68) 40.930
Forward difference: f '(0.69) 1.313
Backward difference: f '(0.69) 11.658
(2)
Equation (1): Error bound =
K
0.0033333K
300
K
0.0016667 K
600
Equa
Numerical answers for note 5
(1)
(2)
Forward difference: f '(0.68) 11.658
Backward difference: f '(0.68) 40.930
Forward difference: f '(0.69) 1.313
Backward difference: f '(0.69) 11.658
Equation (1): Error bound =
K
0.0033333K
300
K
0.0016667 K
600
Equa
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)( x 2)
+ 0 .7
(1 (2)(1 0)(1 1)(1 2)
( x (2)( x (1)( x 1)
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).)
(5)
Assume we dont know p = 3 ,
know what ps are.)
= 1
B: MATLAB Introduction
The name MATLAB stands for matrix
laboratory.
Features:
Math and computation
Algorithm development
Data acquisition
Modeling, simulation, and prototyping
Data analysis, exploration, and visualization
Scientific and engineering graph
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 sparse (the number of nonzero elements is a small
fraction
MATH230
Tutorial note 10
1. Introduction
Solving sets of linear of equations is the most frequently used numerical procedure
when real-world situations are modeled. Linear equations are the basis for
mathematical models foe economics, weather predictions,
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 (if N = 1, then we have a
scalar equation; otherwise a
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 rule on each subinterval. That
is, we let h =
ba
and xk
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 then apply the formula
b
f ( x)dx = F (b) F (a) .
a
2
Un
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, are rarely solvable. Because
of the importance of the
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 with some
degree of error, most common measurement error,
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 reasons is that
whenever we decide to add a point to the
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
always) polynomial. A slight variation of this problem
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 others
beforehand.
Suppose f '( x) exists on [a,b] and
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 root(s) of many functions using algebraic methods,
e.g.
MATH230
Tutorial note 0
1. Floating-Point 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
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 exactly one number.
n =1
Intermediate Value Theorem
If : [
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 interval [a,b], with f (a ) and f (b) of
opposite sign (i.e. e