Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started