19.4 Spline Interpolation

Size: px
Start display at page:

Download "19.4 Spline Interpolation"

Transcription

1 c9-b.qxd 9/6/5 6:4 PM Page 8 8 CHAP. 9 Numerics in General 9.4 Spline Interpolation Given data (function values, points in the xy-plane) (x, ƒ ), (x, ƒ ),, (x n, ƒ n ) can be interpolated by a polynomial P n (x) of degree n or less so that the curve of P n (x) passes through these n points (x j, ƒ j ); here ƒ ƒ(x ),, ƒ n ƒ(x n ). See Sec. 9.. Now if n is large, there may be trouble: P n (x) may tend to oscillate for x between the nodes x,, x n. Hence we must be prepared for numeric instability (Sec. 9.). Figure 4 shows a famous example by C. Runge for which the maximum error even approaches as n * (with the nodes kept equidistant and their number increased). Figure 4 illustrates the increase of the oscillation with n for some other function that is piecewise linear. Those undesirable oscillations are avoided by the method of splines initiated by I. J. Schoenberg in 946 (Quarterly of Applied Mathematics 4, pp , 4). This method is widely used in practice. It also laid the foundation for much of modern CAD (computer-aided design). Its name is borrowed from a draftman s spline, which is an elastic rod bent to pass through given points and held in place by weights. The mathematical idea of the method is as follows: Instead of using a single high-degree polynomial P n over the entire interval a x b in which the nodes lie, that is, () a x x x n b, we use n low-degree, e.g., cubic, polynomials q (x), q (x),, q n (x), one over each subinterval between adjacent nodes, hence q from x to x, then q from P (x) f(x) y 5 Fig Runge s example ƒ(x) /( x ) and interpolating polynomial P (x) x 4 f(x) 4 P (x) 4 4 P 4 (x) 4 4 P 8 (x) Fig. 4. Piecewise linear function ƒ(x) and interpolation polynomials of increasing degrees CARL RUNGE (856 97), German mathematician, also known for his work on ODEs (Sec..).

2 c9-b.qxd 9/6/5 6:4 PM Page 8 SEC. 9.4 Spline Interpolation 8 x to x, and so on. From this we compose an interpolation function g(x), called a spline, by fitting these polynomials together into a single continuous curve passing through the data points, that is, () g(x ) ƒ(x ) ƒ, g(x ) ƒ(x ) ƒ,, g(x n ) ƒ(x n ) ƒ n. Note that g(x) q (x) when x x x, then g(x) q (x) when x x x, and so on, according to our construction of g. Thus spline interpolation is piecewise polynomial interpolation. The simplest q j s would be linear polynomials. However, the curve of a piecewise linear continuous function has corners and would be of little interest in general think of designing the body of a car or a ship. We shall consider cubic splines because these are the most important ones in applications. By definition, a cubic spline g(x) interpolating given data (x, ƒ ),, (x n, ƒ n ) is a continuous function on the interval a x x x n b that has continuous first and second derivatives and satisfies the interpolation condition (); furthermore, between adjacent nodes, g(x) is given by a polynomial q j (x) of degree or less. We claim that there is such a cubic spline. And if in addition to () we also require that () g (x ) k, g (x n ) k n (given tangent directions of g(x) at the two endpoints of the interval a x b), then we have a uniquely determined cubic spline. This is the content of the following existence and uniqueness theorem, whose proof will also suggest the actual determination of splines. (Condition () will be discussed after the proof.) THEOREM Existence and Uniqueness of Cubic Splines Let (x, ƒ ), (x, ƒ ),, (x n, ƒ n ) with arbitrarily spaced given x j [see ()] and given ƒ j ƒ(x j ), j,,, n. Let k and k n be any given numbers. Then there is one and only one cubic spline g(x) corresponding to () and satisfying () and (). PROOF By definition, on every subinterval I j given by x j x x j the spline g(x) must agree with a polynomial q j (x) of degree not exceeding such that (4) q j (x j ) ƒ(x j ), q j (x j ) ƒ(x j ) (j,,, n ). For the derivatives we write (5) q j (x j ) k j, q j (x j ) k j ( j,,, n ) with k and k n given and k,, k n to be determined later. Equations (4) and (5) are four conditions for each q j (x). By direct calculation, using the notation (6*) c j ( j,,, n ) hj xj x j we can verify that the unique cubic polynomial q j (x) ( j,,, n ) satisfying

3 c9-b.qxd 9/6/5 6:4 PM Page 8 8 CHAP. 9 Numerics in General (4) and (5) is (6) q j (x) ƒ(x j )c j (x x j ) [ c j (x x j )] ƒ(x j )c j (x x j ) [ c j (x x j )] k j c j (x x j )(x x j ) Differentiating twice, we obtain k j c j (x x j ) (x x j ). (7) q j (x j ) 6c j ƒ(x j ) 6c j ƒ(x j ) 4c j k j c j k j (8) q j (x j ) 6c j ƒ(x j ) 6c j ƒ(x j ) c j k j 4c j k j. By definition, g(x) has continuous second derivatives. This gives the conditions q j (x j ) q j (x j ) (j,, n ). If we use (8) with j replaced by j, and (7), these n equations become (9) c j k j (c j c j )k j c j k j [cj ƒ j c j ƒ j ] where ƒ j ƒ(x j ) ƒ(x j ) and ƒ j ƒ(x j ) ƒ(x j ) and j,, n, as before. This linear system of n equations has a unique solution k,, k n since the coefficient matrix is strictly diagonally dominant (that is, in each row the (positive) diagonal entry is greater than the sum of the other (positive) entries). Hence the determinant of the matrix cannot be zero (as follows from Theorem in Sec..7), so that we may determine unique values k,, k n of the first derivative of g(x) at the nodes. This proves the theorem. Storage and Time Demands in solving (9) are modest, since the matrix of (9) is sparse (has few nonzero entries) and tridiagonal (may have nonzero entries only on the diagonal and on the two adjacent parallels above and below it). Pivoting (Sec. 7.) is not necessary because of that dominance. This makes splines efficient in solving large problems with thousands of nodes or more. For some literature and some critical comments, see American Mathematical Monthly 5 (998), Condition () includes the clamped conditions () g (x ) ƒ (x ), g (x n ) ƒ (x n ), in which the tangent directions ƒ (x ) and ƒ (x n ) at the ends are given. Other conditions of practical interest are the free or natural conditions () g (x ), g (x n ) (geometrically: zero curvature at the ends, as for the draftman s spline), giving a natural spline. These names are motivated by Fig. 9 in Problem Set..

4 c9-b.qxd 9/6/5 6:4 PM Page 8 SEC. 9.4 Spline Interpolation 8 Determination of Splines. Let k and k n be given. Obtain k,, k n by solving the linear system (9). Recall that the spline g(x) to be found consists of n cubic polynomials q,, q n. We write these polynomials in the form () q j (x) a j a j (x x j ) a j (x x j ) a j (x x j ) where j,, n. Using Taylor s formula, we obtain a j q j (x j ) ƒ j by (), a j q j (x j ) k j by (5), () a j q j (x j ) (ƒ j ƒ j ) (k j k j ) h h by (7), a j q j (x j ) (ƒ j ƒ j ) (k j k j ) 6 h h with a j obtained by calculating q j (x j ) from () and equating the result to (8), that is, 6 q j (x j ) a j 6a j h (ƒ j ƒ j ) (k j k j ), h h and now subtracting from this a j as given in () and simplifying. Note that for equidistant nodes of distance h j h we can write c j c /h in (6*) and have from (9) simply (4) k j 4k j k j (ƒ j ƒ j ) (j,, n ). h EXAMPLE Spline Interpolation. Equidistant Nodes Interpolate ƒ(x) x 4 on the interval x by the cubic spline g(x) corresponding to the nodes x, x, x and satisfying the clamped conditions g ( ) ƒ ( ), g () ƒ (). Solution. In our standard notation the given data are ƒ ƒ( ), ƒ ƒ(), ƒ ƒ(). We have h and n, so that our spline consists of n polynomials q (x) a a (x ) a (x ) a (x ) ( x ), q (x) a a x a x a x ( x ). We determine the k j from (4) (equidistance!) and then the coefficients of the spline from (). Since n, the system (4) is a single equation (with j and h ) k 4k k (ƒ ƒ ). Here ƒ ƒ (the value of x 4 at the ends) and k 4, k 4, the values of the derivative 4x at the ends and. Hence 4 4k 4 ( ), k. From () we can now obtain the coefficients of q, namely, a ƒ, a k 4, and

5 c9-b.qxd 9/6/5 6:4 PM Page CHAP. 9 Numerics in General a ( ) ( 8) (ƒ ƒ ) (k k ) 5. a ( ) ( 4). (ƒ ƒ ) (k k ) Similarly, for the coefficients of q we obtain from () the values a ƒ, a k, and a (ƒ ƒ ) (k k ) ( ) (4 ) a (ƒ ƒ ) (k k ) ( ) (4 ). This gives the polynomials of which the spline g(x) consists, namely, q (x) 4(x ) 5(x ) (x ) x x g(x) { q (x) x x if if x. x. Figure 4 shows ƒ(x) and this spline. Do you see that we could have saved over half of our work by using symmetry? f(x) x g(x) Fig. 4. Function ƒ(x) x 4 and cubic spline g(x) in Example EXAMPLE Natural Spline. Arbitrarily Spaced Nodes Find a spline approximation and a polynomial approximation for the curve of the cross section of the circularshaped Shrine of the Book in Jerusalem shown in Fig Fig. 44. Shrine of the Book in Jerusalem (Architects F. Kissler and A. M. Bartus)

6 c9-b.qxd 9/6/5 6:4 PM Page 85 SEC. 9.4 Spline Interpolation 85 Solution. Thirteen points, about equally distributed along the contour (not along the x-axis!), give these data: x j ƒ j The figure shows the corresponding interpolation polynomial of th degree, which is useless because of its oscillation. (Because of roundoff your software will also give you small error terms involving odd powers of x.) The polynomial is P (x).9.658x.858x 4.4x 6.4x x.7867x. The spline follows practically the contour of the roof, with a small error near the nodes.8 and.8. The spline is symmetric. Its six polynomials corresponding to positive x have the following coefficients of their representations (). (Note well that () is in terms of powers of x x j, not x!) j x-interval a j a j a j a j PROBLEM SET 9.4. WRITING PROJECT. Splines. In your own words, and using as few formulas as possible, write a short report on spline interpolation, its motivation, a comparison with polynomial interpolation, and its applications.. (Individual polynomial q j ) Show that q j (x) in (6) satisfies the interpolation condition (4) as well as the derivative condition (5).. Verify the differentiations that give (7) and (8) from (6). 4. (System for derivatives) Derive the basic linear system (9) for k,, k n as indicated in the text. 5. (Equidistant nodes) Derive (4) from (9). 6. (Coefficients) Give the details of the derivation of a j and a j in (). 7. Verify the computations in Example. 8. (Comparison) Compare the spline g in Example with the quadratic interpolation polynomial over the whole interval. Find the maximum deviations of g and p from ƒ. Comment. 9. (Natural spline condition) Using the given coefficients, verify that the spline in Example satisfies g (x) at the ends. 6 DETERMINATION OF SPLINES Find the cubic spline g(x) for the given data with k and k n as given.. ƒ( ) ƒ( ) ƒ() ƒ(), ƒ(), k k 4. If we started from the piecewise linear function in Fig. 45, we would obtain g(x) in Prob. as the spline satisfying g ( ) ƒ ( ), g () ƒ (). Find and sketch or graph the corresponding interpolation polynomial of 4th degree and compare it with the spline. Comment..5 Fig. 45. Spline and interpolation polynomial in Problems and. ƒ ƒ(), ƒ ƒ() 9, ƒ ƒ(4) 4, ƒ ƒ(6) 4, k, k x

7 c9-b.qxd 9/6/5 6:4 PM Page CHAP. 9 Numerics in General. ƒ ƒ( ), ƒ ƒ() 4, ƒ ƒ(), k, k. Is g(x) even? (Give reason.) 4. ƒ ƒ(), ƒ ƒ(), ƒ ƒ() 6, ƒ ƒ(), k, k 5. ƒ ƒ(), ƒ ƒ(), ƒ ƒ(), ƒ ƒ(), k, k 6 6. It can happen that a spline is given by the same polynomial in two adjacent subintervals. To illustrate this, find the cubic spline g(x) for ƒ(x) sin x corresponding to the partition x /, x, x / of the interval / x / and satisfying g ( /) ƒ ( /) and g ( /) ƒ ( /). 7. (Natural conditions) Explain the remark after (). 8. CAS EXPERIMENT. Spline versus Polynomial. If your CAS gives natural splines, find the natural splines when x is integer from m to m, and y() and all other y equal to. Graph each such spline along with the interpolation polynomial p m. Do this for m to (or more). What happens with increasing m? 9. If a cubic spline is three times continuously differentiable (that is, it has continuous first, second, and third derivatives), show that it must be a single polynomial.. TEAM PROJECT. Hermite Interpolation and Bezier Curves. In Hermite interpolation we are looking for a polynomial p(x) (of degree n or less) such that p(x) and its derivative p (x) have given values at n nodes. (More generally, p(x), p (x), p (x), may be required to have given values at the nodes.) (a) Curves with given endpoints and tangents. Let C be a curve in the xy-plane parametrically represented by r(t) [x(t), y(t)], t (see Sec. 9.5). Show that for given initial and terminal points of a curve and given initial and terminal tangents, say, A: r [x(), y()] [x, y ], B: r [x(), y()] [x, y ] v [x (), y ()] [x, y ], v [x (), y ()] [x, y ] we can find a curve C, namely, (5) r(t) r v t ((r r ) (v v ))t ((r r ) v v )t ; in components, x(t) x x t ((x x ) (x x ))t ((x x ) x x )t y(t) y y t ((y y ) (y y ))t ((y y ) y y )t. Note that this is a cubic Hermite interpolation polynomial, and n because we have two nodes (the endpoints of C). (This has nothing to do with the Hermite polynomials in Sec. 5.8.) The two points and G A : g r v [x x, y y ] G B : g r v [x x, y y ] are called guidepoints because the segments AG A and BG B specify the tangents graphically. A, B, G A, G B determine C, and C can be changed quickly by moving the points. A curve consisting of such Hermite interpolation polynomials is called a Bezier curve, after the French engineer P. Bezier of the Renault Automobile Company, who introduced them in the early 96s in designing car bodies. Bezier curves (and surfaces) are used in computer-aided design (CAD) and computer-aided manufacturing (CAM). (For more details, see Ref. [E] in App..) (b) Find and graph the Bezier curve and its guidepoints if A: [, ], B: [, ], v [ _, _ ], v [ _, _ ]. 4 (c) Changing guidepoints changes C. Moving guidepoints farther away makes C staying near the tangents for a longer time. Confirm this by changing v and v in (b) to v and v (see Fig. 46). (d) Make experiments of your own. What happens if you change v in (b) to v. If you rotate the tangents? If you multiply v and v by positive factors less than? y.4. A Fig. 46. G A(b) (b) G A(c) B (c) G B(b) G B(c) Team Project (b) and (c): Bezier curves x

8 9.5 Numeric Integration and Differentiation Numeric integration means the numeric evaluation of integrals J b a ƒ(x) dx where a and b are given and ƒ is a function given analytically by a formula or empirically by a table of values. Geometrically, J is the area under the curve of ƒ between a and b (Fig. 47). We know that if ƒ is such that we can find a differentiable function F whose derivative is ƒ, then we can evaluate J by applying the familiar formula J b a ƒ(x) dx F(b) F(a) [F (x) ƒ(x)]. Tables of integrals or a CAS (Mathematica, Maple, etc.) may be helpful for this purpose. However, applications often lead to integrals whose analytic evaluation would be very difficult or even impossible, or whose integrand is an empirical function given by recorded numeric values. Then we may obtain approximate numeric values of the integral by a numeric integration method. Rectangular Rule. Trapezoidal Rule Numeric integration methods are obtained by approximating the integrand ƒ by functions that can easily be integrated. The simplest formula, the rectangular rule, is obtained if we subdivide the interval of integration a x b into n subintervals of equal length h (b a)/n and in each subinterval approximate ƒ by the constant ƒ(x j *), the value of ƒ at the midpoint x j * of the jth subinterval (Fig. 48). Then ƒ is approximated by a step function (piecewise constant function), the n rectangles in Fig. 48 have the areas ƒ(x *)h,, ƒ(x n *)h, and the rectangular rule is () J b a ƒ(x) dx h[ƒ(x *) ƒ(x *) ƒ(x n *)] (h ). The trapezoidal rule is generally more accurate. We obtain it if we take the same subdivision as before and approximate ƒ by a broken line of segments (chords) with endpoint F [qual length

9 c9-b.qxd 9/6/5 6:4 PM Page CHAP. 9 Numerics in General y y = f(x) a x x x n b x Fig. 49. Trapezoidal rule By taking their sum we obtain the trapezoidal rule () J b a ƒ(x) dx h[ _ ƒ(a) ƒ(x ) ƒ(x ) ƒ(x n ) _ ƒ(b)] where h (b a)/n, as in (). The x j s and a and b are called nodes. EXAMPLE Trapezoidal Rule Evaluate J e x dx by means of () with n. Solution. J.( ).746 from Table 9.. Table 9. Computations in Example j x j x j e x j Sums Error Bounds and Estimate for the Trapezoidal Rule An error estimate for the trapezoidal rule can be derived from (5) in Sec. 9. with n by integration as follows. For a single subinterval we have ƒ(x) p (x) (x x )(x x ) ƒ (t)

10 c9-b.qxd 9/6/5 6:4 PM Page 89 SEC. 9.5 Numeric Integration and Differentiation 89 with a suitable t depending on x, between x and x. Integration over x from a x to x x h gives x h h ƒ(x) dx [ƒ(x ) ƒ(x )] x x h ƒ (t(x)) (x x )(x x h) dx. x Setting x x v and applying the mean value theorem of integral calculus, which we can use because (x x )(x x h) does not change sign, we find that the right side equals (*) h ƒ (t ) h h ƒ (t ) h v(v h) dv ( ) ƒ (t ) where t is a (suitable, unknown) value between x and x. This is the error for the trapezoidal rule with n, often called the local error. Hence the error of () with any n is the sum of such contributions from the n subintervals; since h (b a)/n, nh n(b a) /n, and (b a) n h, we obtain (b a) (b a) () ƒ (tˆ) h ƒ (tˆ) n with (suitable, unknown) tˆ between a and b. Because of () the trapezoidal rule () is also written (*) J b a ƒ(x) dx h [ _ ƒ(a) ƒ(x ) ƒ(x n ) _ ƒ(b) ] b a h ƒ (tˆ). Error Bounds are now obtained by taking the largest value for ƒ, say, M, and the smallest value, M *, in the interval of integration. Then () gives (note that K is negative) (b a) (4) KM KM * b a where K h. n Error Estimation by Halving h is advisable if h is very complicated or unknown, for instance, in the case of experimental data. Then we may apply the Error Principle of Sec. 9.. That is, we calculate by (), first with h, obtaining, say, J J h h, and then with _ h, obtaining J J h/ h/. Now if we replace h in () with ( _ h), the error is multiplied by /4. Hence h/ _ 4 h (not exactly because tˆ may differ). Together, J h/ h/ J h h J h 4 h/. Thus J h/ J h (4 ) h/. Division by gives the error formula for J h/ (5) h/ (J h/ J h ). EXAMPLE Error Estimation for the Trapezoidal Rule by (4) and (5) Estimate the error of the approximate value in Example by (4) and (5). Solution. (A) Error bounds by (4). By differentiation, ƒ (x) (x )e x. Also, ƒ (x) if x, so that the minimum and maximum occur at the ends of the interval. We compute

11 c9-b.qxd 9/6/5 6:4 PM Page 8 8 CHAP. 9 Numerics in General M ƒ () and M * ƒ (). Furthermore, K /, and (4) gives Hence the exact value of J must lie between and Actually, J , exact to 6D. (B) Error estimate by (5). J h.746 in Example. Also, J h/.5 Y 9 j e ( j/) (.67879)Z Hence h/ _ (J h/ J h ).5 and J h/ h/.74684, exact to 6D. Simpson s Rule of Integration Piecewise constant approximation of ƒ led to the rectangular rule (), piecewise linear approximation to the trapezoidal rule (), and piecewise quadratic approximation will lead to Simpson s rule, which is of great practical importance because it is sufficiently accurate for most problems, but still sufficiently simple. To derive Simpson s rule, we divide the interval of integration a x b into an even number of equal subintervals, say, into n m subintervals of length h (b a)/(m), with endpoints x ( a), x,, x m, x m ( b); see Fig. 44. We now take the first two subintervals and approximate ƒ(x) in the interval x x x x h by the Lagrange polynomial p (x) through (x, ƒ ), (x, ƒ ), (x, ƒ ), where ƒ j ƒ(x j ). From () in Sec. 9. we obtain (x x )(x x ) (x x )(x x ) (x x )(x x ) (6) p (x) ƒ ƒ ƒ. (x x )(x x ) (x x )(x x ) (x x )(x x ) The denominators in (6) are h, h, and h, respectively. Setting s (x x )/h, we have x x sh, x x x (x h) (s )h x x x (x h) (s )h and we obtain p (x) _ s(s )ƒ (s )(s )ƒ _ (s )sƒ. y First parabola Second parabola y = f(x) Last parabola a b x x x x 4 x m x m x Fig. 44. Simpson s rule

12 c9-b.qxd 9/6/5 6:4 PM Page 8 SEC. 9.5 Numeric Integration and Differentiation 8 We now integrate with respect to x from x to x. This corresponds to integrating with respect to s from to. Since dx hds, the result is (7*) x ƒ(x) dx x x 4 p (x) dx h ( ƒ ƒ ƒ ). x A similar formula holds for the next two subintervals from x to x 4, and so on. By summing all these m formulas we obtain Simpson s rule 4 (7) b h ƒ(x) dx (ƒ 4ƒ ƒ 4ƒ ƒ m 4ƒ m ƒ m ), a where h (b a)/(m) and ƒ j ƒ(x j ). Table 9.4 shows an algorithm for Simpson s rule. Table 9.4 Simpson s Rule of Integration ALGORITHM SIMPSON (a, b, m, ƒ, ƒ,, ƒ m ) This algorithm computes the integral J aƒ(x) b dx from given values ƒ j ƒ(x j ) at equidistant x a, x x h,, x m x mh b by Simpson s rule (7), where h (b a)/(m). INPUT: a, b, m, ƒ,, ƒ m OUTPUT: Approximate value J of J Compute s ƒ ƒ m s ƒ ƒ ƒ m s ƒ ƒ 4 ƒ m h (b a)/m J h (s 4s s ) End SIMPSON OUTPUT J. Stop. Error of Simpson s Rule (7). If the fourth derivative ƒ (4) exists and is continuous on a x b, the error of (7), call it S, is (b a) 5 (b a) (8) S ƒ (4) (tˆ) h 4 ƒ (4) (tˆ); 8(m) THOMAS SIMPSON (7 76), self-taught English mathematician, author of several popular textbooks. Simpson s rule was used much earlier by Torricelli, Gregory (in 668), and Newton (in 676).

13 c9-b.qxd 9/6/5 6:4 PM Page 8 8 CHAP. 9 Numerics in General here tˆ is a suitable unknown value between a and b. This is obtained similarly to (). With this we may also write Simpson s rule (7) as (7**) b h (b a) ƒ(x) dx (ƒ 4ƒ ƒ m ) h 4 ƒ (4) (tˆ). 8 a Error Bounds. By taking for ƒ (4) in (8) the maximum M 4 and minimum M 4 * on the interval of integration we obtain from (8) the error bounds (note that C is negative) (b a) (9) CM 4 S CM 4 * 5 (b a) where C h 4. 8(m) 4 8 Degree of Precision (DP) of an integration formula. This is the maximum degree of arbitrary polynomials for which the formula gives exact values of integrals over any intervals. Hence for the trapezoidal rule, DP because we approximate the curve of ƒ by portions of straight lines (linear polynomials). For Simpson s rule we might expect DP (why?). Actually, DP by (9) because ƒ (4) is identically zero for a cubic polynomial. This makes Simpson s rule sufficiently accurate for most practical problems and accounts for its popularity. Numeric Stability with respect to rounding is another important property of Simpson s rule. Indeed, for the sum of the roundoff errors j of the m values ƒ j in (7) we obtain, since h (b a)/m, h 4 m (b a) m 6mu (b a)u where u is the rounding unit (u _ 6 if we round off to 6D; see Sec. 9.). Also 6 4 is the sum of the coefficients for a pair of intervals in (7); take m in (7) to see this. The bound (b a)u is independent of m, so that it cannot increase with increasing m, that is, with decreasing h. This proves stability. Newton Cotes Formulas. We mention that the trapezoidal and Simpson rules are special closed Newton Cotes formulas, that is, integration formulas in which ƒ(x) is interpolated at equally spaced nodes by a polynomial of degree n (n for trapezoidal, n for Simpson), and closed means that a and b are nodes (a x, b x n ). n (the three-eighths rule; Review Prob. ) and a higher n are used occasionally. From n 8 on, some of the coefficients become negative, so that a positive ƒ j could make a negative contribution to an integral, which is absurd. For more on this topic see Ref. [E5] in App..

14 c9-b.qxd 9/6/5 6:4 PM Page 8 SEC. 9.5 Numeric Integration and Differentiation 8 EXAMPLE Simpson s Rule. Error Estimate Evaluate J Solution. e x dx by Simpson s rule with m and estimate the error. Since h., Table 9.5 gives. J ( ) Estimate of error. Differentiation gives ƒ (4) (x) 4(4x 4 x )e x. By considering the derivative ƒ (5) of ƒ (4) we find that the largest value of ƒ (4) in the interval of integration occurs at and the smallest value at x* (.5.5 ) /. Computation gives the values M 4 ƒ (4) () and M 4 * ƒ (4) (x*) Since m and b a, we obtain C / Therefore, from (9),. 7 S. 5. Hence J must lie between and , so that at least four digits of our approximate value are exact. Actually, the value is exact to 5D because J (exact to 6D). Thus our result is much better than that in Example obtained by the trapezoidal rule, whereas the number of operations is nearly the same in both cases. Table 9.5 Computations in Example j x j x j e x j Sums Instead of picking an n m and then estimating the error by (9), as in Example, it is better to require an accuracy (e.g., 6D) and then determine n m from (9). EXAMPLE 4 Determination of n m in Simpson s Rule from the Required Accuracy What n should we choose in Example to get 6D-accuracy? Solution. Using M 4 (which is bigger in absolute value than M 4 *), we get from (9), with b a and the required accuracy, 6 CM 4 6, thus m [ ] 8(m) / Hence we should choose n m. Do the computation, which parallels that in Example. Note that the error bounds in (4) or (9) may sometimes be loose, so that in such a case a smaller n m may already suffice.

15 c9-b.qxd 9/6/5 6:4 PM Page CHAP. 9 Numerics in General Error Estimation for Simpson s Rule by Halving h. The idea is the same as in (5) and gives () h/ (J h/ J h ). 5 J h is obtained by using h and J h/ by using _ h, and h/ is the error of J h/. Derivation. In (5) we had _ as the reciprocal of 4 and _ (_ 4 ) resulted from h in () by replacing h with h. In () we have 5 as the reciprocal of 5 6 and _ (_ 6 )4 results from h 4 in (8) by replacing h with _ h. EXAMPLE 5 Error Estimation for Simpson s Rule by Halving Integrate ƒ(x) _ 4 x4 cos _ 4 x from to with h and apply (). Solution. The exact 5D-value of the integral is J.595. Simpson s rule gives J h _ [ƒ() 4ƒ() ƒ()] _ ( ).7448, J h/ [ƒ() 4ƒ( ) ƒ() 4ƒ( ) ƒ()] 6 [ ] Hence () gives h/ _ ( ).67 and thus J 5 J h/ h/.66, with an error.8, which is less in absolute value than _ of the error.979 of J h/. Hence the use of () was well worthwhile. Adaptive Integration The idea is to adapt step h to the variability of ƒ(x). That is, where ƒ varies but little, we can proceed in large steps without causing a substantial error in the integral, but where ƒ varies rapidly, we have to take small steps in order to stay everywhere close enough to the curve of ƒ. Changing h is done systematically, usually by halving h, and automatically (not by hand ) depending on the size of the (estimated) error over a subinterval. The subinterval is halved if the corresponding error is still too large, that is, larger than a given tolerance TOL (maximum admissible absolute error), or is not halved if the error is less than or equal to TOL. Adapting is one of the techniques typical of modern software. In connection with integration it can be applied to various methods. We explain it here for Simpson s rule. In Table 9.6 a star means that for that subinterval, TOL has been reached. EXAMPLE 6 Adaptive Integration with Simpson s Rule Integrate ƒ(x) _ 4 x4 cos _ 4 x from x to by adaptive integration and with Simpson s rule and TOL[, ].. Solution. Table 9.6 shows the calculations. Figure 44 shows the integrand ƒ(x) and the adapted intervals used. The first two intervals ([,.5], [.5,.]) have length.5, hence h.5 [because we use m subintervals in Simpson s rule (7**)]. The next two intervals ([.,.5], [.5,.5]) have length.5 (hence h.5) and the last four intervals have length.5. Sample computations. For.7448 see Example 5. Formula () gives ( )/5.6. Note that.76 refers to [,.5] and [.5, ], so that we must subtract the value corresponding to [, ] in the line before. Etc. TOL[, ]. gives

16 c9-b.qxd 9/6/5 6:4 PM Page 85 SEC. 9.5 Numeric Integration and Differentiation 85. for subintervals of length,.5 for length.5, etc. The value of the integral obtained is the sum of the values marked by an asterisk (for which the error estimate has become less than TOL). This gives J The exact 5D-value is J.595. Hence the error is.7. This is about / of the absolute value of that in Example 5. Our more extensive computation has produced a much better result. Table 9.6 Computations in Example 6 Interval Integral Error () TOL Comment [, ] [, ].794 [, ].695 Sum Divide further [.,.5].478 [.5,.].894 Sum.76*.6. TOL reached [.,.5].5876 [.5,.].658 Sum..8. Divide further [.,.5].544 [.5,.5].85 Sum.58895*.48.5 TOL reached [.5,.75].885 [.75,.].8457 Sum Divide further [.5,.65].9644 [.65,.75].99 Sum.886*..5 TOL reached [.75,.875].545 [.875,.].6578 Sum.848*..5 TOL reached f(x) Fig. 44. Adaptive integration in Example 6 x

17 c9-b.qxd 9/6/5 6:4 PM Page CHAP. 9 Numerics in General Gauss Integration Formulas Maximum Degree of Precision Our integration formulas discussed so far use function values at predetermined (equidistant) x-values (nodes) and give exact results for polynomials not exceeding a certain degree [called the degree of precision; see after (9)]. But we can get much more accurate integration formulas as follows. We set () ƒ(t) dt n A j ƒ j [ƒ j ƒ(t j )] j with fixed n, and t obtained from x a, b by setting x _ [a(t ) b(t )]. Then we determine the n coefficients A,, A n and n nodes t,, t n so that () gives exact results for polynomials of degree k as high as possible. Since n n n is the number of coefficients of a polynomial of degree n, it follows that k n. Gauss has shown that exactness for polynomials of degree not exceeding n (instead of n for predetermined nodes) can be attained, and he has given the location of the t j ( the jth zero of the Legendre polynomial P n in Sec. 5.) and the coefficients A j which depend on n but not on ƒ(t), and are obtained by using Lagrange s interpolation polynomial, as shown in Ref. [E5] listed in App.. With these t j and A j, formula () is called a Gauss integration formula or Gauss quadrature formula. Its degree of precision is n, as just explained. Table 9.7 gives the values needed for n,, 5. (For larger n, see pp of Ref. [GR] in App..) Table 9.7 Gauss Integration: Nodes t j and Coefficients A j n Nodes t j Coefficients A j Degree of Precision EXAMPLE 7 Gauss Integration Formula with n Evaluate the integral in Example by the Gauss integration formula () with n. Solution. We have to convert our integral from to into an integral from to. We set x _ (t ). Then dx _ dt, and () with n and the above values of the nodes and the coefficients yields

18 c9-b.qxd 9/6/5 6:4 PM Page 87 SEC. 9.5 Numeric Integration and Differentiation 87 ( x exp ) dx exp ( 4 (t ) ) dt [ exp ( ( ) ) exp ( ) exp ( ( ) )] (exact to 6D: ), which is almost as accurate as the Simpson result obtained in Example with a much larger number of arithmetic operations. With function values (as in this example) and Simpson s rule we would get _ ( 6 4e.5 e ).747 8, with an error over times that of the Gauss integration. EXAMPLE 8 Gauss Integration Formula with n 4 and 5 Integrate ƒ(x) _ 4 x4 cos _ 4 x from x to by Gauss. Compare with the adaptive integration in Example 6 and comment. Solution. x t gives ƒ(t) _ (t 4 )4 cos ( _ 4 (t )), as needed in (). For n 4 we calculate (6S) J A ƒ A 4 ƒ 4 A (ƒ ƒ 4 ) A (ƒ ƒ ).47855(.99.57).6545( ).595. The error is. because J.595 (6S). Calculating with S and n 4 gives the same result; so the error is due to the formula, not rounding. For n 5 and S we get J , too large by the amount. 5 because J (S). The accuracy is impressive, particularly if we compare the amount of work with that in Example 6. Gauss integration is of considerable practical importance. Whenever the integrand ƒ is given by a formula (not just by a table of numbers) or when experimental measurements can be set at times t j (or whatever t represents) shown in Table 9.7 or in Ref. [GR], then the great accuracy of Gauss integration outweighs the disadvantage of the complicated t j and A j (which may have to be stored). Also, Gauss coefficients A j are positive for all n, in contrast with some of the Newton Cotes coefficients for larger n. Of course, there are frequent applications with equally spaced nodes, so that Gauss integration does not apply (or has no great advantage if one first has to get the t j in () by interpolation). Since the endpoints and of the interval of integration in () are not zeros of P n, they do not occur among t,, t n, and the Gauss formula () is called, therefore, an open formula, in contrast with a closed formula, in which the endpoints of the interval of integration are t and t n. [For example, () and (7) are closed formulas.] Numeric Differentiation Numeric differentiation is the computation of values of the derivative of a function ƒ from given values of ƒ. Numeric differentiation should be avoided whenever possible, because, whereas integration is a smoothing process and is not affected much by small inaccuracies in function values, differentiation tends to make matters rough and generally gives values of ƒ much less accurate than those of ƒ remember that the derivative is the limit of the difference quotient, and in the latter you usually have a small difference of large quantities that you then divide by a small quantity. However, the formulas to be obtained will be basic in the numeric solution of differential equations. We use the notations ƒ j ƒ (x j ), ƒ j ƒ (x j ), etc., and may obtain rough approximation formulas for derivatives by remembering that This suggests ƒ (x) lim ƒ(x h) ƒ(x) h h*.

19 c9-b.qxd 9/6/5 6:4 PM Page CHAP. 9 Numerics in General ƒ () ƒ / ƒ ƒ /. h h Similarly, for the second derivative we obtain () ƒ ƒ ƒ ƒ ƒ, etc. h More accurate approximations are obtained by differentiating suitable Lagrange polynomials. Differentiating (6) and remembering that the denominators in (6) are h, h, h, we have x x ƒ (x) p x x x x x x x (x) ƒ ƒ ƒ. h h Evaluating this at x, x, x, we obtain the three-point formulas (a) ƒ ( ƒ 4ƒ ƒ ), h (4) (b) ƒ ( ƒ ƒ ), h (c) ƒ (ƒ 4ƒ ƒ ). h Applying the same idea to the Lagrange polynomial p 4 (x), we obtain similar formulas, in particular, (5) ƒ (ƒ 8ƒ 8ƒ ƒ 4 ). h Some examples and further formulas are included in the problem set as well as in Ref. [E5] listed in App.. h h PROBLEM SET 9.5. (Rectangular rule) Evaluate the integral in Example by the rectangular rule () with a subinterval of length... Derive a formula for lower and upper bounds for the rectangular rule and apply it to Prob.. 8 TRAPEZOIDAL AND SIMPSON S RULES Evaluate the integrals numerically as indicated and determine the error by using an integration formula known from calculus. F(x) x dx*, G(x) x dx*, x* cos x* H(x) x x*e x* dx*. F() by (), n 4. F() by (7), n 5. G() by (), n 6. G() by (7), n 7. H(4) by (), n 8. H(4) by (7), n 9 HALVING Estimate the error by halving. 9. In Prob. 5. In Prob. 6. In Prob. 7. In Prob. 8

20 c9-b.qxd 9//5 :4 PM Page 89 SEC. 9.5 Numeric Integration and Differentiation 89 9 NONELEMENTARY INTEGRALS The following integrals cannot be evaluated by the usual methods of calculus. Evaluate them as indicated. Si(x) x S(x) x sin (x* ) dx*, sin x* x* dx*, C(x) x cos (x* ) dx* Si(x) is the sine integral. S(x) and C(x) are the Fresnel integrals. (See App...). Si() by (), n 5, n 4. Using the values in Prob., obtain a better value for Si(). Hint. Use (5). 5. Si() by (7), m, m 4 6. Obtain a better value in Prob. 5. Hint. Use (). 7. Si() by (7), m 8. S(.5) by (7), m 9. C(.5) by (7), m. (Stability) Prove that the trapezoidal rule is stable with respect to rounding. 4 GAUSS INTEGRATION Integrate by () with n 5:. /x from to. cos x from to _. e x from to 4. sin (x ) from to.5 5. (Given TOL) Find the smallest n in computing the integral of /x from to for which 5D-accuracy is guaranteed (a) by (4) in the use of (), (b) by (9) in the use of (7). Compare and comment. 6. TEAM PROJECT. Romberg Integration (W. Romberg, Norske Videnskab. Trondheim, Førh. 8, Nr. 7, 955). This method uses the trapezoidal rule and gains precision stepwise by halving h and adding an error estimate. Do this for the integral of ƒ(x) e x from x to x with TOL, as follows. Step. Apply the trapezoidal rule () with h (hence n ) to get an approximation J. Halve h and use () to get J and an error estimate (J J ). If TOL, stop. The result is J J. Step. Show that.66596, hence TOL and go on. Use () with h/4 to get J and add to it the error estimate _ (J J ) to get the better J J. Calculate (J J ) (J J ). 4 5 If TOL, stop. The result is J J. (Why does 4 6 come in?) Show that we obtain.66, so that we can stop. Arrange your J- and -values in a kind of difference table. J J J J J J If were greater than TOL, you would have to go on and calculate in the next step J 4 from () with h _ 4 ; then J 4 J 4 4 with 4 (J 4 J ) J 4 J 4 4 with 4 (J 4 J ) 5 J 44 J 4 4 with 4 (J 4 J ) 6 where 6 6. (How does this come in?) Apply the Romberg method to the integral of ƒ(x) _ 4 x 4 cos _ 4 x from x to with TOL 4. DIFFERENTIATION 7. Consider ƒ(x) x 4 for x, x., x.4, x.6, x 4.8. Calculate ƒ from (4a), (4b), (4c), (5). Determine the errors. Compare and comment. 8. A four-point formula for the derivative is ƒ ( ƒ ƒ 6ƒ ƒ 4 ). 6h Apply it to ƒ(x) x 4 with x,, x 4 as in Prob. 7, determine the error, and compare it with that in the case of (5). 9. The derivative ƒ (x) can also be approximated in terms of first-order and higher order differences (see Sec. 9.): ƒ (x ) ( ƒ ƒ h ƒ 4 ƒ ). 4 Compute ƒ (.4) in Prob. 7 from this formula, using differences up to and including first order, second order, third order, fourth order.. Derive the formula in Prob. 9 from (4) in Sec. 9..

21 c9-b.qxd 9/6/5 6:4 PM Page 8 8 CHAP. 9 Numerics in General CHAPTER 9 REVIEW QUESTIONS AND PROBLEMS. What is a numeric method? How has the computer influenced numeric methods?. What is floating-point representation of numbers? Overflow and underflow?. How do error and relative error behave under addition? Under multiplication? 4. Why are roundoff errors important? State the rounding rules. 5. What is an algorithm? Which of its properties are important in software implementation? 6. Why is the selection of a good method at least as important on a large computer as it is on a small one? 7. Explain methods for solving equations, in particular fixed-point iteration and its convergence. 8. Can the Newton ( Raphson) method diverge? Is it fast? Same questions for the bisection method. 9. What is the advantage of Newton s interpolation formulas over Lagrange s?. What do you remember about errors in polynomial interpolation?. What is spline interpolation? Its advantage over polynomial interpolation?. List and compare numeric integration methods. When would you apply them?. In what sense is Gauss integration optimal? Explain details. 4. What does adaptive integration mean? Why is it useful? 5. Why is numeric differentiation generally more delicate than numeric integration? 6. Write.587, ,.64, 4.948, /, 85/ 7 in floating-point form with 5S (5 significant digits, properly rounded). 7. Compute ( )/( ) as given and then rounded stepwise to S, S, S. ( Stepwise means rounding the four rounded numbers, not the given ones.) Comment on your results. 8. Compute.97/( ) with the numbers as given and then rounded stepwise (that is, rounding the rounded numbers) to 4S, S, S. Comment. 9. Solve x 5x by (6) and by (7) in Sec. 9., using 5S in the computation. Compare and comment.. Solve x x 4 by (6) and by (7) in Sec. 9., using 5S in the computation. Compare and comment.. Let 4.8 and.75 be correctly rounded to the number of digits shown. Determine the smallest interval in which the sum (using the true instead of the rounded values) must lie.. Answer the question in Prob. for the difference What is the relative error of na in terms of that of a? 4. Show that the relative error of a is about twice that of a. 5. Compute the solution of x 5 x. near x by transforming the equation into the form x g(x) and starting from x. (Use 6S.) 6. Solve cos x x by iteration (6S, x ), writing it as x (.74x cos x)/.74, obtaining x (exact to 6S!). Why does this converge so rapidly? 7. Solve x 4 x x 4 by Newton s method with x and 6S accuracy. 8. Solve cos x x by the method of false position. 9. Compute ƒ(.8) from ƒ(.). ƒ(.).987 ƒ(.4).96 ƒ(.6).854 ƒ(.8).6967 ƒ(.).54 by linear interpolation. By quadratic interpolation, using ƒ(.), ƒ(.4), ƒ(.6).. Find the cubic spline for the data ƒ( ) ƒ() ƒ() ƒ(5) 45 k k.. Compute the integral of x from to by the trapezoidal rule with n 5. What error bounds are obtained from (4) in Sec. 9.5? What is the actual error of the result? Why is this result larger than the exact value?. Compute the integral of cos (x ) from to by Simpson s rule with m and m 4 and estimate the error by () in Sec (This is the Fresnel integral (8) in App.. with x.). Compute the integral of cos x from to _ by the three-eights rule b ƒ(x) dx h(ƒ ƒ ƒ ƒ ) a 8 (b a)h 4 ƒ (iv) (tˆ) 8 and give error bounds; here a tˆ b and x j a (b a)j/, j,,.

22 c9-b.qxd 9/6/5 6:4 PM Page 8 Summary of Chapter 9 8 SUMMARY OF CHAPTER 9 Numerics in General In this chapter we discussed concepts that are relevant throughout numeric work as a whole and methods of a general nature, as opposed to methods for linear algebra (Chap. ) or differential equations (Chap. ). In scientific computations we use the floating-point representation of numbers (Sec. 9.); fixed-point representation is less suitable in most cases. Numeric methods give approximate values a of quantities. The error of a is () a a (Sec. 9.) where a is the exact value. The relative error of a is /a. Errors arise from rounding, inaccuracy of measured values, truncation (that is, replacement of integrals by sums, series by partial sums), and so on. An algorithm is called numerically stable if small changes in the initial data give only correspondingly small changes in the final results. Unstable algorithms are generally useless because errors may become so large that results will be very inaccurate. Numeric instability of algorithms must not be confused with mathematical instability of problems ( ill-conditioned problems, Sec. 9.). Fixed-point iteration is a method for solving equations ƒ(x) in which the equation is first transformed algebraically to x g(x), an initial guess x for the solution is made, and then approximations x, x,, are successively computed by iteration from (see Sec. 9.) () x n g(x n ) (n,, ). Newton s method for solving equations ƒ(x) is an iteration ƒ(x n ) () x n x n (Sec. 9.). ƒ (xn ) Here x n is the x-intercept of the tangent of the curve y ƒ(x) at the point x n. This method is of second order (Theorem, Sec. 9.). If we replace ƒ in () by a difference quotient (geometrically: we replace the tangent by a secant), we obtain the secant method; see () in Sec. 9.. For the bisection method (which converges slowly) and the method of false position, see Problem Set 9.. Polynomial interpolation means the determination of a polynomial p n (x) such that p n (x j ) ƒ j, where j,, n and (x, ƒ ),, (x n, ƒ n ) are measured or observed values, values of a function, etc. p n (x) is called an interpolation polynomial. For given data, p n (x) of degree n (or less) is unique. However, it can be written in different forms, notably in Lagrange s form (4), Sec. 9., or in Newton s divided difference form (), Sec. 9., which requires fewer operations. For regularly spaced x, x x h,, x n x nh the latter becomes Newton s forward difference formula (formula (4) in Sec. 9.)

23 c9-b.qxd 9/6/5 6:4 PM Page 8 8 CHAP. 9 Numerics in General r(r ) (r n ) (4) ƒ(x) p n (x) ƒ r ƒ n ƒ n! where r (x x )/h and the forward differences are ƒ j ƒ j ƒ j and k ƒ j k ƒ j k ƒ j (k,, ). A similar formula is Newton s backward difference interpolation formula (formula (8) in Sec. 9.). Interpolation polynomials may become numerically unstable as n increases, and instead of interpolating and approximating by a single high-degree polynomial it is preferable to use a cubic spline g(x), that is, a twice continuously differentiable interpolation function [thus, g(x j ) ƒ j], which in each subinterval x j x x j consists of a cubic polynomial q j (x); see Sec Simpson s rule of numeric integration is [see (7), Sec. 9.5] (5) b a h ƒ(x) dx (ƒ 4ƒ ƒ 4ƒ ƒ m 4ƒ m ƒ m ) with equally spaced nodes x j x jh, j,, m, h (b a)/(m), and ƒ j ƒ(x j ). It is simple but accurate enough for many applications. Its degree of precision is DP because the error (8), Sec. 9.5, involves h 4. A more practical error estimate is (), Sec. 9.5, h/ (J h/ J h ), 5 obtained by first computing with step h, then with step h/, and then taking /5 of the difference of the results. Simpson s rule is the most important of the Newton Cotes formulas, which are obtained by integrating Lagrange interpolation polynomials, linear ones for the trapezoidal rule (), Sec. 9.5, quadratic for Simpson s rule, cubic for the three-eights rule (see the Chap. 9 Review Problems), etc. Adaptive integration (Sec. 9.5, Example 6) is integration that adjusts ( adapts ) the step (automatically) to the variability of ƒ(x). Romberg integration (Team Project 6, Problem Set 9.5) starts from the trapezoidal rule (), Sec. 9.5, with h, h/, h/4, etc. and improves results by systematically adding error estimates. Gauss integration (), Sec. 9.5, is important because of its great accuracy (DP n, compared to Newton Cotes s DP n or n). This is achieved by an optimal choice of the nodes, which are not equally spaced; see Table 9.7, Sec Numeric differentiation is discussed at the end of Sec (Its main application (to differential equations) follows in Chap..)

NUMERICAL METHODS. x n+1 = 2x n x 2 n. In particular: which of them gives faster convergence, and why? [Work to four decimal places.

NUMERICAL METHODS. x n+1 = 2x n x 2 n. In particular: which of them gives faster convergence, and why? [Work to four decimal places. NUMERICAL METHODS 1. Rearranging the equation x 3 =.5 gives the iterative formula x n+1 = g(x n ), where g(x) = (2x 2 ) 1. (a) Starting with x = 1, compute the x n up to n = 6, and describe what is happening.

More information

Chapter 3: Root Finding. September 26, 2005

Chapter 3: Root Finding. September 26, 2005 Chapter 3: Root Finding September 26, 2005 Outline 1 Root Finding 2 3.1 The Bisection Method 3 3.2 Newton s Method: Derivation and Examples 4 3.3 How To Stop Newton s Method 5 3.4 Application: Division

More information

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

More information

GENG2140, S2, 2012 Week 7: Curve fitting

GENG2140, S2, 2012 Week 7: Curve fitting GENG2140, S2, 2012 Week 7: Curve fitting Curve fitting is the process of constructing a curve, or mathematical function, f(x) that has the best fit to a series of data points Involves fitting lines and

More information

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam Jim Lambers MAT 460/560 Fall Semester 2009-10 Practice Final Exam 1. Let f(x) = sin 2x + cos 2x. (a) Write down the 2nd Taylor polynomial P 2 (x) of f(x) centered around x 0 = 0. (b) Write down the corresponding

More information

Numerical Analysis Exam with Solutions

Numerical Analysis Exam with Solutions Numerical Analysis Exam with Solutions Richard T. Bumby Fall 000 June 13, 001 You are expected to have books, notes and calculators available, but computers of telephones are not to be used during the

More information

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn Review Taylor Series and Error Analysis Roots of Equations Linear Algebraic Equations Optimization Numerical Differentiation and Integration Ordinary Differential Equations Partial Differential Equations

More information

Mathematics for Engineers. Numerical mathematics

Mathematics for Engineers. Numerical mathematics Mathematics for Engineers Numerical mathematics Integers Determine the largest representable integer with the intmax command. intmax ans = int32 2147483647 2147483647+1 ans = 2.1475e+09 Remark The set

More information

Introductory Numerical Analysis

Introductory Numerical Analysis Introductory Numerical Analysis Lecture Notes December 16, 017 Contents 1 Introduction to 1 11 Floating Point Numbers 1 1 Computational Errors 13 Algorithm 3 14 Calculus Review 3 Root Finding 5 1 Bisection

More information

CS 257: Numerical Methods

CS 257: Numerical Methods CS 57: Numerical Methods Final Exam Study Guide Version 1.00 Created by Charles Feng http://www.fenguin.net CS 57: Numerical Methods Final Exam Study Guide 1 Contents 1 Introductory Matter 3 1.1 Calculus

More information

Numerical integration and differentiation. Unit IV. Numerical Integration and Differentiation. Plan of attack. Numerical integration.

Numerical integration and differentiation. Unit IV. Numerical Integration and Differentiation. Plan of attack. Numerical integration. Unit IV Numerical Integration and Differentiation Numerical integration and differentiation quadrature classical formulas for equally spaced nodes improper integrals Gaussian quadrature and orthogonal

More information

MAT 460: Numerical Analysis I. James V. Lambers

MAT 460: Numerical Analysis I. James V. Lambers MAT 460: Numerical Analysis I James V. Lambers January 31, 2013 2 Contents 1 Mathematical Preliminaries and Error Analysis 7 1.1 Introduction............................ 7 1.1.1 Error Analysis......................

More information

Chapter 4: Interpolation and Approximation. October 28, 2005

Chapter 4: Interpolation and Approximation. October 28, 2005 Chapter 4: Interpolation and Approximation October 28, 2005 Outline 1 2.4 Linear Interpolation 2 4.1 Lagrange Interpolation 3 4.2 Newton Interpolation and Divided Differences 4 4.3 Interpolation Error

More information

Mon Jan Improved acceleration models: linear and quadratic drag forces. Announcements: Warm-up Exercise:

Mon Jan Improved acceleration models: linear and quadratic drag forces. Announcements: Warm-up Exercise: Math 2250-004 Week 4 notes We will not necessarily finish the material from a given day's notes on that day. We may also add or subtract some material as the week progresses, but these notes represent

More information

Engg. Math. II (Unit-IV) Numerical Analysis

Engg. Math. II (Unit-IV) Numerical Analysis Dr. Satish Shukla of 33 Engg. Math. II (Unit-IV) Numerical Analysis Syllabus. Interpolation and Curve Fitting: Introduction to Interpolation; Calculus of Finite Differences; Finite Difference and Divided

More information

Cubic Splines MATH 375. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Cubic Splines

Cubic Splines MATH 375. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Cubic Splines Cubic Splines MATH 375 J. Robert Buchanan Department of Mathematics Fall 2006 Introduction Given data {(x 0, f(x 0 )), (x 1, f(x 1 )),...,(x n, f(x n ))} which we wish to interpolate using a polynomial...

More information

Integration, differentiation, and root finding. Phys 420/580 Lecture 7

Integration, differentiation, and root finding. Phys 420/580 Lecture 7 Integration, differentiation, and root finding Phys 420/580 Lecture 7 Numerical integration Compute an approximation to the definite integral I = b Find area under the curve in the interval Trapezoid Rule:

More information

X. Numerical Methods

X. Numerical Methods X. Numerical Methods. Taylor Approximation Suppose that f is a function defined in a neighborhood of a point c, and suppose that f has derivatives of all orders near c. In section 5 of chapter 9 we introduced

More information

CHAPTER 4. Interpolation

CHAPTER 4. Interpolation CHAPTER 4 Interpolation 4.1. Introduction We will cover sections 4.1 through 4.12 in the book. Read section 4.1 in the book on your own. The basic problem of one-dimensional interpolation is this: Given

More information

Exact and Approximate Numbers:

Exact and Approximate Numbers: Eact and Approimate Numbers: The numbers that arise in technical applications are better described as eact numbers because there is not the sort of uncertainty in their values that was described above.

More information

PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435

PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435 PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435 Professor Biswa Nath Datta Department of Mathematical Sciences Northern Illinois University DeKalb, IL. 60115 USA E mail: dattab@math.niu.edu

More information

Scientific Computing

Scientific Computing 2301678 Scientific Computing Chapter 2 Interpolation and Approximation Paisan Nakmahachalasint Paisan.N@chula.ac.th Chapter 2 Interpolation and Approximation p. 1/66 Contents 1. Polynomial interpolation

More information

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel LECTURE NOTES on ELEMENTARY NUMERICAL METHODS Eusebius Doedel TABLE OF CONTENTS Vector and Matrix Norms 1 Banach Lemma 20 The Numerical Solution of Linear Systems 25 Gauss Elimination 25 Operation Count

More information

Interpolation Theory

Interpolation Theory Numerical Analysis Massoud Malek Interpolation Theory The concept of interpolation is to select a function P (x) from a given class of functions in such a way that the graph of y P (x) passes through the

More information

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b)

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b) Numerical Methods - PROBLEMS. The Taylor series, about the origin, for log( + x) is x x2 2 + x3 3 x4 4 + Find an upper bound on the magnitude of the truncation error on the interval x.5 when log( + x)

More information

Homework and Computer Problems for Math*2130 (W17).

Homework and Computer Problems for Math*2130 (W17). Homework and Computer Problems for Math*2130 (W17). MARCUS R. GARVIE 1 December 21, 2016 1 Department of Mathematics & Statistics, University of Guelph NOTES: These questions are a bare minimum. You should

More information

Lecture Note 3: Interpolation and Polynomial Approximation. Xiaoqun Zhang Shanghai Jiao Tong University

Lecture Note 3: Interpolation and Polynomial Approximation. Xiaoqun Zhang Shanghai Jiao Tong University Lecture Note 3: Interpolation and Polynomial Approximation Xiaoqun Zhang Shanghai Jiao Tong University Last updated: October 10, 2015 2 Contents 1.1 Introduction................................ 3 1.1.1

More information

Virtual University of Pakistan

Virtual University of Pakistan Virtual University of Pakistan File Version v.0.0 Prepared For: Final Term Note: Use Table Of Content to view the Topics, In PDF(Portable Document Format) format, you can check Bookmarks menu Disclaimer:

More information

8.5 Taylor Polynomials and Taylor Series

8.5 Taylor Polynomials and Taylor Series 8.5. TAYLOR POLYNOMIALS AND TAYLOR SERIES 50 8.5 Taylor Polynomials and Taylor Series Motivating Questions In this section, we strive to understand the ideas generated by the following important questions:

More information

Mathematical Methods for Numerical Analysis and Optimization

Mathematical Methods for Numerical Analysis and Optimization Biyani's Think Tank Concept based notes Mathematical Methods for Numerical Analysis and Optimization (MCA) Varsha Gupta Poonam Fatehpuria M.Sc. (Maths) Lecturer Deptt. of Information Technology Biyani

More information

2tdt 1 y = t2 + C y = which implies C = 1 and the solution is y = 1

2tdt 1 y = t2 + C y = which implies C = 1 and the solution is y = 1 Lectures - Week 11 General First Order ODEs & Numerical Methods for IVPs In general, nonlinear problems are much more difficult to solve than linear ones. Unfortunately many phenomena exhibit nonlinear

More information

5. Hand in the entire exam booklet and your computer score sheet.

5. Hand in the entire exam booklet and your computer score sheet. WINTER 2016 MATH*2130 Final Exam Last name: (PRINT) First name: Student #: Instructor: M. R. Garvie 19 April, 2016 INSTRUCTIONS: 1. This is a closed book examination, but a calculator is allowed. The test

More information

Lectures 9-10: Polynomial and piecewise polynomial interpolation

Lectures 9-10: Polynomial and piecewise polynomial interpolation Lectures 9-1: Polynomial and piecewise polynomial interpolation Let f be a function, which is only known at the nodes x 1, x,, x n, ie, all we know about the function f are its values y j = f(x j ), j

More information

AIMS Exercise Set # 1

AIMS Exercise Set # 1 AIMS Exercise Set #. Determine the form of the single precision floating point arithmetic used in the computers at AIMS. What is the largest number that can be accurately represented? What is the smallest

More information

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004 Department of Applied Mathematics and Theoretical Physics AMA 204 Numerical analysis Exam Winter 2004 The best six answers will be credited All questions carry equal marks Answer all parts of each question

More information

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by 1. QUESTION (a) Given a nth degree Taylor polynomial P n (x) of a function f(x), expanded about x = x 0, write down the Lagrange formula for the truncation error, carefully defining all its elements. How

More information

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9 TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1 Chapter 01.01 Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9 Chapter 01.02 Measuring errors 11 True error 11 Relative

More information

15 Nonlinear Equations and Zero-Finders

15 Nonlinear Equations and Zero-Finders 15 Nonlinear Equations and Zero-Finders This lecture describes several methods for the solution of nonlinear equations. In particular, we will discuss the computation of zeros of nonlinear functions f(x).

More information

Zeros of Functions. Chapter 10

Zeros of Functions. Chapter 10 Chapter 10 Zeros of Functions An important part of the mathematics syllabus in secondary school is equation solving. This is important for the simple reason that equations are important a wide range of

More information

Series Solutions of ODEs. Special Functions

Series Solutions of ODEs. Special Functions C05.tex 6/4/0 3: 5 Page 65 Chap. 5 Series Solutions of ODEs. Special Functions We continue our studies of ODEs with Legendre s, Bessel s, and the hypergeometric equations. These ODEs have variable coefficients

More information

Numerical techniques to solve equations

Numerical techniques to solve equations Programming for Applications in Geomatics, Physical Geography and Ecosystem Science (NGEN13) Numerical techniques to solve equations vaughan.phillips@nateko.lu.se Vaughan Phillips Associate Professor,

More information

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science EAD 115 Numerical Solution of Engineering and Scientific Problems David M. Rocke Department of Applied Science Taylor s Theorem Can often approximate a function by a polynomial The error in the approximation

More information

function independent dependent domain range graph of the function The Vertical Line Test

function independent dependent domain range graph of the function The Vertical Line Test Functions A quantity y is a function of another quantity x if there is some rule (an algebraic equation, a graph, a table, or as an English description) by which a unique value is assigned to y by a corresponding

More information

Section 3.1 Extreme Values

Section 3.1 Extreme Values Math 132 Extreme Values Section 3.1 Section 3.1 Extreme Values Example 1: Given the following is the graph of f(x) Where is the maximum (x-value)? What is the maximum (y-value)? Where is the minimum (x-value)?

More information

SPLINE INTERPOLATION

SPLINE INTERPOLATION Spline Background SPLINE INTERPOLATION Problem: high degree interpolating polynomials often have extra oscillations. Example: Runge function f(x = 1 1+4x 2, x [ 1, 1]. 1 1/(1+4x 2 and P 8 (x and P 16 (x

More information

Math Numerical Analysis Mid-Term Test Solutions

Math Numerical Analysis Mid-Term Test Solutions Math 400 - Numerical Analysis Mid-Term Test Solutions. Short Answers (a) A sufficient and necessary condition for the bisection method to find a root of f(x) on the interval [a,b] is f(a)f(b) < 0 or f(a)

More information

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form Qualifying exam for numerical analysis (Spring 2017) Show your work for full credit. If you are unable to solve some part, attempt the subsequent parts. 1. Consider the following finite difference: f (0)

More information

CHAPTER 10 Zeros of Functions

CHAPTER 10 Zeros of Functions CHAPTER 10 Zeros of Functions An important part of the maths syllabus in secondary school is equation solving. This is important for the simple reason that equations are important a wide range of problems

More information

Empirical Models Interpolation Polynomial Models

Empirical Models Interpolation Polynomial Models Mathematical Modeling Lia Vas Empirical Models Interpolation Polynomial Models Lagrange Polynomial. Recall that two points (x 1, y 1 ) and (x 2, y 2 ) determine a unique line y = ax + b passing them (obtained

More information

3.1 Introduction. Solve non-linear real equation f(x) = 0 for real root or zero x. E.g. x x 1.5 =0, tan x x =0.

3.1 Introduction. Solve non-linear real equation f(x) = 0 for real root or zero x. E.g. x x 1.5 =0, tan x x =0. 3.1 Introduction Solve non-linear real equation f(x) = 0 for real root or zero x. E.g. x 3 +1.5x 1.5 =0, tan x x =0. Practical existence test for roots: by intermediate value theorem, f C[a, b] & f(a)f(b)

More information

Unit 2: Solving Scalar Equations. Notes prepared by: Amos Ron, Yunpeng Li, Mark Cowlishaw, Steve Wright Instructor: Steve Wright

Unit 2: Solving Scalar Equations. Notes prepared by: Amos Ron, Yunpeng Li, Mark Cowlishaw, Steve Wright Instructor: Steve Wright cs416: introduction to scientific computing 01/9/07 Unit : Solving Scalar Equations Notes prepared by: Amos Ron, Yunpeng Li, Mark Cowlishaw, Steve Wright Instructor: Steve Wright 1 Introduction We now

More information

Section 6.6 Gaussian Quadrature

Section 6.6 Gaussian Quadrature Section 6.6 Gaussian Quadrature Key Terms: Method of undetermined coefficients Nonlinear systems Gaussian quadrature Error Legendre polynomials Inner product Adapted from http://pathfinder.scar.utoronto.ca/~dyer/csca57/book_p/node44.html

More information

8.3 Numerical Quadrature, Continued

8.3 Numerical Quadrature, Continued 8.3 Numerical Quadrature, Continued Ulrich Hoensch Friday, October 31, 008 Newton-Cotes Quadrature General Idea: to approximate the integral I (f ) of a function f : [a, b] R, use equally spaced nodes

More information

Numerical Methods. King Saud University

Numerical Methods. King Saud University Numerical Methods King Saud University Aims In this lecture, we will... find the approximate solutions of derivative (first- and second-order) and antiderivative (definite integral only). Numerical Differentiation

More information

Introduction to Calculus

Introduction to Calculus Introduction to Calculus Contents 1 Introduction to Calculus 3 11 Introduction 3 111 Origin of Calculus 3 112 The Two Branches of Calculus 4 12 Secant and Tangent Lines 5 13 Limits 10 14 The Derivative

More information

COURSE Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method

COURSE Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method COURSE 7 3. Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method The presence of derivatives in the remainder difficulties in applicability to practical problems

More information

Advanced Mathematics Unit 2 Limits and Continuity

Advanced Mathematics Unit 2 Limits and Continuity Advanced Mathematics 3208 Unit 2 Limits and Continuity NEED TO KNOW Expanding Expanding Expand the following: A) (a + b) 2 B) (a + b) 3 C) (a + b)4 Pascals Triangle: D) (x + 2) 4 E) (2x -3) 5 Random Factoring

More information

Advanced Mathematics Unit 2 Limits and Continuity

Advanced Mathematics Unit 2 Limits and Continuity Advanced Mathematics 3208 Unit 2 Limits and Continuity NEED TO KNOW Expanding Expanding Expand the following: A) (a + b) 2 B) (a + b) 3 C) (a + b)4 Pascals Triangle: D) (x + 2) 4 E) (2x -3) 5 Random Factoring

More information

M.SC. PHYSICS - II YEAR

M.SC. PHYSICS - II YEAR MANONMANIAM SUNDARANAR UNIVERSITY DIRECTORATE OF DISTANCE & CONTINUING EDUCATION TIRUNELVELI 627012, TAMIL NADU M.SC. PHYSICS - II YEAR DKP26 - NUMERICAL METHODS (From the academic year 2016-17) Most Student

More information

MTH301 Calculus II Glossary For Final Term Exam Preparation

MTH301 Calculus II Glossary For Final Term Exam Preparation MTH301 Calculus II Glossary For Final Term Exam Preparation Glossary Absolute maximum : The output value of the highest point on a graph over a given input interval or over all possible input values. An

More information

Numerical Methods of Approximation

Numerical Methods of Approximation Contents 31 Numerical Methods of Approximation 31.1 Polynomial Approximations 2 31.2 Numerical Integration 28 31.3 Numerical Differentiation 58 31.4 Nonlinear Equations 67 Learning outcomes In this Workbook

More information

n 1 f n 1 c 1 n+1 = c 1 n $ c 1 n 1. After taking logs, this becomes

n 1 f n 1 c 1 n+1 = c 1 n $ c 1 n 1. After taking logs, this becomes Root finding: 1 a The points {x n+1, }, {x n, f n }, {x n 1, f n 1 } should be co-linear Say they lie on the line x + y = This gives the relations x n+1 + = x n +f n = x n 1 +f n 1 = Eliminating α and

More information

CS 323: Numerical Analysis and Computing

CS 323: Numerical Analysis and Computing CS 323: Numerical Analysis and Computing MIDTERM #2 Instructions: This is an open notes exam, i.e., you are allowed to consult any textbook, your class notes, homeworks, or any of the handouts from us.

More information

1 Piecewise Cubic Interpolation

1 Piecewise Cubic Interpolation Piecewise Cubic Interpolation Typically the problem with piecewise linear interpolation is the interpolant is not differentiable as the interpolation points (it has a kinks at every interpolation point)

More information

Lösning: Tenta Numerical Analysis för D, L. FMN011,

Lösning: Tenta Numerical Analysis för D, L. FMN011, Lösning: Tenta Numerical Analysis för D, L. FMN011, 090527 This exam starts at 8:00 and ends at 12:00. To get a passing grade for the course you need 35 points in this exam and an accumulated total (this

More information

Introduction to Numerical Analysis

Introduction to Numerical Analysis Introduction to Numerical Analysis S. Baskar and S. Sivaji Ganesh Department of Mathematics Indian Institute of Technology Bombay Powai, Mumbai 400 076. Introduction to Numerical Analysis Lecture Notes

More information

3. Numerical integration

3. Numerical integration 3. Numerical integration... 3. One-dimensional quadratures... 3. Two- and three-dimensional quadratures... 3.3 Exact Integrals for Straight Sided Triangles... 5 3.4 Reduced and Selected Integration...

More information

NUMERICAL AND STATISTICAL COMPUTING (MCA-202-CR)

NUMERICAL AND STATISTICAL COMPUTING (MCA-202-CR) NUMERICAL AND STATISTICAL COMPUTING (MCA-202-CR) Autumn Session UNIT 1 Numerical analysis is the study of algorithms that uses, creates and implements algorithms for obtaining numerical solutions to problems

More information

Physics 115/242 Romberg Integration

Physics 115/242 Romberg Integration Physics 5/242 Romberg Integration Peter Young In this handout we will see how, starting from the trapezium rule, we can obtain much more accurate values for the integral by repeatedly eliminating the leading

More information

SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS BISECTION METHOD

SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS BISECTION METHOD BISECTION METHOD If a function f(x) is continuous between a and b, and f(a) and f(b) are of opposite signs, then there exists at least one root between a and b. It is shown graphically as, Let f a be negative

More information

Fourier Analysis Fourier Series C H A P T E R 1 1

Fourier Analysis Fourier Series C H A P T E R 1 1 C H A P T E R Fourier Analysis 474 This chapter on Fourier analysis covers three broad areas: Fourier series in Secs...4, more general orthonormal series called Sturm iouville epansions in Secs..5 and.6

More information

We consider the problem of finding a polynomial that interpolates a given set of values:

We consider the problem of finding a polynomial that interpolates a given set of values: Chapter 5 Interpolation 5. Polynomial Interpolation We consider the problem of finding a polynomial that interpolates a given set of values: x x 0 x... x n y y 0 y... y n where the x i are all distinct.

More information

Chapter 3 Higher Order Linear ODEs

Chapter 3 Higher Order Linear ODEs Chapter 3 Higher Order Linear ODEs Advanced Engineering Mathematics Wei-Ta Chu National Chung Cheng University wtchu@cs.ccu.edu.tw 1 2 3.1 Homogeneous Linear ODEs 3 Homogeneous Linear ODEs An ODE is of

More information

ROOT FINDING REVIEW MICHELLE FENG

ROOT FINDING REVIEW MICHELLE FENG ROOT FINDING REVIEW MICHELLE FENG 1.1. Bisection Method. 1. Root Finding Methods (1) Very naive approach based on the Intermediate Value Theorem (2) You need to be looking in an interval with only one

More information

Introduction - Motivation. Many phenomena (physical, chemical, biological, etc.) are model by differential equations. f f(x + h) f(x) (x) = lim

Introduction - Motivation. Many phenomena (physical, chemical, biological, etc.) are model by differential equations. f f(x + h) f(x) (x) = lim Introduction - Motivation Many phenomena (physical, chemical, biological, etc.) are model by differential equations. Recall the definition of the derivative of f(x) f f(x + h) f(x) (x) = lim. h 0 h Its

More information

Nonlinear Equations. Chapter The Bisection Method

Nonlinear Equations. Chapter The Bisection Method Chapter 6 Nonlinear Equations Given a nonlinear function f(), a value r such that f(r) = 0, is called a root or a zero of f() For eample, for f() = e 016064, Fig?? gives the set of points satisfying y

More information

Section 0.2 & 0.3 Worksheet. Types of Functions

Section 0.2 & 0.3 Worksheet. Types of Functions MATH 1142 NAME Section 0.2 & 0.3 Worksheet Types of Functions Now that we have discussed what functions are and some of their characteristics, we will explore different types of functions. Section 0.2

More information

INTRODUCTION TO COMPUTATIONAL MATHEMATICS

INTRODUCTION TO COMPUTATIONAL MATHEMATICS INTRODUCTION TO COMPUTATIONAL MATHEMATICS Course Notes for CM 271 / AMATH 341 / CS 371 Fall 2007 Instructor: Prof. Justin Wan School of Computer Science University of Waterloo Course notes by Prof. Hans

More information

3.3 Real Zeros of Polynomial Functions

3.3 Real Zeros of Polynomial Functions 71_00.qxp 12/27/06 1:25 PM Page 276 276 Chapter Polynomial and Rational Functions. Real Zeros of Polynomial Functions Long Division of Polynomials Consider the graph of f x 6x 19x 2 16x 4. Notice in Figure.2

More information

Taylor series. Chapter Introduction From geometric series to Taylor polynomials

Taylor series. Chapter Introduction From geometric series to Taylor polynomials Chapter 2 Taylor series 2. Introduction The topic of this chapter is find approximations of functions in terms of power series, also called Taylor series. Such series can be described informally as infinite

More information

Functions and Their Graphs

Functions and Their Graphs Functions and Their Graphs DEFINITION Function A function from a set D to a set Y is a rule that assigns a unique (single) element ƒ(x) Y to each element x D. A symbolic way to say y is a function of x

More information

CHAPTER 1. INTRODUCTION. ERRORS.

CHAPTER 1. INTRODUCTION. ERRORS. CHAPTER 1. INTRODUCTION. ERRORS. SEC. 1. INTRODUCTION. Frequently, in fact most commonly, practical problems do not have neat analytical solutions. As examples of analytical solutions to mathematical problems,

More information

Complex Integration Line Integral in the Complex Plane CHAPTER 14

Complex Integration Line Integral in the Complex Plane CHAPTER 14 HAPTER 14 omplex Integration hapter 13 laid the groundwork for the study of complex analysis, covered complex numbers in the complex plane, limits, and differentiation, and introduced the most important

More information

7.1 Indefinite Integrals Calculus

7.1 Indefinite Integrals Calculus 7.1 Indefinite Integrals Calculus Learning Objectives A student will be able to: Find antiderivatives of functions. Represent antiderivatives. Interpret the constant of integration graphically. Solve differential

More information

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

More information

Chapter 2 Polynomial and Rational Functions

Chapter 2 Polynomial and Rational Functions SECTION.1 Linear and Quadratic Functions Chapter Polynomial and Rational Functions Section.1: Linear and Quadratic Functions Linear Functions Quadratic Functions Linear Functions Definition of a Linear

More information

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane. Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane c Sateesh R. Mane 2018 3 Lecture 3 3.1 General remarks March 4, 2018 This

More information

December Exam Summary

December Exam Summary December Exam Summary 1 Lines and Distances 1.1 List of Concepts Distance between two numbers on the real number line or on the Cartesian Plane. Increments. If A = (a 1, a 2 ) and B = (b 1, b 2 ), then

More information

5.4 Bessel s Equation. Bessel Functions

5.4 Bessel s Equation. Bessel Functions SEC 54 Bessel s Equation Bessel Functions J (x) 87 # with y dy>dt, etc, constant A, B, C, D, K, and t 5 HYPERGEOMETRIC ODE At B (t t )(t t ), t t, can be reduced to the hypergeometric equation with independent

More information

Secondary Math 3 Honors - Polynomial and Polynomial Functions Test Review

Secondary Math 3 Honors - Polynomial and Polynomial Functions Test Review Name: Class: Date: Secondary Math 3 Honors - Polynomial and Polynomial Functions Test Review 1 Write 3x 2 ( 2x 2 5x 3 ) in standard form State whether the function is even, odd, or neither Show your work

More information

Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error. 2- Fixed point

Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error. 2- Fixed point Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error In this method we assume initial value of x, and substitute in the equation. Then modify x and continue till we

More information

4.9 APPROXIMATING DEFINITE INTEGRALS

4.9 APPROXIMATING DEFINITE INTEGRALS 4.9 Approximating Definite Integrals Contemporary Calculus 4.9 APPROXIMATING DEFINITE INTEGRALS The Fundamental Theorem of Calculus tells how to calculate the exact value of a definite integral IF the

More information

PLC Papers. Created For:

PLC Papers. Created For: PLC Papers Created For: Algebra and proof 2 Grade 8 Objective: Use algebra to construct proofs Question 1 a) If n is a positive integer explain why the expression 2n + 1 is always an odd number. b) Use

More information

3.1 Interpolation and the Lagrange Polynomial

3.1 Interpolation and the Lagrange Polynomial MATH 4073 Chapter 3 Interpolation and Polynomial Approximation Fall 2003 1 Consider a sample x x 0 x 1 x n y y 0 y 1 y n. Can we get a function out of discrete data above that gives a reasonable estimate

More information

8.7 MacLaurin Polynomials

8.7 MacLaurin Polynomials 8.7 maclaurin polynomials 67 8.7 MacLaurin Polynomials In this chapter you have learned to find antiderivatives of a wide variety of elementary functions, but many more such functions fail to have an antiderivative

More information

Preface. 2 Linear Equations and Eigenvalue Problem 22

Preface. 2 Linear Equations and Eigenvalue Problem 22 Contents Preface xv 1 Errors in Computation 1 1.1 Introduction 1 1.2 Floating Point Representation of Number 1 1.3 Binary Numbers 2 1.3.1 Binary number representation in computer 3 1.4 Significant Digits

More information

MTH603 FAQ + Short Questions Answers.

MTH603 FAQ + Short Questions Answers. Absolute Error : Accuracy : The absolute error is used to denote the actual value of a quantity less it s rounded value if x and x* are respectively the rounded and actual values of a quantity, then absolute

More information

AP Calculus Chapter 9: Infinite Series

AP Calculus Chapter 9: Infinite Series AP Calculus Chapter 9: Infinite Series 9. Sequences a, a 2, a 3, a 4, a 5,... Sequence: A function whose domain is the set of positive integers n = 2 3 4 a n = a a 2 a 3 a 4 terms of the sequence Begin

More information

INTERPOLATION. and y i = cos x i, i = 0, 1, 2 This gives us the three points. Now find a quadratic polynomial. p(x) = a 0 + a 1 x + a 2 x 2.

INTERPOLATION. and y i = cos x i, i = 0, 1, 2 This gives us the three points. Now find a quadratic polynomial. p(x) = a 0 + a 1 x + a 2 x 2. INTERPOLATION Interpolation is a process of finding a formula (often a polynomial) whose graph will pass through a given set of points (x, y). As an example, consider defining and x 0 = 0, x 1 = π/4, x

More information

Lecture 28 The Main Sources of Error

Lecture 28 The Main Sources of Error Lecture 28 The Main Sources of Error Truncation Error Truncation error is defined as the error caused directly by an approximation method For instance, all numerical integration methods are approximations

More information