Q 0 x if x 0 x x 1. S 1 x if x 1 x x 2. i 0,1,...,n 1, and L x L n 1 x if x n 1 x x n

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

Math Numerical Analysis Mid-Term Test Solutions

Lesson 9 Exploring Graphs of Quadratic Functions

Cubic Splines; Bézier Curves

(a) Write down the value of q and of r. (2) Write down the equation of the axis of symmetry. (1) (c) Find the value of p. (3) (Total 6 marks)

The coordinates of the vertex of the corresponding parabola are p, q. If a > 0, the parabola opens upward. If a < 0, the parabola opens downward.

Section 0.2 & 0.3 Worksheet. Types of Functions

Curve Fitting and Interpolation

1) The line has a slope of ) The line passes through (2, 11) and. 6) r(x) = x + 4. From memory match each equation with its graph.

Chapter 8 ~ Quadratic Functions and Equations In this chapter you will study... You can use these skills...

Interpolation Theory

1 Piecewise Cubic Interpolation

Pre-Calculus Midterm Practice Test (Units 1 through 3)

Exam 2. Average: 85.6 Median: 87.0 Maximum: Minimum: 55.0 Standard Deviation: Numerical Methods Fall 2011 Lecture 20

MA2501 Numerical Methods Spring 2015

MAT116 Final Review Session Chapter 3: Polynomial and Rational Functions

, a 1. , a 2. ,..., a n

Evaluate and Graph Polynomial Functions

( ) f ( x 1 ) . x 2. To find the average rate of change, use the slope formula, m = f x 2

Chapter 4: Interpolation and Approximation. October 28, 2005

King Fahd University of Petroleum and Minerals Prep-Year Math Program Math Term 161 Recitation (R1, R2)

SPLINE INTERPOLATION

A VERTICAL LOOK AT KEY CONCEPTS AND PROCEDURES ALGEBRA I

Chapter 2 Polynomial and Rational Functions

1. Use the properties of exponents to simplify the following expression, writing your answer with only positive exponents.

Chapter 2: Polynomial and Rational Functions

Downloaded from

Function Junction: Homework Examples from ACE

Some notes on Chapter 8: Polynomial and Piecewise-polynomial Interpolation

Curve Fitting. Objectives

3.1 Interpolation and the Lagrange Polynomial

Scientific Computing

Final Exam A Name. 20 i C) Solve the equation by factoring. 4) x2 = x + 30 A) {-5, 6} B) {5, 6} C) {1, 30} D) {-5, -6} -9 ± i 3 14

Sections 7.1, 7.2: Sums, differences, products of polynomials CHAPTER 7: POLYNOMIALS

Data Analysis-I. Interpolation. Soon-Hyung Yook. December 4, Soon-Hyung Yook Data Analysis-I December 4, / 1

Department of Mathematics, University of Wisconsin-Madison Math 114 Worksheet Sections 3.1, 3.3, and 3.5

Mock Final Exam Name. Solve and check the linear equation. 1) (-8x + 8) + 1 = -7(x + 3) A) {- 30} B) {- 6} C) {30} D) {- 28}

Question 1. Find the coordinates of the y-intercept for. f) None of the above. Question 2. Find the slope of the line:

MA.8.1 Students will apply properties of the real number system to simplify algebraic expressions and solve linear equations.

Newton s Method and Linear Approximations

Test # 3 Review. È 3. Compare the graph of n 1 ÎÍ. Name: Class: Date: Short Answer. 1. Find the standard form of the quadratic function shown below:

CHAPTER 2 POLYNOMIALS KEY POINTS

Module 4: Equations and Inequalities in One Variable

Interpolation. 1. Judd, K. Numerical Methods in Economics, Cambridge: MIT Press. Chapter

SECTION 5.1: Polynomials

Lesson 7.1 Polynomial Degree and Finite Differences

Note: The zero function f(x) = 0 is a polynomial function. It has no degree and no leading coefficient. Sep 15 2:51 PM

Math-2A Lesson 13-3 (Analyzing Functions, Systems of Equations and Inequalities) Which functions are symmetric about the y-axis?

SOLUTIONS. Math 110 Quiz 3 (Sections )

( ) ( ) ( ) ( ) Given that and its derivative are continuous when, find th values of and. ( ) ( )

Final Exam C Name i D) 2. Solve the equation by factoring. 4) x2 = x + 72 A) {1, 72} B) {-8, 9} C) {-8, -9} D) {8, 9} 9 ± i

5.1 introduction problem : Given a function f(x), find a polynomial approximation p n (x).

Q1. Discuss, compare and contrast various curve fitting and interpolation methods

The absolute value (modulus) of a number

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Input: A set (x i -yy i ) data. Output: Function value at arbitrary point x. What for x = 1.2?

How many solutions are real? How many solutions are imaginary? What are the solutions? (List below):

1. Use the properties of exponents to simplify the following expression, writing your answer with only positive exponents.

Chapter 1 Numerical approximation of data : interpolation, least squares method

Chapter 2 Formulas and Definitions:

Learning Module 1 - Basic Algebra Review (Appendix A)

11 /2 12 /2 13 /6 14 /14 15 /8 16 /8 17 /25 18 /2 19 /4 20 /8

Reading Mathematical Expressions & Arithmetic Operations Expression Reads Note

Beginning Algebra. 1. Review of Pre-Algebra 1.1 Review of Integers 1.2 Review of Fractions

Newton s Method and Linear Approximations

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.

Lecture 10 Polynomial interpolation

Trashketball Chap 2 Review.notebook. February 10, Trashketball. f(x)=3(x+1) 2 2

Homework 4 Solutions, 2/2/7

Section 5.4 Quadratic Functions

1. Definition of a Polynomial

Empirical Models Interpolation Polynomial Models

Chapter 5 Smartboard Notes

Maths Class 11 Chapter 5 Part -1 Quadratic equations

Polynomial and Rational Functions. Chapter 3

SOLUTIONS TO EXAM 2, MATH 10550

Introductory Chapter(s)

SKILL BUILDER TEN. Graphs of Linear Equations with Two Variables. If x = 2 then y = = = 7 and (2, 7) is a solution.

ALGEBRA 2 MIDTERM REVIEW. Simplify and evaluate the expression for the given value of the variable:

Newton s Method and Linear Approximations 10/19/2011

MEMORIAL UNIVERSITY OF NEWFOUNDLAND

MAT 300 Midterm Exam Summer 2017

2 the maximum/minimum value is ( ).

Polynomial Interpolation Part II

1 Functions and Graphs

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

Applied Numerical Analysis Homework #3

CS 323: Numerical Analysis and Computing

March Algebra 2 Question 1. March Algebra 2 Question 1

Two hours. To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER. 29 May :45 11:45

A) (-1, -1, -2) B) No solution C) Infinite solutions D) (1, 1, 2) A) (6, 5, -3) B) No solution C) Infinite solutions D) (1, -3, -7)

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.

Function Practice. 1. (a) attempt to form composite (M1) (c) METHOD 1 valid approach. e.g. g 1 (5), 2, f (5) f (2) = 3 A1 N2 2

RF2 Unit Test # 2 Review Quadratics (Chapter 6) 1. What is the degree of a quadratic function?

MAT 107 College Algebra Fall 2013 Name. Final Exam, Version X

Math 578: Assignment 2

How might we evaluate this? Suppose that, by some good luck, we knew that. x 2 5. x 2 dx 5

In practice one often meets a situation where the function of interest, f(x), is only represented by a discrete set of tabulated points,

Chapter 2 notes from powerpoints

Announcements. Topics: Homework: - sections , 6.1 (extreme values) * Read these sections and study solved examples in your textbook!

Transcription:

. - Piecewise Linear-Quadratic Interpolation Piecewise-polynomial Approximation: Problem: Givenn pairs of data points x i, y i, i,,...,n, find a piecewise-polynomial Sx S x if x x x Sx S x if x x x 2 : : S n x if x n x x n where S i x are polynomials and Sx i y i, i,,...,n. Observe that each S i can be in a different degree of polynomial or all S i are in a same degree.. Linear Splines: 2. Quadratic Splines: L i x a i b i x x i, i,,...,n, and Lx L x if x x x : : L n x if x n x x n Q i x a i b i x x i c i x x i 2, i,,...,n, and Qx Q x if x x x : : Q n x if x n x x n. Cubic Splines: (Section.) S i x a i b i x x i c i x x i 2 d i x x i, i,,...,n. Question: How can we solve coefficients a i,andb i for a linear spline; a i, b i and c i for a quadratic spline; and a i, b i, c i and d i for a cubic spline?. Linear Splines: L i x a i b i x x i, i,,...,n. We need to find 2n unknowns: a, a,..., a n, b, b,..., b n so that L i x satisfy the following conditions: () L i x i y i, i,,2,..,n - condition for interpolation, a total of n equations (2) L i x i L i x i, i,,...,n 2 - condition for continuity at interior points, a total of n equations Sincewehave2nequations for 2n unknowns, we can solve a i and b i uniquely. Observe the following. From the condition in (), L i x i y i,i,,2,..,n, we can obtain a i for i,,...,n : L i x i a i y i, i,,2,..,n and b n L n x n b n x n x n y n y n, b n y n y n x n x n. From the the condition in (2), L i x i L i x i, i,,...,n 2, we can solve b i for i,,...,n 2: L i x i b i x i x i y i L i x i y i, b i y i y i x i x i, i,,...,n 2.

L x y y y x x x x if x x x Hence, Lx L i x y i y i y i x i x i x x i if x i x x i. L n x y n y n y n x n x n x x n if x n x x n Approximation error: Theorem Let a x x x n b, h k n x k x k and f x be continuous on a,b. Then x a,b fx Lx 8 h2 c a,b f c. Proof Let x x i,x i. Then fx L i x y i y i y i x i x i x x i. Note that fx Newton Form fx i f x i fx i x i x i Note that y i fx i, i,...,n. So, fx L i x f c i x 2! x x i f ci x 2! x x i x x i. x x i x x i. Approximation error fx Lx fx L i x f c i x 2! x x i x x i 2 c i x i,x i f c i x x i,x i x x ix x i. What is x xi,x i x x i x x i? Let q i x x x i x x i. The graph of q i x is a concave up parabola so the vertex x i,y i of the parabola is the lowest point on the graph. Hence, x xi,x i x x i x x i y i. Because of the symmetry of a parabola, x i 2 x i x i and then y i x 2 i x i x i x i 2 x i x i x i x i 2 h2. Hence, fx Lx 2 c i x i,x i f c i x x i,x i x x ix x i 2 c i x i,x i 8 h2 c a,b f c i h 2 f c Note: If we know x x i,x i, then fx Lx fx L i x 8 x i x i 2 f x. x x i,x i 2

Example Let fx x. Given,,,2,8,, (i) construct a linear spline Lx; (ii) approximate f2 by L2 and f5 by L5; and (iii) estimate the approximate errors for f2 L2, f5 L5 and fx Lx. y (i) Lx L x a b x if x L x a b x if x 8 L x x if x L x 2 x 5 if x 8, 2 2 5 6 7 8 x --y fx, y Lx (ii) f2 L 2 2 5 f5 L 5 2 5 5 2 5 (iii) f x 2 x /2, f x x /2, f x x /2 For x 2, x. f2 L2 8 2 c, x c 8 2.2825, and for x 5, f5 L5 8 8 2 c,8 x c 8 52 To see how accurate these approximations are, we check the true errors: f2 L2 2 5.658 8.97656. f5 L5 5 2 5 Now for any x in,8, fx Lx 8 h2 f c c,8.99. 8 h2 c,8 x c 8 52.7825.

2. Quadratic Splines: Q i x a i b i x x i c i x x i 2, i,,...,n. We need to find n unknowns: a, a,..., a n, b, b,..., b n, c, c,...,c n so that Q i x satisfy the following conditions: () Q i x i y i, i,,2,..,n - condition for interpolation, a total of n equations (2) Q i x i Q i x i, i,,...,n 2 - condition for continuity at interior points, a total of n equations () Q i x i Q i x i, i,,...,n 2 - condition for continuous slope at interior points - n equations () one additional condition from the following three conditions: (.) Q x, (.2) Q x n, or (.) Q x Q x n depending on information about fx, equation Sincewehavenequations for n unknowns, we can again solve a i, b i and c i uniquely. From the condition in (), Q i x i y i,i,,2,..,n, we can obtain a i for i,,...,n : Q i x i a i y i, i,,2,..,n, andanequationinb n and c n : Q n x n y n b n x n x n c n x n x n 2 y n. (.) From the condition in (2), Q i x i Q i x i, i,,...,n 2, we can obtain n equations in b i and c i for i,,...,n 2: Q i x i y i b i x i x i c i x i x i 2 Q i x i y i, i,,...,n 2. (2.) Similarly, from the condition in (), Q i x i Q i x i, i,,...,n 2, we can obtain n 2 equations in b i and c i for i,,...,n 2: Q i x i b i 2c i x i x i Q i x i b i, i,,..., n 2. (.) with one more equation from the condition given in (), (.) Q x Q x b 2c x x (.2) Q x n Q n x b n 2c n x n x n or (.) Q x b 2c x x Q x n b n 2c n x n x n, we have 2n equations to solve b i s and c i s. Example Let fx x. Given,,,2,8, (i) construct a quadratic spline Qx suppose that we also know f 2 ; (ii) approximate f2 by Q2 and f5 by Q5; (iii) approximate f by Q and f 5 by Q 5; and (iv) approximate fxdx by Qxdx. (i)

Qx Q x a b x c x 2 if x Q x a b x c x 2 if x 8 Q x b x c x 2 if x Q x 2 b x c x 2 if x 8 We solve b, b, c and c as follows. From the condition (.): Q 8 2 b 5 c 5 2 2 5b 25c y 2. (.2) From the condition in (2.), we have the equation: Q b c 2 b 9c Q y 2. (2.2) From the condition (.), we have the equation: Q b 2c b 6c Q b. (.2) From the condition (.), we have the equation: Q b 2. Solve c in (2.2): c 9 2 b 9 2 8. Solve b in (.2): and solve c in (.2): Hence, Qx b 2 6 8 c 25 2 5 6 6 5. y Q x x 2 8 x2 if x Q x 2 x 6 5 2 if x 8 2 2 5 6 7 8 --y fx, y Qx (ii) f2 Q2 Q 2 2 2 8 22 6 9. 77777778 f5 Q5 Q 5 2 2 6 5 22 59 25 2. 6 True errors: 2 6 9.57, 5 59 25.89897. 5 x

(iii) f Q Q Q 6 f 5 Q 5 Q 5 2 29 5.9. 6 5 5 (iv) fxdx Qxdx Q xdx 2 x 8 x2 dx. 75 Exercises:. The following table gives the viscosity of sulfuric acid, in millipascal-seconds (centipoises), as a function of concentration, in mass percent: Concentration (C) 2 6 8 Viscosity (V).8. 2.5 5.7 7. 2.2 a. Using given date, construct a linear spline LC to approximate the viscosity VC. b. Estimate the viscosity by LC when the concentration is 5% and 6% and 92%. 2. Let fx e x.given,e,,,,e, construct a linear spline Lx to approximate fx. a. Approximate f by L and f by L ;and 2 2 2 2 b. Estimate the approximate errors for f L, f L and 2 2 2 2 fx Lx.. Givenx i,y i,,,2, 2, where y i fx i for some fx, construct a quadratic spline Qx to approximate fx if we also know f. a. Approximate f by Q and f by Q. 2 2 2 2 b. Approximate f by Q and f by 2 Q. 2 c. Approximate fxdx by Qxdx. 6