Department of Computer Science and Engineering CSE 92
University of California at San Diego Spring 2007

Assignment 6

Due at the start of class on Tuesday May 29.


For this assignment you should write a function in ML that applies Newton's method to find the minimum of an input function.  This function should have two inputs:
You must define your own ML type to represent symbolic expressions.  You must also define two auxiliary ML functions.  The first will evaluate numerically a symbolic expression at a given real value.  The second will symbolically compute the derivative of a symbolic expression.  Note that these ML functions are not higher-order.

As before, demonstrate three informative cases, where the function that is being minimized is respectively a quadratic polynomial, a degree-four polynomial, and not a polynomial.

What to hand in:  A printout of all your functions and a transcript of a session with ML showing that your code works correctly on all three test cases.