You are to write a MATLAB function to implement a table lookup approximation of the function e x for x [0, 0.5 ln 2]. You will also make use of the romberg function that you developed in part one of this exam and the logderiv function that I put on Canvas for the second MATLAB code and for Quiz Four. You will be using inverse interpolation with cubic splines followed by Newton method for correction.
A similar approach is discussed in Section 4.9 of the Cleve Moler textbook that is linked to on the class Canvas paper. The link for the textbook
is https://www.mathworks.com/moler/chapters.html. The appropriate
chapter is called “Zeros and Roots”.
1. Log Funct√ion. Create a function mylog that computes ln x over the
interval [1, 2]. Your function should compute
using your Romberg integration function with a tolerence of 10−14 =
1e 14. If you did not get your romberg function to work correctly
in Part One, you are welcome to use the one that is posted for the
solution to Quiz Four.
2. Set up Inverse Interpo√lation. Note that over the domain [0, 0.5 ∗
ln 2], e
x has the range [1, 2]. Let
Get Free Quote!
346 Experts Online