Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use Matlab to compute the approximation of the derivative of tan x at x = 1 . 0, with the formula in (4), with smaller
Use Matlab to compute the approximation of the derivative of tan x at
x
= 1
.
0, with the
formula in (4), with smaller and smaller values of h
. Plot the error e as a function of h, use log
scale (see Matlab command loglog). How did you expect the error to behave? How does the actual error behave? For what h value do you get the best result? What do you think is the cause of this behavior?
Let the function f(x) be three times differentiable. Consider the finite difference approximation formula Note that this scheine uses values of f at the three points z, z + h,z + 2h. This is a one-sided finite difference (d . Use Matlab to compute the approximation of the derivative of tanz at 1.0, with the formula in (4), with smaller and smaller values of h. Plot the error e as a function of h, use log scale (see Matlab command loglog). How did you expect the error to behave? How does the actual error behave? For what h value do you get the best result?What do you think is the causc of this behavior? What to hand in for part (d): Hand in the Matlab script file, the relevant output of your code, the plots of errors, and your comments
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