Question: Write a C++ program to implement the Example on Chapter 6 Lecture 1 Slide 5. You need to print a table like Table 6.2 and

 Write a C++ program to implement the Example on Chapter 6

  1. Write a C++ program to implement the Example on Chapter 6 Lecture 1 Slide 5. You need to print a table like Table 6.2 and to find optimum step size from the table (minimum error).

Central-difference formula - Example Let f(x) = cos(x). Use central-difference formula of order 0(ha) with step size h = 0.1, 0.01 , 0.001 , 0.0001 . To approximate f'(0.8) Note that the exact value of f'(0.8) = sin(0.8) = -0.717356090899 . Table 6.2 If h = 0.01 Numerical Differentiation Using Formu Step size Error using formula (3) f'(0.8) = f(0.81)-f(0.79) 20.01 Approximation by formula (3) -0.716161095 -0.717344150 -0.717356000 -0.717360000 0.1 0.0! 0.001 0.0001 = -0.717344150 -0.001194996 -0.00001194 -0.000000091 -0.000003909

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!