Consider the finite-difference approximation
df/d x ≈ −f (x + 2∆) + 8f (x + ∆) − 8f (x − ∆) + f (x − 2∆)/(12∆)
(1)1. Write a function finite_difference(f, x, Delta) that approximates d f /d x for a given Python
function f, point x, and perturbation Delta using Eq. (1).
2. Compute df/dx |x=1 for f (x ) = cos(x ) using your function and ∆ = 0.4, ∆ = 0.2, and ∆ = 0.1.
3. Compute the corresponding absolute errors (i.e., |y' appx − y' actual |). Name these error_0_4, error_0_2, and error_0_1.
4. Use these errors, and the corresponding ∆’s to estimate the order of this method. Name this order.
1
Expert's answer
2017-04-22T04:50:59-0400
Dear John, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment