Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Excel VBA code to create this program: 3) This problem will have you program a very basic numerical differentiation. (x - h/2) (x +

Using Excel VBA code to create this program:image text in transcribed

3) This problem will have you program a very basic numerical differentiation. (x - h/2) (x + h/2) To calculate a numerical derivative, first a value ofx is chosen (the location where the derivative will be calculated). A secant line is drawn that intersects the function at two placesffr +h/2) and ffix - h/2), and these two function bracket the x value. The derivative is calculated as the slope of this line dx As shown in the figure, the value calculated from this method will be different than the actual derivative. However, as the distance h decreases in magnitude, the value of the derivative will become closer to the actual value Write a program that calculates the numerical derivative of the following function For this problem: Input values for x and the tolerance from theA spreadsheet. 1 tolerance0.001 1.22 Run Calculate the tolerance beginning with the second derivative calculation. For this e is the magnitude of the 4 iteration dy/dx tolerance difference between successive derivative calculations. Iterate until the tolerance is below the threshold entered in the spreadsheet Use a single function to calculate f(x). This 8 1 17.96678 210.64678 3 8.816784 7.32 1.83 8.359284 0.4575 8.244909 0.114375 6 8.216315 0.028594 7 8.209167 0.007148 8 8.20738 0.001787 9 8.206933 0.000447 nction will be called twice per iteration when calculating f(+) and f (x) Test your program with a function you can take the derivative analytically (through calculus) 10 12 Submit a validation of your program. 14 3) This problem will have you program a very basic numerical differentiation. (x - h/2) (x + h/2) To calculate a numerical derivative, first a value ofx is chosen (the location where the derivative will be calculated). A secant line is drawn that intersects the function at two placesffr +h/2) and ffix - h/2), and these two function bracket the x value. The derivative is calculated as the slope of this line dx As shown in the figure, the value calculated from this method will be different than the actual derivative. However, as the distance h decreases in magnitude, the value of the derivative will become closer to the actual value Write a program that calculates the numerical derivative of the following function For this problem: Input values for x and the tolerance from theA spreadsheet. 1 tolerance0.001 1.22 Run Calculate the tolerance beginning with the second derivative calculation. For this e is the magnitude of the 4 iteration dy/dx tolerance difference between successive derivative calculations. Iterate until the tolerance is below the threshold entered in the spreadsheet Use a single function to calculate f(x). This 8 1 17.96678 210.64678 3 8.816784 7.32 1.83 8.359284 0.4575 8.244909 0.114375 6 8.216315 0.028594 7 8.209167 0.007148 8 8.20738 0.001787 9 8.206933 0.000447 nction will be called twice per iteration when calculating f(+) and f (x) Test your program with a function you can take the derivative analytically (through calculus) 10 12 Submit a validation of your program. 14

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

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

More Books

Students also viewed these Databases questions

Question

A study based on

Answered: 1 week ago