Assignment 8
Write a function that evaluates a composite Boole's rule approximation to the integral of any function you specify, over an interval you specify. You may (or may not) want ChatGPT's help here. This takes four arguments: a handle for the function to be integrated, the left endpoint, the right endpoint, and the number of subintervals to be used. In other words, to integrate a function you called name, over the interval [0,3], you might type the Matlab command: myBooleRule(name,0,3,20). Run the function on your name function (as discussed in assignments 3 and 6) for 20 intervals and 40 intervals, and compare the results with the exact value for the integral of your name function over [0,3], and please discuss the extent to which ChatGPT helped on this in comments at the top of your function file.
The assignment is turned in when the .m file containing the function is received as an attachment to an email message in the instructor's inbox. The assignment is worth 40 points, and is due at 9AM on Friday, 27 October.
Hint: do not get exercised over the \(O(h^6)\) in the expression for Boole's rule. It is only there to make the equality true - you do not need to worry about it.
The last test will take place at the final exam time on
Tuesday, 12 December, from 1:30-3:30. It will be written as a one-hour (not
50 minute) exam, but you may have the full two hours for it.
In other respects it will be very like the other tests, but
comprehensive - it will emphasize Python, but cover all the
topics we have seen.
There is a
Sample Exam, but be aware that things will have changed somewhat
with the advent of ChatGPT.
Assignment A
is posted.