MATH 609-602: Numerical Methods - Homework Assignment 9, Assignments of Mathematical Methods for Numerical Analysis and Optimization

Information about a homework assignment for the course math 609-602: numerical methods, taught by prof. Wolfgang bangerth. The assignment includes four problems related to finite difference approximation of derivatives, derivatives of an implicit function, integration of an implicit function, and a proof about best approximating linear functions. Students are required to compute finite difference approximations, plot functions, and determine convergence orders.

Typology: Assignments

Pre 2010

Uploaded on 02/10/2009

koofers-user-g36
koofers-user-g36 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
MATH 609-602: Numerical Methods
Lecturer: Prof. Wolfgang Bangerth
Blocker Bldg., Room 507D
(979) 845 6393
Teaching Assistant: Seungil Kim
Blocker Bldg., Room 507A
(979) 862 3259
Homework assignment 9 due Tuesday 11/8/2005
Problem 1 (Finite difference approximation of the derivative). Take
the function defined by
f(x) = 1
2x3+x2for x < 0
x3for x0.
Compute a finite difference approximation to f0(x0) at x0= 1 with both the
one-sided and the symmetric two-sided formula. Use step sizes h= 1,1
2,1
4, . . . , 1
64 .
Determine experimentally the convergence orders you observe as h0.
Repeat these computations for x0= 0. What convergence orders do you
observe? Why? (4 points)
Problem 2 (Derivatives of an implicit function). Let f(x) be defined
implicitly as follows: for every x > 0, f(x) is that value yfor which
yey=x. (1)
In other words, every time one wants to evaluate f(x) for a particular value x,
one has to solve equation (1) for y. This can be done using Newton’s method,
for example, or any of the other root finding algorithms we had in class applied
to the function g(y) = yeyx.
Plot f(x) for 0 x10. Compute an accurate approximation to f0(2).
(4 points)
Problem 3 (Integration of an implicit function). Let f(x) be defined as
in Problem 2. Compute
Z10
0
f(x)dx
using both the box rule as well as the trapezoidal rule for step sizes h=
1,1
2,1
4,1
8, . . . , 1
32 . Determine the order of convergence for both methods.
(4 points)
1
pf2

Partial preview of the text

Download MATH 609-602: Numerical Methods - Homework Assignment 9 and more Assignments Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

MATH 609-602: Numerical Methods

Lecturer: Prof. Wolfgang Bangerth Blocker Bldg., Room 507D (979) 845 6393 [email protected] Teaching Assistant: Seungil Kim Blocker Bldg., Room 507A (979) 862 3259 [email protected]

Homework assignment 9 – due Tuesday 11/8/

Problem 1 (Finite difference approximation of the derivative). Take the function defined by

f (x) =

2 x

(^3) + x (^2) for x < 0 x^3 for x ≥ 0. Compute a finite difference approximation to f ′(x 0 ) at x 0 = 1 with both the one-sided and the symmetric two-sided formula. Use step sizes h = 1, 12 , 14 ,... , 641. Determine experimentally the convergence orders you observe as h → 0. Repeat these computations for x 0 = 0. What convergence orders do you observe? Why? (4 points)

Problem 2 (Derivatives of an implicit function). Let f (x) be defined implicitly as follows: for every x > 0, f (x) is that value y for which

yey^ = x. (1)

In other words, every time one wants to evaluate f (x) for a particular value x, one has to solve equation (1) for y. This can be done using Newton’s method, for example, or any of the other root finding algorithms we had in class applied to the function g(y) = yey^ − x. Plot f (x) for 0 ≤ x ≤ 10. Compute an accurate approximation to f ′(2).

(4 points)

Problem 3 (Integration of an implicit function). Let f (x) be defined as in Problem 2. Compute ∫ (^10)

0

f (x) dx

using both the box rule as well as the trapezoidal rule for step sizes h = 1 , 12 , 14 , 18 ,... , 321. Determine the order of convergence for both methods.

(4 points)

Problem 4 (A proof ). In last week’s homework, you were asked to find the l∞ best approximating linear function to 10 data points. Let’s simplify the situation a little bit: assume we had only wanted to find a constant best approximation, i.e. a function p 0 (x) = c 0 , to all these data points. Then, this involves finding the coefficient c∗ 0 for which the function

e(c 0 ) = max 1 ≤i≤N |c 0 − yi|

takes on its minimum. If one wants to phrase this differently, one could also say that we are looking for the optimal coefficient c∗ 0 for which

e(c∗ 0 ) = min c 0 max 1 ≤i≤N

|c 0 − yi|.

One could wonder if there is indeed only a single such value c 0 , or if it may be possible to have a number of different values for c 0 for which the corresponding functions p 0 (x) = c 0 are all best approximations to the data points. Prove that the function e(c 0 ) defined above has only a single minimum and that consequently there is exactly one, well-defined best l∞ approxima- tion among the constant functions. (Hint: Try your hands first on the case where there are only two data points, i.e. e(c 0 ) = max{|c 0 − y 1 |, |c 0 − y 2 |} and then generalize to N data points.) Comment on what happens if you were looking for linear approximations p 1 (x) = c 0 + c 1 x with corresponding error function

e(c 0 , c 1 ) = max 1 ≤i≤N

|c 0 + c 1 xi − yi|.

Does this two-dimensional function have a single, unique minimum as well?

(4 points)