Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a well commented MATLAB program to calculate the 1 st , 2 nd , and 3 rd derivative of an equation using forward finite
Write a well commented MATLAB program to calculate the st nd and rd derivative of
an equation using forward finite difference, backward finite difference and central finite
difference methods with an error of the second order Oh
for forward and backward finite
different methods and an error of th order for central finite method Oh
In your program give the user the capability to insert the step size and the value at which
the derivative is to be calculated. Write the equation in a separate m file as function.
Use your program to find the stnd and rd derivatives of the following equation fx
xx
at x using two different values for the step size, the first value is h
and the second one is h
Solution at h:
FirstDForward
SecondDForward
ThirdDForward
FirstDBackward
SecondDBackward
ThirdDBackward
FirstDCentral
SecondDCentral
ThirdDCentral
Solution at h:
FirstDForward
SecondDForward
ThirdDForward
FirstDBackward
SecondDBackward
ThirdDBackward
FirstDCentral
SecondDCentral
ThirdDCentral
Discussion and Analysis
Calculate the relative error in the answers for all methods found using h assuming
that the answers found using step size h is the right one
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