

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: NUMERICAL METHODS; Subject: MATHEMATICS; University: Texas A&M University; Term: Unknown 1989;
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Instructors: Prof. Wolfgang Bangerth, Prof. Guido Kanschat [email protected], [email protected] Teaching Assistants: Seungil Kim, Yan Li [email protected], [email protected]
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 (Numerical integration.) Consider the problem of finding the numerical value of the integral
∫ (^1)
0
arctan x dx.
The exact value of this expression is π 4 − ln 2 2 = 0. 43882.. .. Evaluate above integral by writing programs that use
(a) the trapezoidal rule,
(b) the Simpson rule.
Split up the integration interval [0, 1] into successively smaller sub-intervals of length h = 1, 12 , 14 ,... , 1281 and apply the two quadrature rules above to each subinterval. Compute the approximated value of the integral and the error. Determine the convergence order from this data. (4 points)
Problem 3 (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. As a sidenote, the function f (x) is called Lambert’s W function.
(a) Write a computer routine that, given x, computes f (x) = y using above definition of y.
(b) Plot f (x) in the interval 0 ≤ x ≤ 10 using points spaced at most 0.1 apart.
(c) Compute an approximation to f ′(2). Use different values for the step length h until that you think the result is accurate with an error of at most 0.001.
Hint: you are allowed to use program parts of previous homework. (5 points)
Problem 4 (Integration of an implicit function). Let f (x) be defined as in Problem 3. Compute
∫ (^10)
0
f (x) dx
using the trapezoidal rule for step sizes h = 1, 12 , 14 , 18 ,... , 321. Determine the order of convergence.
(4 points)