Nanyang Technological University
School of Physical and Mathematical Sciences
Division of Mathematical Sciences
MH1811 Mathematics 2
Tutorial 6
Topics: Directional Derivatives; Global and Local maximum/minimum.
1. The temperature T in a metal ball is inve
Nanyang Technological University
School of Physical and Mathematical Sciences
Division of Mathematical Sciences
MH1811 Mathematics 2
Tutorial 6
In this tutorial, we will compute directional derivatives and its application on rate of change.
Then, we proce
Nanyang Technological University
SPMS/Division of Mathematical Sciences
2014/2015 Semester 2
MH1811 Mathematics 2
16th March 2015
Test
TIME ALLOWED: 45 MINUTES
NAME:
Matriculation Number:
Question
1 (a)
1 (b)
2
3(a)
3(b)
Total
Marks
INSTRUCTIONS TO CANDID
MH1811 Mathematics 2
Gradient Vectors: Orthogonality & Applications
Dr Tan Geok Choo
Division of Mathematical Sciences
School of Physical and Mathematical Sciences
Nanyang Technological University
Dr Tan Geok Choo (Division of Mathematical Sciences School
Nanyang Technological University
School of Physical and Mathematical Sciences
Division of Mathematical Sciences
MH1811 Mathematics 2
Tutorial 5
In this tutorial, we begin to explore applications of partial differentiation. The first application
is on exac
MH1811 Mathematics 2
Tutorial 4
Dr Tan Geok Choo
Division of Mathematical Sciences
School of Physical and Mathematical Sciences
Nanyang Technological University
Dr Tan Geok Choo (Division of Mathematical Sciences School
MH1811
of Physical
Mathematics
and
Sums of Independent Random Variables
Consider the sum of two independent discrete random variables X and Y
whose values are restricted to the non-negative integers. Let fX () denote the
probability distribution of X and fY () denote the probability distri
Chapter 2. SOLUTIONS OF EQUATIONS
IN ONE VARIABLE
Bisection method (I)
f(b)
p
a
b
f(a)
Calculus: Intermediate Value Theorem Let f (x) be continuous
(f (x) C ([a, b]). If f (a)f (b) < 0, then there exists one zero in
the interval (a, b).
Bisection method (
Chapter 6. NUMERICAL INTEGRATION
Closed Newton-Cotes formulae (I)
Let us start with an example: suppose that we want to approximate
b
f (x)dx.
a
Let x0 = a and x1 = b. We have
f (x) = P1 (x) +
f (x)
(x x0 )(x x1 ).
2
We may say that
b
b
f (x)dx
a
P1 (x)d
Composite quadrature rules (I)
In the Newton-Cotes formulae with n + 1 points, we note that the
error is O(hn+2 ) when n is odd and O(hn+3 ) when n is even,
where h = (b a)/n (closed formulae) or h = (b a)/(n + 2)
(open formulae).
The approximation only m
Chapter 4. NUMERICAL DIFFERENTIATION
Numerical Dierentiation (I)
In this chapter, we will learn how to approximate derivatives of a
function.
The most well known example:
From the denition:
lim
h0
f (x + h) f (x)
= f (x),
h
so when |h| is small, we can s
Chapter 5. RICHARDSONS EXTRAPOLATION
Richardsons extrapolation (I)
Suppose that we have an approximation with the error O(h),
how can we get a better approximation with the error O(h2 )?
Richardsons extrapolation will do this.
Consider the example:
f (x)
Cubic spline interpolation (I)
We consider the piecewise interpolation:
we divide [a, b] into intervals (not necessarily of equal lengths):
[x0 , x1 ], [x1 , x2 ], . . . , [xn1 , xn ] and nd a function P(x) which is
linear on each [xj , xj+1 ] (j = 0, .
Divided dierences (I)
Lets come back to our example:
Suppose we know that at x0 = 1, f (x0 ) = 1 and at x1 = 2,
f (x1 ) = 3/2.
The interpolating polynomial we found is
1
P1 (x) = (x + 1).
2
As we did before, when we know the value of f at a further point,
Chapter 3. INTERPOLATION
What is interpolation?
In many applications, we collect data at only some points, for
example, at some moments, or at some spatial points.
We thus only know the values of a function at some points.
We approximate the values at
Newton method (I)
For solving an equation f (x) = 0, sometimes it is better to nd a
function g (x) so that xed points of g are the roots of f (x) = 0
and nd xed points of g .
There are many such functions g ; some of them are, for
examples:
g (x) = x +
CHAPTER 1. INTRODUCTION
Dierentiation (I)
Product rule
(fg ) = f g + g f .
so
(fgh) = f (gh) + (gh) f = f gh + g hf + h gf .
Example
d
(x x1 )(x x2 )(x x3 ) = (x x2 )(x x3 ) + (x x1 )(x x3 )
dx
+(x x1 )(x x2 ).
Dierentiation (II)
n
(x xi ) = (x x1 )(x x2
Numerical Analysis I. Tutorial and laboratory 12
1. TUTORIAL PROBLEMS
1. Suppose that f (0) = 1, f (0.5) = 2.5, f (1) = 2 and f (0.25) = f (0.75) =
. Find if the composite trapezoidal rule with n = 4 gives the value 1.75
1
for 0 f (x)dx.
1
2. The midpoint
Numerical Analysis I. Tutorial and Laboratory 10
1. TUTORIAL PROBLEMS
2
1. (a) The trapezoidal rule applied to 0 f (x)dx gives the value 4, and the
Simpsons rule gives the value 2. What is f (1).
2
(b) The trapezoidal rule applied to 0 f (x)dx gives the v
Numerical Analysis I. Tutorial and laboratory 11
1. TUTORIAL PROBLEMS
1. Find a, b, c and d so that the quadrature formula
1
f (x)dx af (1) + bf (1) + cf (1) + df (1)
1
has degree of precision 3.
2. Verify that the following quadrature rule has degree of
Numerical Analysis I. Tutorial and Laboratory 1
1. TUTORIAL PROBLEMS
1. Let |h| < 1. Which of the following functions are O(h)? Explain why.
(a) 2h, (b) 4h, (c) h+h2 , (d) 3h+h3 , (e) |h|1/2 , (f) |h|1/2 +h3 , (g) h+sin h,
(h) h + cos h.
2. Suppose that 0
Numerical Analysis I. Tutorial 9
1. Suppose that N (h) is an approximation for M for every h > 0 and
that
M = N (h) + K1 h + K2 h2 + K3 h3 + . . . ,
for some constants K1 , K2 , K3 , . . . Use the values of N (h), N (h/3) to deduce an O(h2 ) approximation
Numerical Analysis I. Tutorial and Laboratory 8
1. TUTORIAL PROBLEMS
1. Derive the approximation
f (a) =
f (a + h) 2f (a) + f (a h)
+ O(h2 )
2
h
from Lagrange interpolation and from Taylor expansion.
2. Use the divided dierence formula for Lagrange interp
Numerical Analysis I. Tutorial and Laboratory 7
1. TUTORIAL PROBLEMS
1. Determine the natural cubic spline S that interpolates the data f (0) =
0, f (1) = 1 and f (2) = 2.
2. Determine the clamped cubic spline S that interpolates the data f (0) =
0, f (1)
Numerical Analysis I. Tutorial and Laboratory 6
1. TUTORIAL PROBLEMS
1. Let h > 0 and f (x) = cos x. Find the Hermite polynomial interpolating
the points x0 = 0 and x1 = h. Estimate the range of h so that
|f (x) H3 (x)| 108 ,
for all x (0, h).
2. Given a
Numerical Analysis I. Tutorial and Laboratory 5
1. TUTORIAL PROBLEMS
1. Given the data x0 = 1, f (x0 ) = 2, x1 = 0, f (x1 ) = 1 and x2 = 1,
f (x2 ) = 2, nd the Lagrange interpolating polynomial P2 . Assume that
|f (x)| 0.5. Find an upper bound for |f (1.5