Question: [30] Q3. write a Matlab code that calculates the first derivative of f(x)-ex at x = 0 using forward differencing. Choose 4x = 0.5 initially

 [30] Q3. write a Matlab code that calculates the first derivative

[30] Q3. write a Matlab code that calculates the first derivative of f(x)-ex at x = 0 using forward differencing. Choose 4x = 0.5 initially and evaluate the absolute error in the derivative by comparing the numerical value with the analytical one. ii) Write a for loop that keeps halving Ax until it is less than 106 and evaluates the error in the numerical derivative for all the different 4x values. Finally, plot the error vs x in a log-log plot. Please print the plot. Do not submit the Matlab code only

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!