Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

6. Identify characteristics of whiteness.

Answered: 1 week ago

Question

9. Explain the relationship between identity and communication.

Answered: 1 week ago