210k views
1 vote
Use forward and backward difference approximations of O(h) and a centered difference approximation of O(h2) to estimate the first derivative of the function examined in the previous problem (Q1). Evaluate the derivative at x = 2 using a step size of h = 0:25. Compare your results with the true value of the derivative (note: when someone says `compare' that's almost always an invitation to use a relative or percent metric for comparison). Interpret your results on the basis of the remainder term of the Taylor series expansion.

1 Answer

5 votes

Answer:

Answer has explained below.

Explanation:

Consider the function is:

F(x) = 25x3 – 6x2 +7x -88

Differentiate with respect to x, we get

F’(x) = 25. 3x2 – 6.2x + 7

= 75x2 – 12x +7

At x = 2, we have

F (2) = 25(2)3 – 6(2)2 + 7(2)-88

=102

And f’(2) = 75(2)2 – 12 (2) +7

=283

Now, calculate forward divided difference as:

xi + 1 = xi + h

=2 + 0.25

=2.25

F (xi + 1) = f (2.25) = 25 (2.25)3 – 6(2.25)2 +7(2.25) -88

=182.21

f’(2) = f(2.25) – f(2) / 0.25 = 182.21 – 102 / 0.25

= 320.84

Єt = 283 – 320.8 / 283 = -13.36%

Now calculate backward divided difference:

Xi-1 = xi –h = 2 – 0.25 = 1.75

F(xi-1)= f(1.8) = 25 . (1.8)3 -6 (1.8)2 + 7 (1.8) – 88

= 50.96

F’(2) = f(2) – f(1.8) / 0.25 = 102 – 50.96 / 0.25 = 204.16

Єt = 283 – 204.16 / 283 = 27.86%

Finally, centered divided difference is obtain by inserting f(xi+1) and f (xi-1):

F’(2) = f(2.25) – f(1.8) /2 x 0.25 = 320.84 -50.96 / 0.5 = 539.68

Єt = 283 – 539.68 / 283 = -90.7%

User Yanayaya
by
4.1k points