Question: You are to write a program in Matlab to evaluate the forward finite difference, backward finite difference, and central finite difference approximation of the first

 You are to write a program in Matlab to evaluate the

You are to write a program in Matlab to evaluate the forward finite difference, backward finite difference, and central finite difference approximation of the first derivative of the following function: f(x)=0.5+2.25xtanh(2.5x) at the location x0=0.75 using a step size of x=0.1,0.01,0.0011020. Evaluate the exact derivative and compute the error for each of the three finite difference methods. 1. Generate a table of results for the error for each finite difference at each value of x. 2. Generate a plot containing the log of the error for each method vs the log of x. 3. Repeat this in single precision. 4. What is machine epsilon in the default Matlab real variable precision. 5. What is machine epsilon in the Matlab real variable single precision. Instructions: your project files should have a comment that has 1. Your name. 2. Due date of the project. 3. Name of the project. Submit your Matlab project files along with output generated for questions 1-3 on the Webcourses project 1 submission section. Complete the project 1 assignment quiz on webcourses. Report on the Webcourses project 1 assignment Quiz the values of the derivative estimated using each of the three finite differences using as step size of x=102,x=106, x=1010, and x=1020

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!