Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a program to compute an approximate value for the derivative of a function using the finite difference formula f (x) f(x + h) f(x)

write a program to compute an approximate value for the derivative of a function using the finite difference formula f (x) f(x + h) f(x) h . (2) Test your program using the function sin(x) for x = 1. Determine the error by comparing with the built-in function cos(x). Plot the magnitude of the error as a function of h, for h = 1 2 , 1 4 , 1 8 , . . . You should use a log scale for h and the magnitude of the error. Is there a minimum value for the magnitude of the error? b) (5 points) Check if the corresponding value of h to the minimum value for the magnitude of the error can be approximately equal to eps ? Why?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions

Question

Describe the problems in the administration of disciplinary action.

Answered: 1 week ago

Question

Explain discipline and disciplinary action.

Answered: 1 week ago