since by using a computer we are limited to the use of elementary arithmetic operations

Size: px
Start display at page:

Download "since by using a computer we are limited to the use of elementary arithmetic operations"

Transcription

1 > 4. Interpolation and Approximation Most functions cannot be evaluated exactly: x, e x, ln x, trigonometric functions since by using a computer we are limited to the use of elementary arithmetic operations +,,, With these operations we can only evaluate polynomials and rational functions (polynomial divided by polynomials).

2 > 4. Interpolation and Approximation Interpolation Given points and corresponding values x 0, x 1,..., x n find a function f(x) such that y 0, y 1,..., y n f(x i ) = y i, i = 0,..., n. The interpolation function f is usually taken from a restricted class of functions: polynomials.

3 > 4. Interpolation and Approximation > 4.1 Polynomial Interpolation Theory Interpolation of functions f(x) x 0, x 1,..., x n f(x 0 ), f(x 1 ),..., f(x n ) Find a polynomial (or other special function) such that What is the error f(x) = p(x)? p(x i ) = f(x i ), i = 0,..., n.

4 > 4. Interpolation and Approximation > Linear interpolation Linear interpolation Given two sets of points (x 0, y 0 ) and (x 1, y 1 ) with x 0 x 1, draw a line through them, i.e., the graph of the linear polynomial x 0 x 1 l(x) = x x 1 y 0 + x x 0 y 1 x y 0 y 0 x 1 x 1 x 0 1 l(x) = (x 1 x)y 0 + (x x 0 )y 1 x 1 x 0 (5.1) We say that l(x) interpolates the value y i at the point x i, i = 0, 1, or l(x i ) = y i, i = 0, 1 Figure: Linear interpolation

5 > 4. Interpolation and Approximation > Linear interpolation Example Let the data points be (1, 1) and (4,2). The polynomial P 1 (x) is given by P 1 (x) = (4 x) 1 + (x 1) 2 3 The graph y = P 1 (x) and y = x, from which the data points were taken. (5.2) Figure: y = x and its linear interpolating polynomial (5.2)

6 > 4. Interpolation and Approximation > Linear interpolation Example Obtain an estimate of e using the function values e 0.82 = , e 0.83 = Denote x 0 = 0.82, x 1 = The interpolating polynomial P 1 (x) interpolating e x at x 0 and x 1 is and P 1 (x) = while the true value s (0.83 x) (x 0.82) P 1 (0.826) = (5.3) e = to eight significant digits.

7 > 4. Interpolation and Approximation > Quadratic Interpolation Assume three data points (x 0, y 0 ), (x 1, y 1 ), (x 2, y 2 ), with x 0, x 1, x 2 distinct. We construct the quadratic polynomial passing through these points using Lagrange s folmula P 2 (x) = y 0 L 0 (x) + y 1 L 1 (x) + y 2 L 2 (x) (5.4) with Lagrange interpolation basis functions for quadratic interpolating polynomial L 0 (x) = L 1 (x) = L 2 (x) = (x x1)(x x2) (x 0 x 1)(x 0 x 2) (x x0)(x x2) (x 1 x 0)(x 1 x 2) (x x0)(x x1) (x 2 x 0)(x 2 x 1) Each L i (x) has degree 2 P 2 (x) has degree 2. Moreover L i (x j ) = 0, j i for 0 i, j 2 i.e., L L i (x i ) = 1 i (x j ) = δ i,j = the Kronecker delta function. P 2 (x) interpolates the data P 2 (x) = y i, i=0,1,2 { 1, i = j 0, i j (5.5)

8 > 4. Interpolation and Approximation > Quadratic Interpolation Example Construct P 2 (x) for the data points (0, 1), (1, 1), (2, 7). Then P 2 (x)= (x 1)(x 2) 2 ( 1)+ x(x 2) 1 ( 1)+ x(x 1) 2 7 (5.6) Figure: The quadratic interpolating polynomial (5.6)

9 > 4. Interpolation and Approximation > Quadratic Interpolation With linear interpolation: obvious that there is only one straight line passing through two given data points. With three data points: only one quadratic interpolating polynomial whose graph passes through the points. Indeed: assume Q 2 (x), deg(q 2 ) 2 passing through (x i, y i ), i = 0, 1, 2, then it is equal to P 2 (x). The polynomial has deg(r) 2 and R(x) = P 2 (x) Q 2 (x) R(x i ) = P 2 (x i ) Q 2 (x i ) = y i y i = 0, for i = 0, 1, 2 So R(x) is a polynomial of degree 2 with three roots R(x) 0

10 > 4. Interpolation and Approximation > Quadratic Interpolation Example Calculate a quadratic interpolate to e from the function values e 0.82 = e 0.83 = e 0.84 = With x 0 = e 0.82, x 1 = e 0.83, x 2 = e 0.84, we have P 2 (0.826) = to eight digits, while the true answer e = and P 1 (0.826) =

11 > 4. Interpolation and Approximation > Higher-degree interpolation Lagrange s Formula Given n + 1 data points (x 0, y 0 ), (x 1, y 1 ),..., (x n, y n ) with all x i s distinct, unique P n, deg(p n ) n such that P n (x i ) = y i, i = 0,..., n given by Lagrange s Formula P n (x) = n y i L i (x) = y 0 L 0 (x) + y 1 L 1 (x) + y n L n (x) (5.7) i=0 where L i (x)= n j=0,j i where L i (x j ) = δ ij x x j x i x j = (x x 0) (x x i 1 )(x x i+1 ) (x x n ) (x i x 0 ) (x i x i 1 )(x i x i ) (x i x n ),

12 > 4. Interpolation and Approximation > Divided differences Remark; The Lagrange s formula (5.7) is suited for theoretical uses, but is impractical for computing the value of an interpolating polynomial: knowing P 2 (x) does not lead to a less expensive way to compute P 3 (x). But for this we need some preliminaries, and we start with a discrete version of the derivative of a function f(x). Definition (First-order divided difference) Let x 0 x 1, we define the first-order divided difference of f(x) by f[x 0, x 1 ] = f(x 1) f(x 2 ) x 1 x 2 (5.8) If f(x) is differentiable on an interval containing x 0 and x 1, then the mean value theorem gives f[x 0, x 1 ] = f (c), for c between x 0 and x 1. Also if x 0, x 1 are close together, then usually a very good approximation. f[x 0, x 1 ] f ( x0 + x 1 2 )

13 > 4. Interpolation and Approximation > Divided differences Example Let f(x) = cos(x), x 0 = 0.2, x 1 = 0.3. Then f[x 0, x 1 ] = cos(0.3) cos(0.2) = (5.9) while ( ) f x0 + x 1 = sin(0.25) = so f[x 0, x 1 ] is a very good approximation of this derivative.

14 > 4. Interpolation and Approximation > Divided differences Higher-order divided differences are defined recursively Let x 0, x 1, x 2 R distinct. The second-order divided difference f[x 0, x 1, x 2 ] = f[x 1, x 2 ] f[x 0, x 1 ] x 2 x 0 (5.10) Let x 0, x 1, x 2, x 3 R distinct. The third-order divided difference f[x 0, x 1, x 2, x 3 ] = f[x 1, x 2, x 3 ] f[x 0, x 1, x 2 ] x 3 x 0 (5.11) In general, let x 0, x 1,..., x n R, n + 1 distinct numbers. The divided difference of order n f[x 0,..., x n ] = f[x 1,..., x n ] f[x 0,..., x n 1 ] x n x 0 (5.12) or the Newton divided difference.

15 > 4. Interpolation and Approximation > Divided differences Theorem Let n 1, f C n [α, β] and x 0, x 1,..., x n n + 1 distinct numbers in [α, β]. Then f[x 0, x 1,..., x n ] = 1 n! f (n) (c) (5.13) for some unknown point c between the maximum and the minimum of x 0,..., x n. Example Let f(x) = cos(x), x 0 = 0.2, x 1 = 0.3, x 2 = 0.4. The f[x 0, x 1 ] is given by (5.9), and f[x 1, x 2 ] = cos(0.4) cos(0.3) = hence from (5.11) f[x 0, x 1, x 2 ] = ( ) = (5.14) For n = 2, (5.13) becomes f[x 0, x 1, x 2 ] = 1 2 f (c) = 1 2 cos(c) 1 2 cos(0.3) = which is nearly equal to the result in (5.14).

16 > 4. Interpolation and Approximation > Properties of divided differences The divided differences (5.12) have special properties that help simplify work with them. (1) Let (i 0, i 1,..., i n ) be a permutation (rearrangement) of the integers (0, 1,..., n). It can be shown that f[x i0, x i1,..., x in ] = f[x 0, x 1,..., x n ] (5.15) The original definition (5.12) seems to imply that the order of x 0, x 1,..., x n is important, but (5.15) asserts that it is not true. For n = 1 f[x 0, x 1 ] = f(x 0) f(x 1 ) = f(x 1) f(x 0 ) = f[x 1, x 0 ] x 0 x 1 x 1 x 0 For n = 2 we can expand (5.11) to get f(x 0 ) f[x 0, x 1, x 2 ] = (x 0 x 1 )(x 0 x 2 ) + f(x 1 ) (x 1 x 0 )(x 1 x 2 ) + f(x 2 ) (x 2 x 0 )(x 2 x 1 ) (2) The definitions (5.8), (5.11) and (5.12) extend to the case where some or all of the x i coincide, provided that f(x) is sufficiently differentiable.

17 > 4. Interpolation and Approximation > Properties of divided differences For example, define f(x 0 ) f(x 1 ) f[x 0, x 0 ] = lim f[x 0, x 1 ] = lim x 1 x 0 x 1 x 0 x 1 x 0 f[x 0, x 0 ] = f (x 0 ) For an arbitrary n 1, let all x i x 0 ; this leads to the definition f[x 0,..., x 0 ] = 1 n! f (n) (x 0 ) (5.16) For the cases where only some of nodes coincide: using (5.15), (5.16) we can extend the definition of the divided difference. For example f[x 0, x 1, x 0 ] = f[x 0, x 0, x 1 ] = f[x 0, x 1 ] f[x 0, x 0 ] x 1 x 0 = f[x 0, x 1 ] f (x 0 ) x 1 x 0

18 > 4. Interpolation and Approximation > Properties of divided differences MATLAB program: evaluating divided differences Given a set of values f(x 0 ),..., f(x n ) we need to calculate the set of divided differences f[x 0, x 1 ], f[x 0, x 1, x 2 ],..., f[x 0, x 1,..., x n ] We can use the MATLAB function divdif using the function call divdif y = divdif(x nodes, y values) Note that MATLAB does not allow zero subscripts, hence x nodes and y values have to be redefined as vectors containing n + 1 components: x nodes = [x 0, x 1,..., x n ] x nodes(i) = x i 1, i = 1,..., n + 1 y values = [f(x 0 ), f(x 1 ),..., f(x n )] y values(i) = f(x i 1 ), i = 1,..., n + 1

19 > 4. Interpolation and Approximation > Properties of divided differences MATLAB program: evaluating divided differences function divdif y = divdif(x nodes,y values) % % This is a function % divdif y = divdif(x nodes,y values) % It calculates the divided differences of the function % values given in the vector y values, which are the values of % some function f(x) at the nodes given in x nodes. On exit, % divdif y(i) = f[x 1,...,x i], i=1,...,m % with m the length of x nodes. The input values x nodes and % y values are not changed by this program. % divdif y = y values; m = length(x nodes); for i=2:m for j=m:-1:i divdif y(j) = (divdif y(j)-divdif y(j-1))... /(x nodes(j)-x nodes(j-i+1)); end end

20 > 4. Interpolation and Approximation > Properties of divided differences This program is illustrated in this table. i x i cos(x i ) D i E E E E E E E-2 Table: Values and divided differences for cos(x)

21 > 4. Interpolation and Approximation > Newton s Divided Differences Newton interpolation formula Interpolation of f at x 0, x 1,..., x n Idea: use P n 1 (x) in the definition of P n (x): P n (x) = P n 1 (x) + C(x) } C(x) P n correction term = C(x i ) = 0 i = 0,..., n 1 = C(x) = a(x x 0 )(x x 1 )... (x x n 1 ) P n (x) = ax n +...

22 > 4. Interpolation and Approximation > Newton s Divided Differences Definition: The divided difference of f(x) at points x 0,..., x n is denoted by f[x 0, x 1,..., x n ] and is defined to be the coefficient of x n in P n (x; f). C(x) = f[x 0, x 1,..., x n ](x x 0 )... (x x n 1 ) p n (x; f) = p n 1 (x; f)+f[x 0, x 1,..., x n ](x x 0 )... (x x n 1 ) (5.17) p 1 (x; f) = f(x 0 ) + f[x 0, x 1 ](x x 0 ) (5.18) p 2 (x; f)=f(x 0 )+f[x 0, x 1 ](x x 0 )+f[x 0, x 1, x 2 ](x x 0 )(x x 1 ) (5.19). p n (x; f) = f(x 0 ) + f[x 0, x 1 ](x x 0 ) +... (5.20) +f[x 0,..., x n ](x x 0 )... (x x n 1 ) = Newton interpolation formula

23 > 4. Interpolation and Approximation > Newton s Divided Differences For (5.18), consider p 1 (x 0 ), p 1 (x 1 ). Easily, p 1 (x 0 ) = f(x 0 ), and [ ] f(x1 ) f(x 0 ) p 1 (x 1 )=f(x 0 )+(x 1 x 0 ) =f(x 0 )+[f(x 1 ) f(x 0 )]=f(x 1 ) x 1 x 0 So: deg(p 1 ) 1 and satisfies the interpolation conditions. Then the uniqueness of polynomial interpolation (5.18) is the linear interpolation polynomial to f(x) at x 0, x 1. For (5.19), note that p 2 (x) = p 1 (x) + (x x 0 )(x x 1 )f[x 0, x 1, x 2 ] It satisfies: deg(p 2 ) 2 and p 2 (x i ) = p 1 (x i ) + 0 = f(x i ), i = 0, 1 p 2 (x 2 ) = f(x 0 ) + (x 2 x 0 )f[x 0.x 1 ] + (x 2 x 0 )(x 2 x 1 )f[x 0, x 1, x 2 ] = f(x 0 ) + (x 2 x 0 )f[x 0.x 1 ] + (x 2 x 1 ){f[x 1, x 2 ] f[x 0, x 1 ]} = f(x 0 ) + (x 1 x 0 )f[x 0.x 1 ] + (x 2 x 1 )f[x 1, x 2 ] = f(x 0 ) + {f(x 1 ) f(x 0 )} + {f(x 2 ) f(x 1 )} = f(x 2 ) By the uniqueness of polynomial interpolation, this is the quadratic interpolating polynomial to f(x) at {x 0, x 1, x 2 }.

24 > 4. Interpolation and Approximation > Newton s Divided Differences Example Find p(x) P 2 such that p( 1) = 0, p(0) = 1, p(1) = 4. p(x) = p(x 0 ) + p[x 0, x 1 ](x x 0 ) + p[x 0, x 1, x 2 ](x x 0 )(x x 1 ) x i p(x i ) p[x i, x i+1 ] p[x i, x i+1, x i+1 ] p(x) = 0 + 1(x + 1) + 1(x + 1)(x 0) = x 2 + 2x + 1

25 > 4. Interpolation and Approximation > Newton s Divided Differences Example Let f(x) = cos(x). The previous table contains a set of nodes x i, the values f(x i ) and the divided differences computed with divdif D i = f[x 0,..., x i ] i 0 p n (0.1) p n (0.3) p n (0.5) True Table: Interpolation to cos(x) using (5.20) This table contains the values of p n (x) for various values of n, computed with interp, and the true values of f(x).

26 > 4. Interpolation and Approximation > Newton s Divided Differences In general, the interpolation node points x i need not to be evenly spaced, nor be arranged in any particular order to use the divided difference interpolation formula (5.20) To evaluate (5.20) efficiently we can use a nested multiplication algorithm P n (x) = D 0 + (x x 0 )D 1 + (x x 0 )(x x 1 )D (x x 0 ) (x x n 1 )D n with D 0 = f(x 0 ), D i = f[x 0,..., x i ] for i 1 P n (x) = D 0 + (x x 0 )[D 1 + (x x 1 )[D 2 + (5.21) + (x x n 2 )[D n 1 + (x x n 1 )D n ] ]] For example P 3 (x) = D 0 + (x x 0 )D 1 + (x x 1 )[D 2 + (x x 2 )D 3 ] (5.21) uses only n multiplications to evaluate P n (x) and is more convenient for a fixed degree n. To compute a sequence of interpolation polynomials of increasing degree is more efficient to se the original form (5.20).

27 > 4. Interpolation and Approximation > Newton s Divided Differences MATLAB: evaluating Newton divided difference for polynomial interpolation function p eval = interp(x nodes,divdif y,x eval) % % This is a function % p eval = interp(x nodes,divdif y,x eval) % It calculates the Newton divided difference form of % the interpolation polynomial of degree m-1, where the % nodes are given in x nodes, m is the length of x nodes, % and the divided differences are given in divdif y. The % points at which the interpolation is to be carried out % are given in x eval; and on exit, p eval contains the % corresponding values of the interpolation polynomial. % m = length(x nodes); p eval = divdif y(m)*ones(size(x eval)); for i=m-1:-1:1 p eval = divdif y(i) + (x eval - x nodes(i)).*p eval; end

28 > 4. Interpolation and Approximation > 4.2 Error in polynomial interpolation Formula for error E(t) = f(t) p n (t; f) n P n (x) = f(x j )L j (x) j=0 Theorem Let n 0, f C n+1 [a, b], x 0, x 1,..., x n distinct points in [a, b]. Then f(x) P n (x) = (x x 0 )... (x x n )f[x 0, x 1,..., x n, x] (5.22) = (x x 0)(x x 1 ) (x x n ) f (n+1) (c x ) (5.23) (n + 1)! for x [a, b], c x unknown between the minimum and maximum of x 0, x 1,..., x n.

29 > 4. Interpolation and Approximation > 4.2 Error in polynomial interpolation Proof of Theorem Fix t R. Consider p n+1 (x; f) interpolates f at x 0,..., x n, t p n (x; f) interpolates f at x 0,..., x n From Newton p n+1 (x; f) = p n (x; f) + f[x 0,..., x n, t](x x 0 )... (x x n ) Let x = t. f(t) := p n+1 (t, f) = p n (t; f) + f[x 0,..., x n, t](t x 0 )... (t x) E(t) := f[x 0, x 1,..., x n, t](t x 0 )... (t x n )

30 > 4. Interpolation and Approximation > 4.2 Error in polynomial interpolation Examples f(x) = x n, f[x 0,..., x n ] = n! n! = 1 or p n (x; f) = 1 x n f[x 0,..., x n ] = 1 f(x) P n 1, f[x 0, x 1,..., x n ] = 0 f(x) = x n+1, f[x 0,..., x n ] = x 0 + x x n R(x) = x n+1 p n (x; f) P n+1 R(x i ) = 0, i = 0,..., n R(x i ) = (x x 0 )... (x x n ) = x n+1 (x x n )x n +... }{{} P n = f[x 0,..., x n ] = x 0 + x x n. If f P m, f[x 0,..., x m, x] = { polynomial degree m n 1 if n m 1 0 if n > m 1

31 > 4. Interpolation and Approximation > 4.2 Error in polynomial interpolation Example Take f(x) = e x, x [0, 1] and consider the error in linear interpolation to f(x) using x 0, x 1 satisfying 0 x 0 x 1 1. From (5.23) e x P 1 (x) = (x x 0)(x x 1 ) e cx 2 for some c x between the max and min of x 0, x 1 and x. Assuming x 0 < x < x 1, the error is negative and approximately a quadratic polynomial e x P 1 (x) = (x 1 x)(x x 0 ) e cx 2 Since x 0 c x x 1 (x 1 x)(x x 0 ) 2 e x 0 e x P 1 (x) = (x 1 x)(x x 0 ) e x 1 2

32 > 4. Interpolation and Approximation > 4.2 Error in polynomial interpolation For a bound independent of x and e x 1 e on [0, 1] (x 1 x)(x x 0 ) max = h2 x 0 x x 1 2 8, h = x 1 x 0 e x P 1 (x) h2 8 e, 0 x 0 x x 1 1 independent of x, x 0, x 1. Recall that we estimated e = by e 0.82 and e 0.83, i.e., h = e x P 1 (x) h2 8 e = ex P 1 (x) = , 8 The actual error being , it satisfies this bound.

33 > 4. Interpolation and Approximation > 4.2 Error in polynomial interpolation

34 > 4. Interpolation and Approximation > 4.2 Error in polynomial interpolation Example Again let f(x) = e x on [0, 1], but consider the quadratic interpolation. e x P 2 (x) = (x x 0)(x x 1 )(x x 2 ) e cx 6 for some c x between the min and max of x 0, x 1, x 2 and x. Assuming evenly spaced points, h = x 1 x 0 = x 2 x 1, and 0 x 0 < x < x 2 1, we have as before e x P 2 (x) (x x 0 )(x x 1 )(x x 2 ) 6 e1 while (x x 0 )(x x 1 )(x x 2 ) max = h3 x 0 x x (5.24) hence e x P 2 (x) h3 e h3

35 > 4. Interpolation and Approximation > 4.2 Error in polynomial interpolation For h = 0.01, 0 x 1 e x P 2 (x)

36 > 4. Interpolation and Approximation > 4.2 Error in polynomial interpolation Let w 2 (x) = (x + h)x(x h) 6 = x3 xh 6 a translation along x-axis of polynomial in (5.24). Then x = ± h 3 satisfies 0 = w 2(x) = 3x2 h 2 6 and gives w 2 (± 3 h ) = h3 9 3 Figure: y = w 2 (x)

37 > 4. Interpolation and Approximation > Behaviour of the error When we consider the error formula (5.23) or (5.22), the polynomial ψ n (x) = (x x 0 ) (x x n ) is crucial in determining the behaviour of the error. Let assume that x 0,..., x n are evenly spaced and x 0 x x n. Figure: y = Ψ 6 (x)

38 > 4. Interpolation and Approximation > Behaviour of the error Remark that the interpolation error is relatively larger in [x 0, x 1 ] and [x 5, x 6 ], and is likely to be smaller near the middle of the node points In practical interpolation problems, high-degree polynomial interpolation with evenly spaced nodes is seldom used. But when the set of nodes is suitable chosed, high-degree polynomials can be very useful in obtaining polynomial approximations to functions. Example Let f(x) = cos(x), h = 0.2, n = 8 and then interpolate at x = 0.9. Case (i) x 0 = 0.8, x 8 = 2.4 x = 0.9 [x 0, x 1 ]. By direct calculation of P 8 (0.9), cos(0.9) P 8 (0.9) = Case (ii) x 0 = 0.2, x 8 = 1.8 x = 0.9 [x 3, x 4 ], where x 4 is the midpoint. cos(0.9) P 8 (0.9) = , a factor of 24 smaller than the first case.

39 > 4. Interpolation and Approximation > Behaviour of the error Example Le f(x) = 1 1+x 2, x [ 5, 5], n > 0 an even integer, h = 10 n x j = 5 + jh, j = 0, 1, 2,..., n It can be shown that for many points x in [ 5, 5], the sequence of {P n (x)} does not converge to f(x) as n. Figure: The interpolation to 1 1+x 2

40 > 4. Interpolation and Approximation > 4.3 Interpolation using spline functions x y The simplest method of interpolating data in a table: connecting the node points by straight lines: the curve y = l(x) is not very smooth. Figure: y = l(x): piecewise linear interpolation We want to construct a smooth curve that interpolates the given data point that follows the shape of y = l(x).

41 > 4. Interpolation and Approximation > 4.3 Interpolation using spline functions Next choice: use polynomial interpolation. With seven data point, we consider the interpolating polynomial P 6 (x) of degree 6. Figure: y = P 6 (x): polynomial interpolation Smooth, but quite different from y = l(x)!!!

42 > 4. Interpolation and Approximation > 4.3 Interpolation using spline functions A third choice: connect the data in the table using a succession of quadratic interpolating polynomials: on each [0, 2], [2, 3], [3, 4]. Figure: y = q(x): piecewise quadratic interpolation Is smoother than y = l(x), follows it more closely than y = P 6 (x), but at x = 2 and x = 3 the graph has corners, i.e., q (x) is discontinuous.

43 > 4. Interpolation and Approximation > Spline interpolation Cubic spline interpolation Suppose n data points (x i, y i ), i = 1,..., n are given and a = x 1 <... < x n = b We seek a function S(x) defined on [a, b] that interpolates the data S(x i ) = y i, i = 1,..., n Find S(x) C 2 [a, b], a natural cubic spline such that S(x)is a polynomial of degree 3on each subinterval [x j 1, x j ], j = 2, 3,...,n; S(x i ) = y i, i = 1,..., n, S (a) = S (b). On [x i 1, x i ]: 4 degrees of freedom (cubic spline) 4(n 1) DOF.

44 > 4. Interpolation and Approximation > Spline interpolation S(x i ) = y i : n constraints S (x i 0) = S (x i + 0) continuity 2 = 1,..., n 1 S (x i 0) = S (x i + 0) i = 2,..., n 1 S(x i 0) = S(x i + 0) i = 2,..., n 1 n + (3n 6) = 4n 6 constraints 3n 6 Two more constraints needed to be added, Boundary Conditions: S = 0 at a = x 1, x n = b, for a natural cubic spline. (Linear system, with symmetric, positive definite, diagonally dominant matrix.)

45 > 4. Interpolation and Approximation > Construction of the cubic spline Introduce the variables M 1,..., M n with M i S (x i ), i = 1, 2,..., n Since S(x) is cubic on each [x j 1, x j ] S (x) is linear, hence determined by its values at two points: S (x j 1 ) = M j 1, S (x j ) = M j S (x) = (x j x)m j 1 + (x x j 1 )M j x j x j 1, x j 1 x x j (5.25) Form the second antiderivative of S (x) on [x j 1, x j ] and apply the interpolating conditions we get S(x j 1 ) = y j 1, S(x j ) = y j S(x) = (x j x) 3 M j 1 + (x x j 1 ) 3 M j 6(x j x j 1 ) + (x j x)y j 1 + (x x j 1 )y j 6(x j x j 1 ) 1 6 (x j x j 1 ) [(x j x)m j 1 + (x x j 1 )M j ] (5.26) for x [x j 1, x j ], j = 1,..., n.

46 > 4. Interpolation and Approximation > Construction of the cubic spline Formula (5.26) implies that S(x) is continuous over all [a, b] and satisfies the interpolating conditions S(x i ) = y i. Similarly, formula (5.25) for S (x) implies that is continuous on [a, b]. To ensure the continuity of S (x) over [a, b]: we require S (x) on [x j 1, x j ] and [x j, x j+1 ] have to give the same value at their common pointx j, j = 2, 3,..., n 1, leading to the tridiagonal linear system x j x j 1 6 M j 1 + x j+1 x j 1 3 M j + x j+1 x j M j+1 (5.27) 6 = y j+1 y j x j+1 x j y j y j 1 x j x j 1, j = 2, 3,..., n 1 These n 2 equations together with the assumption S (a) = S (b) = 0: M 1 = M n = 0 (5.28) leads to the values M 1,..., M n, hence the function S(x).

47 > 4. Interpolation and Approximation > Construction of the cubic spline Example Calculate the natural cubic spline interpolating the data {(1, 1), (2, 12 ), (3, 13 ), (4, 14 ) } n = 4, and all x j 1 x j = 1. The system (5.27) becomes and with (5.28) this yields which by (5.26) gives S(x) = Are S (x) and S (x) continuous? 1 6 M M M 3 = M M M 4 = 1 12 M 2 = 1 2, M 3 = x3 1 4 x2 1 3 x + 3 2, 1 x x x2 7 3 x , 2 x x , 3 x 4

48 > 4. Interpolation and Approximation > Construction of the cubic spline Example Calculate the natural cubic spline interpolating the data x y n = 7, system (5.27) has 5 equations Figure: Natural cubic spline interpolation y = S(x) Compared to the graph of linear and quadratic interpolation y = l(x) and y = q(x), the cubic spline S(x) no longer contains corners.

49 > 4. Interpolation and Approximation > Other interpolation spline functions So far we only interpolated data points, wanting a smooth curve. When we seek a spline to interpolate a known function, we are interested also in the accuracy. Let f(x) be given on [a, b], that we want to interpolate on evenly spaced values of x. For n > 1, let h = b a n 1, x j = a + (j 1)h, j = 1, 2,..., n and S n (x) be the natural cubic spline interpolating f(x) at x 1,..., x n. It can be shown that max f(x) S n(x) ch 2 (5.29) a x b where c depends on f (a), f (b) and max a x b f (4) (x). The reason why S n (x) doesn t converge more rapidly (have an error bound with a higher power of h) is that f (a) 0 f (b), while by definition S n(a) = S n(b) = 0. For functions f(x) with f (a) = f (b) = 0, the RHS of (5.29) can be replaced with ch 4.

50 > 4. Interpolation and Approximation > Other interpolation spline functions To improve on S n (x), we look for other interpolating functions S(x) that interpolate f(x) on a = x 1 < x 2 <... < x n = b Recall the definition of natural cubic spline: 1 S(x) cubic on each subinterval [x j 1, x j ]; 2 S(x), S (x) and S (x) are continuous on [a, b]; 3 S (x 1 ) = S (x n ) = 0. We say that S(x) is a cubic spline on [a, b] if 1 S(x) cubic on each subinterval [x j 1, x j ]; 2 S(x), S (x) and S (x) are continuous on [a, b]; With the interpolating conditions S(x i ) = y i, i = 1,..., n the representation formula (5.26) and the tridiagonal system (5.27) are still valid.

51 > 4. Interpolation and Approximation > Other interpolation spline functions This system has n 2 equations and n unknowns: M 1,..., M n. By replacing the end conditions (5.28) S (x 1 ) = S (x n ) = 0, we can obtain other interpolating cubic splines. If the data (x i, y i ) is obtained by evaluating a function f(x) y i = f(x i ), i = 1,..., n then we choose endpoints (boundary conditions) for S(x) that would yield a better approximation to f(x). We require S (x 1 ) = f (x 1 ), S (x n ) = f (x n ) or S (x 1 ) = f (x 1 ), S (x n ) = f (x n ) When combined with( ), either of these conditions leads to a unique interpolating spline S(x), dependent on which of these conditions is used. In both cases, the RHS of (5.29) can be replaced by ch 4, where c depends on max x [a,b] f (4) (x).

52 > 4. Interpolation and Approximation > Other interpolation spline functions If the derivatives of f(x) are not known, then extra interpolating conditions can be used to ensure that the error bond of (5.29) is proportional to h 4. In particular, suppose that x 1 < z 1 < x 2, x n 1 < z 2 < x n and f(z 1 ), f(z 2 ) are known. Then use the formula for S(x) in (5.26) and s(z 1 ) = f(z 1 ), s(z 2 ) = f(z 2 ) (5.30) This adds two new equations to the system (5.27), one for M 1 and M 2, and another equation for M n 1, M n. This form is preferable to the interpolating natural cubic spline, and is almost equally easy to produce. This is the default form of spline interpolation that is implemented in MATLAB. The form of spline formed in this way is said to satisfy the not-a-knot interpolation boundary conditions.

53 > 4. Interpolation and Approximation > Other interpolation spline functions Interpolating cubic spline functions are a popular way to represent data analytically because 1 are relatively smooth: C 2, 2 do not have the rapid oscillation that sometime occurs with the high-degree polynomial interpolation, 3 are relatively easy to work with on a computer. They do not replace polynomials, but are a very useful extension of them.

54 > 4. Interpolation and Approximation > The MATLAB program spline The standard package MATLAB contains the function rm spline. The standard calling sequence is y = spline(x nodes, y nodes, x) which produces the cubic spline function S(x) whose graph passes through the points {(ξ i, η i ) : i = 1,..., n} with (ξ i, η i ) = (x nodes(i), y nodes (i)) and n the length of x nodes (and y nodes). The not-a-knot interpolation conditions of (5.30) are used. The point (ξ 2, η 2 ) is the point (z 1, f(z 1 )) of (5.30) and (ξ n 1, η n 1 ) is the point (z 2, f(z 2 )).

55 > 4. Interpolation and Approximation > The MATLAB program spline Example Approximate the function f(x) = e x on the interval [a, b] = [0, 1]. For n > 0, define h = 1/n and interpolating nodes x 1 = 0, x 2 = h, x 3 = 2h,..., x n+1 = nh = 1 Using spline, we produce the cubic interpolating spline interpolant S n,1 to f(x). With the not-a-knot interpolation conditions, the nodes x 2 and x n are the points z 1 and z 2 in (5.30). For a general smooth function f(x), it turns out that te magnitude of the error f(x) S n,1 (x) is largest around the endpoints of the interval of approximation.

56 > 4. Interpolation and Approximation > The MATLAB program spline Example Two interpolating nodes are inserted, the midpoints of the subintervals [0, h] and [1 h, 1]: x 1 =0, x 2 = 1 2 h, x 3 =h, x 4 =2h,..., x n+1 =(n 1)h, x n+2 =1 1 2 h, x n+3 =1 Using spline results in a cubic spline function S n,2 (x); with the not-a-knot interpolation conditions conditions, the nodes x 2 and x n+2 are the points z 1 and z 2 of (5.30). Generally, S n,2 is a more accurate approximation than is S n,1 (x). The cubic polynomials produced for S n,2 (x) by spline for the intervals [x 1, x 2 ] and [x 2, x 3 ] are the same, thus we can use the polynomial for [0, 1 2 h] for the entire interval [0, h]. Similarly for [1 h, h]. n E n (1) Ratio E n (2) Ratio E E E E E E E E Table: Cubic spline approximation to f(x) = e x

INTERPOLATION. Interpolation is a process of finding a formula (often a polynomial) whose graph will pass through a given set of points (x, y).

INTERPOLATION. Interpolation is a process of finding a formula (often a polynomial) whose graph will pass through a given set of points (x, y). 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

4.3 Lagrange Approximation

4.3 Lagrange Approximation 206 CHAP. 4 INTERPOLATION AND POLYNOMIAL APPROXIMATION Lagrange Polynomial Approximation 4.3 Lagrange Approximation Interpolation means to estimate a missing function value by taking a weighted average

More information

Piecewise Cubic Splines

Piecewise Cubic Splines 280 CHAP. 5 CURVE FITTING Piecewise Cubic Splines The fitting of a polynomial curve to a set of data points has applications in CAD (computer-assisted design), CAM (computer-assisted manufacturing), and

More information

November 16, 2015. Interpolation, Extrapolation & Polynomial Approximation

November 16, 2015. Interpolation, Extrapolation & Polynomial Approximation Interpolation, Extrapolation & Polynomial Approximation November 16, 2015 Introduction In many cases we know the values of a function f (x) at a set of points x 1, x 2,..., x N, but we don t have the analytic

More information

1 if 1 x 0 1 if 0 x 1

1 if 1 x 0 1 if 0 x 1 Chapter 3 Continuity In this chapter we begin by defining the fundamental notion of continuity for real valued functions of a single real variable. When trying to decide whether a given function is or

More information

4.5 Chebyshev Polynomials

4.5 Chebyshev Polynomials 230 CHAP. 4 INTERPOLATION AND POLYNOMIAL APPROXIMATION 4.5 Chebyshev Polynomials We now turn our attention to polynomial interpolation for f (x) over [ 1, 1] based on the nodes 1 x 0 < x 1 < < x N 1. Both

More information

1 Review of Newton Polynomials

1 Review of Newton Polynomials cs: introduction to numerical analysis 0/0/0 Lecture 8: Polynomial Interpolation: Using Newton Polynomials and Error Analysis Instructor: Professor Amos Ron Scribes: Giordano Fusco, Mark Cowlishaw, Nathanael

More information

EECS 556 Image Processing W 09. Interpolation. Interpolation techniques B splines

EECS 556 Image Processing W 09. Interpolation. Interpolation techniques B splines EECS 556 Image Processing W 09 Interpolation Interpolation techniques B splines What is image processing? Image processing is the application of 2D signal processing methods to images Image representation

More information

5 Numerical Differentiation

5 Numerical Differentiation D. Levy 5 Numerical Differentiation 5. Basic Concepts This chapter deals with numerical approximations of derivatives. The first questions that comes up to mind is: why do we need to approximate derivatives

More information

1 Review of Least Squares Solutions to Overdetermined Systems

1 Review of Least Squares Solutions to Overdetermined Systems cs4: introduction to numerical analysis /9/0 Lecture 7: Rectangular Systems and Numerical Integration Instructor: Professor Amos Ron Scribes: Mark Cowlishaw, Nathanael Fillmore Review of Least Squares

More information

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include 2 + 5.

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include 2 + 5. PUTNAM TRAINING POLYNOMIALS (Last updated: November 17, 2015) Remark. This is a list of exercises on polynomials. Miguel A. Lerma Exercises 1. Find a polynomial with integral coefficients whose zeros include

More information

Quotient Rings and Field Extensions

Quotient Rings and Field Extensions Chapter 5 Quotient Rings and Field Extensions In this chapter we describe a method for producing field extension of a given field. If F is a field, then a field extension is a field K that contains F.

More information

Høgskolen i Narvik Sivilingeniørutdanningen STE6237 ELEMENTMETODER. Oppgaver

Høgskolen i Narvik Sivilingeniørutdanningen STE6237 ELEMENTMETODER. Oppgaver Høgskolen i Narvik Sivilingeniørutdanningen STE637 ELEMENTMETODER Oppgaver Klasse: 4.ID, 4.IT Ekstern Professor: Gregory A. Chechkin e-mail: chechkin@mech.math.msu.su Narvik 6 PART I Task. Consider two-point

More information

Natural cubic splines

Natural cubic splines Natural cubic splines Arne Morten Kvarving Department of Mathematical Sciences Norwegian University of Science and Technology October 21 2008 Motivation We are given a large dataset, i.e. a function sampled

More information

Rolle s Theorem. q( x) = 1

Rolle s Theorem. q( x) = 1 Lecture 1 :The Mean Value Theorem We know that constant functions have derivative zero. Is it possible for a more complicated function to have derivative zero? In this section we will answer this question

More information

SOLVING POLYNOMIAL EQUATIONS

SOLVING POLYNOMIAL EQUATIONS C SOLVING POLYNOMIAL EQUATIONS We will assume in this appendix that you know how to divide polynomials using long division and synthetic division. If you need to review those techniques, refer to an algebra

More information

Section 3.2 Polynomial Functions and Their Graphs

Section 3.2 Polynomial Functions and Their Graphs Section 3.2 Polynomial Functions and Their Graphs EXAMPLES: P(x) = 3, Q(x) = 4x 7, R(x) = x 2 +x, S(x) = 2x 3 6x 2 10 QUESTION: Which of the following are polynomial functions? (a) f(x) = x 3 +2x+4 (b)

More information

TOPIC 4: DERIVATIVES

TOPIC 4: DERIVATIVES TOPIC 4: DERIVATIVES 1. The derivative of a function. Differentiation rules 1.1. The slope of a curve. The slope of a curve at a point P is a measure of the steepness of the curve. If Q is a point on the

More information

The Method of Partial Fractions Math 121 Calculus II Spring 2015

The Method of Partial Fractions Math 121 Calculus II Spring 2015 Rational functions. as The Method of Partial Fractions Math 11 Calculus II Spring 015 Recall that a rational function is a quotient of two polynomials such f(x) g(x) = 3x5 + x 3 + 16x x 60. The method

More information

MA107 Precalculus Algebra Exam 2 Review Solutions

MA107 Precalculus Algebra Exam 2 Review Solutions MA107 Precalculus Algebra Exam 2 Review Solutions February 24, 2008 1. The following demand equation models the number of units sold, x, of a product as a function of price, p. x = 4p + 200 a. Please write

More information

Application. Outline. 3-1 Polynomial Functions 3-2 Finding Rational Zeros of. Polynomial. 3-3 Approximating Real Zeros of.

Application. Outline. 3-1 Polynomial Functions 3-2 Finding Rational Zeros of. Polynomial. 3-3 Approximating Real Zeros of. Polynomial and Rational Functions Outline 3-1 Polynomial Functions 3-2 Finding Rational Zeros of Polynomials 3-3 Approximating Real Zeros of Polynomials 3-4 Rational Functions Chapter 3 Group Activity:

More information

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model CHAPTER 4 CURVES 4.1 Introduction In order to understand the significance of curves, we should look into the types of model representations that are used in geometric modeling. Curves play a very significant

More information

7.6 Approximation Errors and Simpson's Rule

7.6 Approximation Errors and Simpson's Rule WileyPLUS: Home Help Contact us Logout Hughes-Hallett, Calculus: Single and Multivariable, 4/e Calculus I, II, and Vector Calculus Reading content Integration 7.1. Integration by Substitution 7.2. Integration

More information

JUST THE MATHS UNIT NUMBER 1.8. ALGEBRA 8 (Polynomials) A.J.Hobson

JUST THE MATHS UNIT NUMBER 1.8. ALGEBRA 8 (Polynomials) A.J.Hobson JUST THE MATHS UNIT NUMBER 1.8 ALGEBRA 8 (Polynomials) by A.J.Hobson 1.8.1 The factor theorem 1.8.2 Application to quadratic and cubic expressions 1.8.3 Cubic equations 1.8.4 Long division of polynomials

More information

8 Divisibility and prime numbers

8 Divisibility and prime numbers 8 Divisibility and prime numbers 8.1 Divisibility In this short section we extend the concept of a multiple from the natural numbers to the integers. We also summarize several other terms that express

More information

Inner Product Spaces

Inner Product Spaces Math 571 Inner Product Spaces 1. Preliminaries An inner product space is a vector space V along with a function, called an inner product which associates each pair of vectors u, v with a scalar u, v, and

More information

Practice with Proofs

Practice with Proofs Practice with Proofs October 6, 2014 Recall the following Definition 0.1. A function f is increasing if for every x, y in the domain of f, x < y = f(x) < f(y) 1. Prove that h(x) = x 3 is increasing, using

More information

Taylor and Maclaurin Series

Taylor and Maclaurin Series Taylor and Maclaurin Series In the preceding section we were able to find power series representations for a certain restricted class of functions. Here we investigate more general problems: Which functions

More information

DIFFERENTIABILITY OF COMPLEX FUNCTIONS. Contents

DIFFERENTIABILITY OF COMPLEX FUNCTIONS. Contents DIFFERENTIABILITY OF COMPLEX FUNCTIONS Contents 1. Limit definition of a derivative 1 2. Holomorphic functions, the Cauchy-Riemann equations 3 3. Differentiability of real functions 5 4. A sufficient condition

More information

Differentiation and Integration

Differentiation and Integration This material is a supplement to Appendix G of Stewart. You should read the appendix, except the last section on complex exponentials, before this material. Differentiation and Integration Suppose we have

More information

6 EXTENDING ALGEBRA. 6.0 Introduction. 6.1 The cubic equation. Objectives

6 EXTENDING ALGEBRA. 6.0 Introduction. 6.1 The cubic equation. Objectives 6 EXTENDING ALGEBRA Chapter 6 Extending Algebra Objectives After studying this chapter you should understand techniques whereby equations of cubic degree and higher can be solved; be able to factorise

More information

CHAPTER 1 Splines and B-splines an Introduction

CHAPTER 1 Splines and B-splines an Introduction CHAPTER 1 Splines and B-splines an Introduction In this first chapter, we consider the following fundamental problem: Given a set of points in the plane, determine a smooth curve that approximates the

More information

Review of Fundamental Mathematics

Review of Fundamental Mathematics Review of Fundamental Mathematics As explained in the Preface and in Chapter 1 of your textbook, managerial economics applies microeconomic theory to business decision making. The decision-making tools

More information

MATH 304 Linear Algebra Lecture 20: Inner product spaces. Orthogonal sets.

MATH 304 Linear Algebra Lecture 20: Inner product spaces. Orthogonal sets. MATH 304 Linear Algebra Lecture 20: Inner product spaces. Orthogonal sets. Norm The notion of norm generalizes the notion of length of a vector in R n. Definition. Let V be a vector space. A function α

More information

The Steepest Descent Algorithm for Unconstrained Optimization and a Bisection Line-search Method

The Steepest Descent Algorithm for Unconstrained Optimization and a Bisection Line-search Method The Steepest Descent Algorithm for Unconstrained Optimization and a Bisection Line-search Method Robert M. Freund February, 004 004 Massachusetts Institute of Technology. 1 1 The Algorithm The problem

More information

DERIVATIVES AS MATRICES; CHAIN RULE

DERIVATIVES AS MATRICES; CHAIN RULE DERIVATIVES AS MATRICES; CHAIN RULE 1. Derivatives of Real-valued Functions Let s first consider functions f : R 2 R. Recall that if the partial derivatives of f exist at the point (x 0, y 0 ), then we

More information

Finite Elements for 2 D Problems

Finite Elements for 2 D Problems Finite Elements for 2 D Problems General Formula for the Stiffness Matrix Displacements (u, v) in a plane element are interpolated from nodal displacements (ui, vi) using shape functions Ni as follows,

More information

Numerical Methods for Solving Systems of Nonlinear Equations

Numerical Methods for Solving Systems of Nonlinear Equations Numerical Methods for Solving Systems of Nonlinear Equations by Courtney Remani A project submitted to the Department of Mathematical Sciences in conformity with the requirements for Math 4301 Honour s

More information

Homework # 3 Solutions

Homework # 3 Solutions Homework # 3 Solutions February, 200 Solution (2.3.5). Noting that and ( + 3 x) x 8 = + 3 x) by Equation (2.3.) x 8 x 8 = + 3 8 by Equations (2.3.7) and (2.3.0) =3 x 8 6x2 + x 3 ) = 2 + 6x 2 + x 3 x 8

More information

Integrals of Rational Functions

Integrals of Rational Functions Integrals of Rational Functions Scott R. Fulton Overview A rational function has the form where p and q are polynomials. For example, r(x) = p(x) q(x) f(x) = x2 3 x 4 + 3, g(t) = t6 + 4t 2 3, 7t 5 + 3t

More information

Microeconomic Theory: Basic Math Concepts

Microeconomic Theory: Basic Math Concepts Microeconomic Theory: Basic Math Concepts Matt Van Essen University of Alabama Van Essen (U of A) Basic Math Concepts 1 / 66 Basic Math Concepts In this lecture we will review some basic mathematical concepts

More information

Limits and Continuity

Limits and Continuity Math 20C Multivariable Calculus Lecture Limits and Continuity Slide Review of Limit. Side limits and squeeze theorem. Continuous functions of 2,3 variables. Review: Limits Slide 2 Definition Given a function

More information

Winter Camp 2011 Polynomials Alexander Remorov. Polynomials. Alexander Remorov alexanderrem@gmail.com

Winter Camp 2011 Polynomials Alexander Remorov. Polynomials. Alexander Remorov alexanderrem@gmail.com Polynomials Alexander Remorov alexanderrem@gmail.com Warm-up Problem 1: Let f(x) be a quadratic polynomial. Prove that there exist quadratic polynomials g(x) and h(x) such that f(x)f(x + 1) = g(h(x)).

More information

5.3 Improper Integrals Involving Rational and Exponential Functions

5.3 Improper Integrals Involving Rational and Exponential Functions Section 5.3 Improper Integrals Involving Rational and Exponential Functions 99.. 3. 4. dθ +a cos θ =, < a

More information

15. Symmetric polynomials

15. Symmetric polynomials 15. Symmetric polynomials 15.1 The theorem 15.2 First examples 15.3 A variant: discriminants 1. The theorem Let S n be the group of permutations of {1,, n}, also called the symmetric group on n things.

More information

Linear and quadratic Taylor polynomials for functions of several variables.

Linear and quadratic Taylor polynomials for functions of several variables. ams/econ 11b supplementary notes ucsc Linear quadratic Taylor polynomials for functions of several variables. c 010, Yonatan Katznelson Finding the extreme (minimum or maximum) values of a function, is

More information

3. Interpolation. Closing the Gaps of Discretization... Beyond Polynomials

3. Interpolation. Closing the Gaps of Discretization... Beyond Polynomials 3. Interpolation Closing the Gaps of Discretization... Beyond Polynomials Closing the Gaps of Discretization... Beyond Polynomials, December 19, 2012 1 3.3. Polynomial Splines Idea of Polynomial Splines

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS 1. SYSTEMS OF EQUATIONS AND MATRICES 1.1. Representation of a linear system. The general system of m equations in n unknowns can be written a 11 x 1 + a 12 x 2 +

More information

correct-choice plot f(x) and draw an approximate tangent line at x = a and use geometry to estimate its slope comment The choices were:

correct-choice plot f(x) and draw an approximate tangent line at x = a and use geometry to estimate its slope comment The choices were: Topic 1 2.1 mode MultipleSelection text How can we approximate the slope of the tangent line to f(x) at a point x = a? This is a Multiple selection question, so you need to check all of the answers that

More information

THE FUNDAMENTAL THEOREM OF ALGEBRA VIA PROPER MAPS

THE FUNDAMENTAL THEOREM OF ALGEBRA VIA PROPER MAPS THE FUNDAMENTAL THEOREM OF ALGEBRA VIA PROPER MAPS KEITH CONRAD 1. Introduction The Fundamental Theorem of Algebra says every nonconstant polynomial with complex coefficients can be factored into linear

More information

MA4001 Engineering Mathematics 1 Lecture 10 Limits and Continuity

MA4001 Engineering Mathematics 1 Lecture 10 Limits and Continuity MA4001 Engineering Mathematics 1 Lecture 10 Limits and Dr. Sarah Mitchell Autumn 2014 Infinite limits If f(x) grows arbitrarily large as x a we say that f(x) has an infinite limit. Example: f(x) = 1 x

More information

Roots of Polynomials

Roots of Polynomials Roots of Polynomials (Com S 477/577 Notes) Yan-Bin Jia Sep 24, 2015 A direct corollary of the fundamental theorem of algebra is that p(x) can be factorized over the complex domain into a product a n (x

More information

Understanding Basic Calculus

Understanding Basic Calculus Understanding Basic Calculus S.K. Chung Dedicated to all the people who have helped me in my life. i Preface This book is a revised and expanded version of the lecture notes for Basic Calculus and other

More information

Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

More information

4. Continuous Random Variables, the Pareto and Normal Distributions

4. Continuous Random Variables, the Pareto and Normal Distributions 4. Continuous Random Variables, the Pareto and Normal Distributions A continuous random variable X can take any value in a given range (e.g. height, weight, age). The distribution of a continuous random

More information

0.8 Rational Expressions and Equations

0.8 Rational Expressions and Equations 96 Prerequisites 0.8 Rational Expressions and Equations We now turn our attention to rational expressions - that is, algebraic fractions - and equations which contain them. The reader is encouraged to

More information

Real Roots of Univariate Polynomials with Real Coefficients

Real Roots of Univariate Polynomials with Real Coefficients Real Roots of Univariate Polynomials with Real Coefficients mostly written by Christina Hewitt March 22, 2012 1 Introduction Polynomial equations are used throughout mathematics. When solving polynomials

More information

An important theme in this book is to give constructive definitions of mathematical objects. Thus, for instance, if you needed to evaluate.

An important theme in this book is to give constructive definitions of mathematical objects. Thus, for instance, if you needed to evaluate. Chapter 10 Series and Approximations An important theme in this book is to give constructive definitions of mathematical objects. Thus, for instance, if you needed to evaluate 1 0 e x2 dx, you could set

More information

88 CHAPTER 2. VECTOR FUNCTIONS. . First, we need to compute T (s). a By definition, r (s) T (s) = 1 a sin s a. sin s a, cos s a

88 CHAPTER 2. VECTOR FUNCTIONS. . First, we need to compute T (s). a By definition, r (s) T (s) = 1 a sin s a. sin s a, cos s a 88 CHAPTER. VECTOR FUNCTIONS.4 Curvature.4.1 Definitions and Examples The notion of curvature measures how sharply a curve bends. We would expect the curvature to be 0 for a straight line, to be very small

More information

Computational Geometry Lab: FEM BASIS FUNCTIONS FOR A TETRAHEDRON

Computational Geometry Lab: FEM BASIS FUNCTIONS FOR A TETRAHEDRON Computational Geometry Lab: FEM BASIS FUNCTIONS FOR A TETRAHEDRON John Burkardt Information Technology Department Virginia Tech http://people.sc.fsu.edu/ jburkardt/presentations/cg lab fem basis tetrahedron.pdf

More information

Separable First Order Differential Equations

Separable First Order Differential Equations Separable First Order Differential Equations Form of Separable Equations which take the form = gx hy or These are differential equations = gxĥy, where gx is a continuous function of x and hy is a continuously

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS Systems of Equations and Matrices Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a

More information

8 Polynomials Worksheet

8 Polynomials Worksheet 8 Polynomials Worksheet Concepts: Quadratic Functions The Definition of a Quadratic Function Graphs of Quadratic Functions - Parabolas Vertex Absolute Maximum or Absolute Minimum Transforming the Graph

More information

A Brief Review of Elementary Ordinary Differential Equations

A Brief Review of Elementary Ordinary Differential Equations 1 A Brief Review of Elementary Ordinary Differential Equations At various points in the material we will be covering, we will need to recall and use material normally covered in an elementary course on

More information

UNCORRECTED PAGE PROOFS

UNCORRECTED PAGE PROOFS number and and algebra TopIC 17 Polynomials 17.1 Overview Why learn this? Just as number is learned in stages, so too are graphs. You have been building your knowledge of graphs and functions over time.

More information

Lecture 2. Marginal Functions, Average Functions, Elasticity, the Marginal Principle, and Constrained Optimization

Lecture 2. Marginal Functions, Average Functions, Elasticity, the Marginal Principle, and Constrained Optimization Lecture 2. Marginal Functions, Average Functions, Elasticity, the Marginal Principle, and Constrained Optimization 2.1. Introduction Suppose that an economic relationship can be described by a real-valued

More information

Zeros of a Polynomial Function

Zeros of a Polynomial Function Zeros of a Polynomial Function An important consequence of the Factor Theorem is that finding the zeros of a polynomial is really the same thing as factoring it into linear factors. In this section we

More information

Equations, Inequalities & Partial Fractions

Equations, Inequalities & Partial Fractions Contents Equations, Inequalities & Partial Fractions.1 Solving Linear Equations 2.2 Solving Quadratic Equations 1. Solving Polynomial Equations 1.4 Solving Simultaneous Linear Equations 42.5 Solving Inequalities

More information

Math 120 Final Exam Practice Problems, Form: A

Math 120 Final Exam Practice Problems, Form: A Math 120 Final Exam Practice Problems, Form: A Name: While every attempt was made to be complete in the types of problems given below, we make no guarantees about the completeness of the problems. Specifically,

More information

Representation of functions as power series

Representation of functions as power series Representation of functions as power series Dr. Philippe B. Laval Kennesaw State University November 9, 008 Abstract This document is a summary of the theory and techniques used to represent functions

More information

Section 3.7. Rolle s Theorem and the Mean Value Theorem. Difference Equations to Differential Equations

Section 3.7. Rolle s Theorem and the Mean Value Theorem. Difference Equations to Differential Equations Difference Equations to Differential Equations Section.7 Rolle s Theorem and the Mean Value Theorem The two theorems which are at the heart of this section draw connections between the instantaneous rate

More information

Notes on Determinant

Notes on Determinant ENGG2012B Advanced Engineering Mathematics Notes on Determinant Lecturer: Kenneth Shum Lecture 9-18/02/2013 The determinant of a system of linear equations determines whether the solution is unique, without

More information

Class Meeting # 1: Introduction to PDEs

Class Meeting # 1: Introduction to PDEs MATH 18.152 COURSE NOTES - CLASS MEETING # 1 18.152 Introduction to PDEs, Fall 2011 Professor: Jared Speck Class Meeting # 1: Introduction to PDEs 1. What is a PDE? We will be studying functions u = u(x

More information

1 Homework 1. [p 0 q i+j +... + p i 1 q j+1 ] + [p i q j ] + [p i+1 q j 1 +... + p i+j q 0 ]

1 Homework 1. [p 0 q i+j +... + p i 1 q j+1 ] + [p i q j ] + [p i+1 q j 1 +... + p i+j q 0 ] 1 Homework 1 (1) Prove the ideal (3,x) is a maximal ideal in Z[x]. SOLUTION: Suppose we expand this ideal by including another generator polynomial, P / (3, x). Write P = n + x Q with n an integer not

More information

EVALUATING A POLYNOMIAL

EVALUATING A POLYNOMIAL EVALUATING A POLYNOMIAL Consider having a polynomial p(x) =a 0 + a 1 x + a 2 x 2 + + a n x n which you need to evaluate for many values of x. How do you evaluate it? This may seem a strange question, but

More information

CHAPTER SIX IRREDUCIBILITY AND FACTORIZATION 1. BASIC DIVISIBILITY THEORY

CHAPTER SIX IRREDUCIBILITY AND FACTORIZATION 1. BASIC DIVISIBILITY THEORY January 10, 2010 CHAPTER SIX IRREDUCIBILITY AND FACTORIZATION 1. BASIC DIVISIBILITY THEORY The set of polynomials over a field F is a ring, whose structure shares with the ring of integers many characteristics.

More information

(Refer Slide Time: 1:42)

(Refer Slide Time: 1:42) Introduction to Computer Graphics Dr. Prem Kalra Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture - 10 Curves So today we are going to have a new topic. So far

More information

a 1 x + a 0 =0. (3) ax 2 + bx + c =0. (4)

a 1 x + a 0 =0. (3) ax 2 + bx + c =0. (4) ROOTS OF POLYNOMIAL EQUATIONS In this unit we discuss polynomial equations. A polynomial in x of degree n, where n 0 is an integer, is an expression of the form P n (x) =a n x n + a n 1 x n 1 + + a 1 x

More information

1 Error in Euler s Method

1 Error in Euler s Method 1 Error in Euler s Method Experience with Euler s 1 method raises some interesting questions about numerical approximations for the solutions of differential equations. 1. What determines the amount of

More information

Introduction to Algebraic Geometry. Bézout s Theorem and Inflection Points

Introduction to Algebraic Geometry. Bézout s Theorem and Inflection Points Introduction to Algebraic Geometry Bézout s Theorem and Inflection Points 1. The resultant. Let K be a field. Then the polynomial ring K[x] is a unique factorisation domain (UFD). Another example of a

More information

Zeros of Polynomial Functions

Zeros of Polynomial Functions Zeros of Polynomial Functions The Rational Zero Theorem If f (x) = a n x n + a n-1 x n-1 + + a 1 x + a 0 has integer coefficients and p/q (where p/q is reduced) is a rational zero, then p is a factor of

More information

Nonlinear Programming Methods.S2 Quadratic Programming

Nonlinear Programming Methods.S2 Quadratic Programming Nonlinear Programming Methods.S2 Quadratic Programming Operations Research Models and Methods Paul A. Jensen and Jonathan F. Bard A linearly constrained optimization problem with a quadratic objective

More information

G.A. Pavliotis. Department of Mathematics. Imperial College London

G.A. Pavliotis. Department of Mathematics. Imperial College London EE1 MATHEMATICS NUMERICAL METHODS G.A. Pavliotis Department of Mathematics Imperial College London 1. Numerical solution of nonlinear equations (iterative processes). 2. Numerical evaluation of integrals.

More information

How To Understand The Theory Of Algebraic Functions

How To Understand The Theory Of Algebraic Functions Homework 4 3.4,. Show that x x cos x x holds for x 0. Solution: Since cos x, multiply all three parts by x > 0, we get: x x cos x x, and since x 0 x x 0 ( x ) = 0, then by Sandwich theorem, we get: x 0

More information

Numerical Solution of Differential

Numerical Solution of Differential Chapter 13 Numerical Solution of Differential Equations We have considered numerical solution procedures for two kinds of equations: In chapter 10 the unknown was a real number; in chapter 6 the unknown

More information

Partial Fractions. (x 1)(x 2 + 1)

Partial Fractions. (x 1)(x 2 + 1) Partial Fractions Adding rational functions involves finding a common denominator, rewriting each fraction so that it has that denominator, then adding. For example, 3x x 1 3x(x 1) (x + 1)(x 1) + 1(x +

More information

The Method of Least Squares. Lectures INF2320 p. 1/80

The Method of Least Squares. Lectures INF2320 p. 1/80 The Method of Least Squares Lectures INF2320 p. 1/80 Lectures INF2320 p. 2/80 The method of least squares We study the following problem: Given n points (t i,y i ) for i = 1,...,n in the (t,y)-plane. How

More information

Efficient Curve Fitting Techniques

Efficient Curve Fitting Techniques 15/11/11 Life Conference and Exhibition 11 Stuart Carroll, Christopher Hursey Efficient Curve Fitting Techniques - November 1 The Actuarial Profession www.actuaries.org.uk Agenda Background Outline of

More information

Solving Quadratic Equations

Solving Quadratic Equations 9.3 Solving Quadratic Equations by Using the Quadratic Formula 9.3 OBJECTIVES 1. Solve a quadratic equation by using the quadratic formula 2. Determine the nature of the solutions of a quadratic equation

More information

Interpolation. Chapter 3. 3.1 The Interpolating Polynomial

Interpolation. Chapter 3. 3.1 The Interpolating Polynomial Chapter 3 Interpolation Interpolation is the process of defining a function that takes on specified values at specified points This chapter concentrates on two closely related interpolants: the piecewise

More information

PYTHAGOREAN TRIPLES KEITH CONRAD

PYTHAGOREAN TRIPLES KEITH CONRAD PYTHAGOREAN TRIPLES KEITH CONRAD 1. Introduction A Pythagorean triple is a triple of positive integers (a, b, c) where a + b = c. Examples include (3, 4, 5), (5, 1, 13), and (8, 15, 17). Below is an ancient

More information

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2. Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given

More information

Polynomial Invariants

Polynomial Invariants Polynomial Invariants Dylan Wilson October 9, 2014 (1) Today we will be interested in the following Question 1.1. What are all the possible polynomials in two variables f(x, y) such that f(x, y) = f(y,

More information

Partial Fractions Examples

Partial Fractions Examples Partial Fractions Examples Partial fractions is the name given to a technique of integration that may be used to integrate any ratio of polynomials. A ratio of polynomials is called a rational function.

More information

1 Cubic Hermite Spline Interpolation

1 Cubic Hermite Spline Interpolation cs412: introduction to numerical analysis 10/26/10 Lecture 13: Cubic Hermite Spline Interpolation II Instructor: Professor Amos Ron Scribes: Yunpeng Li, Mark Cowlishaw, Nathanael Fillmore 1 Cubic Hermite

More information

This unit will lay the groundwork for later units where the students will extend this knowledge to quadratic and exponential functions.

This unit will lay the groundwork for later units where the students will extend this knowledge to quadratic and exponential functions. Algebra I Overview View unit yearlong overview here Many of the concepts presented in Algebra I are progressions of concepts that were introduced in grades 6 through 8. The content presented in this course

More information

1. First-order Ordinary Differential Equations

1. First-order Ordinary Differential Equations Advanced Engineering Mathematics 1. First-order ODEs 1 1. First-order Ordinary Differential Equations 1.1 Basic concept and ideas 1.2 Geometrical meaning of direction fields 1.3 Separable differential

More information

Constrained optimization.

Constrained optimization. ams/econ 11b supplementary notes ucsc Constrained optimization. c 2010, Yonatan Katznelson 1. Constraints In many of the optimization problems that arise in economics, there are restrictions on the values

More information

by the matrix A results in a vector which is a reflection of the given

by the matrix A results in a vector which is a reflection of the given Eigenvalues & Eigenvectors Example Suppose Then So, geometrically, multiplying a vector in by the matrix A results in a vector which is a reflection of the given vector about the y-axis We observe that

More information

1 Lecture: Integration of rational functions by decomposition

1 Lecture: Integration of rational functions by decomposition Lecture: Integration of rational functions by decomposition into partial fractions Recognize and integrate basic rational functions, except when the denominator is a power of an irreducible quadratic.

More information