Question: Problem 2 : ( Program ) Write a program in MATLAB that implements the third derivative of the function. f ( x ) = x

Problem 2:(Program)
Write a program in MATLAB that implements the third derivative of the function.
f(x)=xcos(x)
from x=1 to x=2 with a spacing h=0.05.
a. The program must implement the four-point forward, four-point central, and four-point backward difference formulas for the third derivative given below. The program must be
valid for any spacing h.
b. The program must display the results in a table of 4 columns, with the value of xi,f'''(xi)-forward,f"'({:xi)-backward, f'''(xi)-central
c. The program must show a plot of f'''(x) vs.x using the three methods. Plot also the exact derivative f'''(x)=xsin(x)-3cos(x). Use circle markers (red, blue, green) for the
numerical values and a solid black line for the exact derivative.
 Problem 2:(Program) Write a program in MATLAB that implements the third

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!