This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Numerical Analysis You could say that some of the equations that you encounter in describing physical systems cant be solved in terms of familiar functions and that they require numerical calculations to solve. It would be misleading to say this however, because the reality is quite the opposite. Most of the equations that describe the real world are sufficiently complex that your only hope of solving them is to use numerical methods. The simple equations that you find in introductory texts are there because they can be solved in terms of elementary calculations. When you start to add reality, you quickly reach a point at which no amount of clever analytical ability will get you a solution. That becomes the subject of this chapter. In all of the examples that I present Im just showing you a taste of the subject, but I hope that you will see the essential ideas of how to extend the concepts. 11.1 Interpolation Given equally spaced tabulated data, the problem is to find a value between the tabulated points, and to estimate the error in doing so. As a first example, to find a value midway between given points use a linear interpolation: f ( x + h/ 2) 1 2 f ( x ) + f ( x + h ) This gives no hint of the error. To compute an error estimate, it is convenient to transform the variables so that this equation reads f (0) 1 2 f ( k ) + f ( k ) , where the interval between data points is now 2 k . Use a power series expansion of f to find an estimate of the error. f ( k ) = f (0) + kf (0) + 1 2 k 2 f 00 (0) + f ( k ) = f (0) kf (0) + 1 2 k 2 f 00 (0) + Then 1 2 f ( k ) + f ( k ) f (0) + 1 2 k 2 f 00 (0) , (11 . 1) where the last term is your error estimate: Error = Estimate Exact = + k 2 f 00 (0) / 2 = + h 2 f 00 (0) / 8 And the relative error is (Estimate Exact)/Exact. As an example, interpolate the function f ( x ) = 2 x between 0 and 1. Here h = 1 . 2 1 / 2 1 2 2 + 2 1 = 1 . 5 The error term is error (ln2) 2 2 x / 8 for x = . 5 = ( . 693) 2 (1 . 5) / 8 = . 090 , and of course the true error is 1 . 5 1 . 414 = . 086 You can write a more general interpolation method for an arbitrary point between x and x + h . The solution is a simple extension of the above result. James Nearing, University of Miami 1 11Numerical Analysis 2 The line passing through the two points of the graph is y f = ( x x )( f 1 f ) /h, x x 1 f = f ( x ) , f 1 = f ( x + h ) . At the point x = x + ph you have y = f + ( ph )( f 1 f ) /h = f (1 p ) + f 1 p As before, this approach doesnt suggest the error, but again, the Taylor series allows you to work it out to be h 2 p (1 p ) f 00 ( x + ph ) / 2 . The use of only two points to do an interpolation ignores the data available in the rest of the table. By using more points, you can greatly improve the accuracy. The simplest example of this method is the 4point interpolation to find the function halfway between the data points. Again, the independent variable has an increment h = 2 k , so the problem can be stated as one of finding the...
View Full
Document
 Fall '08
 Nearing

Click to edit the document details