Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 2: Consider the following function: f(x) = -0.1x4 -0.15x-0.5x -0.25x+1.2 a. Use the Central Difference Method to estimate the first derivative of at
Problem 2: Consider the following function: f(x) = -0.1x4 -0.15x-0.5x -0.25x+1.2 a. Use the Central Difference Method to estimate the first derivative of at x = 0.5. Start the computation at h = 1, then progressively divide the step size by a factor of 10 to demonstrate how the True Percent Error (roundoff error) becomes dominant as the step size is reduced. Plot the step size vs. the error. Hint: Use the loglog built-in function when plotting. MATLAB LAB 18 - Numerical Differentiation * Write a MATLAB code for Problems 1 and 2 Problem 1: Consider the following function: f(x) = -0.1x4 -0.15x3 -0.5x2 -0.25x + 1.2 a. Use finite difference (Forward, Backward, Center) to estimate the first derivative at x = 0.5 using a step size of h = 0.5. Calculate the True Percent Error for each finite difference approximation b. Use finite difference (Forward, Backward, Center) to estimate the first derivative at x = 0.5 using a step size of h = 0.25. Calculate the True Percent Error for each finite difference approximation c. Which errors are larger, those with a time step of h = 0.5 or those with a time step of h = 0.25?
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