a logo for the course

Numerical Analysis

David Gleich

Purdue University

Spring 2016

Course number CS-51400, MATH-51400

Tuesday and Thursday, noon-1:15pm

Location Lawson B155


Homework 5

Please answer the following questions in complete sentences in a typed manuscript and submit the solution on blackboard by on April 4th at noon. (These will be back before the midterm.)

Problem 0: Homework checklist

Problem 1: Gautschi Exercise 3.29 + more

  1. Derive the 2-point Gauss-Hermite quadrature rule.

  2. Example application (from http://ice.uchicago.edu/2012_presentations/Faculty/Judd/Quadrature_ICE11.pdf). An investor holds one bond that will be worth 1 in the future and equity whose value is where . (So this means that the log of the value of the expected utility is a normally distributed random variable.) The expected utility is the random number . where is a utility function, we'll use , where . (This is a concave utility function because having more money doesn't give you all that much more utility.) We'll use . Suppose also that and . We want to find the expected utility to the investor! This involves evaluating the integral Write a compute program to use Gauss-Hermite quadrature to approximate the value of this integral. You need to justify the number of points you use for the approximation.

Problem 2: Multivariate quadrature

In this problem, we will investigate multivariate quadrature for integrals such as using tensor product rules. We saw an example of these in class. Let and be the nodes and weights of an -point 1-dimensional Gauss-Legendre rule. Then the multidimensional quadrature rule is: We can derive this as follows: Of course, this makes it clear we don't have to use the same number of points to integrate in and ! So in general, let be an -point Gauss-Legendre quadrature rule for the -variable and be an -point Gaussian quadrature for the variable.

  1. Implement a computer code to perform two-dimensional Gauss-Legendre quadrature using this type of construction. Your code should allow a user to input and to determine the number of points in each variable.

  2. Use your code to estimate the integrals using points in each dimension.

  3. This is an open ended question that requires you to investigate. You can also find the answer in many textbooks, but if you do so, make sure you document your sources and demonstrate the effect that is claimed. We saw in class that an -point Gaussian quadrature rule exactly integrated polynomials of up to degree . In this problem, I want you to generate a conjecture about the degree of exactness of multidimensional Gaussian quadrature. You should use your code from part 1, along with carefully constructed examples, to support a statement such as:

    My evidence suggests that 2d Gauss-Legendre quadrature will exactly 
    integrate two-dimensional functions $f(x,y)$ when ...
    

    Here are some helpful ideas that may play a role.

    • The total degree of a multidimensional polynomial is the maximum of the sum of degrees of each term. So has total degree .

    • Another type of degree is the largest degree in each variable, so involves polynomials of degree only.