In this assignment well use spreadsheets to do simple differ

In this assignment we\'ll use spreadsheets to do simple differentiation. Consider the function f(x) = tx3 + ux2 + vx +w, where t = 1, u = -3, v = -130, and w = 150. This equation is used in analytic chemistry, but for our purposes is just a nice polynomial. Remember, please make the spreadsheet look neat and presentable.

1.What is the analytical (exact) derivative of f?

2.Calculate the derivative using forward differences. Use a ?x = 10-9. Use Excel to make the calculations.

3.Calculate the derivative using centered differences. Use the same ?x as in the forward case. Use Excel to make the calculations.

Solution

f(x) = tx3 + ux2 + vx +w, where t = 1, u = -3, v = -130, and w = 150.

a. analytical (exact) derivative f \'(x) = 3tx^2 + 2ux + v

put values f \'(x) = 3x2 - 6x -130

b. Forward difference

Consider a linear interpolation between the current data value (t0,I0) and the future data value (t1,I1). The slope of the secant line between these two points approximates the derivative by the forward (two-point) difference:

I\'(t0) = (I1-I0) / (t1 - t0)

Forward differences are useful in solving ordinary differential equations by single-step predictor-corrector methods (such as Euler and Runge-Kutta methods). For instance, the forward difference above predicts the value of I1 from the derivative I\'(t0) and from the value I0. If the data values are equally spaced with the step size h, the truncation error of the forward difference approximation has the order of O(h).

c.

Central difference

Finally, consider a linear interpolation between the past data value (t-1,I-1) and the future data value (t1,I1). The slope of the secant line between these two points approximates the derivative by the central (three-point) difference:

I\'(t0) = (I1-I-1) / (t1 - t-1)

If the data values are equally spaced, the central difference is an average of the forward and backward differences. The truncation error of the central difference approximation is order of O(h2), where h is the step size. It is clear that the central difference gives a much more accurate approximation of the derivative compared to the forward and backward differences. Central differences are useful in solving partial differential equations. If the data values are available both in the past and in the future, the numerical derivative should be approximated by the central difference.

In this assignment we\'ll use spreadsheets to do simple differentiation. Consider the function f(x) = tx3 + ux2 + vx +w, where t = 1, u = -3, v = -130, and w =

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site