Mar. 20 Math 2335 sec 001 Spring 2014

Similar documents
February 2017 (1/20) 2 Piecewise Polynomial Interpolation 2.2 (Natural) Cubic Splines. MA378/531 Numerical Analysis II ( NA2 )

February 23 Math 2335 sec 51 Spring 2016

8 Piecewise Polynomial Interpolation

APPM/MATH Problem Set 4 Solutions

Computer Graphics / Animation

Justify all your answers and write down all important steps. Unsupported answers will be disregarded.

Interpolation and Splines

2D Spline Curves. CS 4620 Lecture 13

Numerical Methods in Physics Lecture 2 Interpolation

2D Spline Curves. CS 4620 Lecture 18

Math 226A Homework 4 Due Monday, December 11th

Interpolation & Polynomial Approximation. Cubic Spline Interpolation II

Remark. Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 331

Derivative. Bernstein polynomials: Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 313

Objects 2: Curves & Splines Christian Miller CS Fall 2011

COMPUTER AIDED ENGINEERING DESIGN (BFF2612)

MAT137 Calculus! Lecture 31

Contents 20. Trigonometric Formulas, Identities, and Equations

8 Project # 2: Bézier curves

Section 3.7 Notes. Rational Functions. is a rational function. The graph of every rational function is smooth (no sharp corners)

Lecture VIII. Global Approximation Methods: I

Subdivision overview

In some applications it may be important that the extrema of the interpolating function are within the extrema of the given data.

Interpolation. TANA09 Lecture 7. Error analysis for linear interpolation. Linear Interpolation. Suppose we have a table x x 1 x 2...

CS 450 Numerical Analysis. Chapter 7: Interpolation

Math 5320, 3/28/18 Worksheet 26: Ruler and compass constructions. 1. Use your ruler and compass to construct a line perpendicular to the line below:

Multiple-Choice Test Spline Method Interpolation COMPLETE SOLUTION SET

IB HL Mathematical Exploration

STAT 705 Introduction to generalized additive models

Interpolation - 2D mapping Tutorial 1: triangulation

Splines. Parameterization of a Curve. Curve Representations. Roller coaster. What Do We Need From Curves in Computer Graphics? Modeling Complex Shapes

Chapter 1. Limits and Continuity. 1.1 Limits

Smooth rounded corner. Smooth rounded corner. Smooth rounded corner

Euler s Method for Approximating Solution Curves

Computational Physics PHYS 420

The Phantom of the Operations

Here are some of the more basic curves that we ll need to know how to do as well as limits on the parameter if they are required.

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li.

CS-184: Computer Graphics

Ma/CS 6b Class 26: Art Galleries and Politicians

Interpolation. Chapter Information from Data

Computer Animation Fundamentals. Animation Methods Keyframing Interpolation Kinematics Inverse Kinematics

Section Graphs of the Sine and Cosine Functions

Name Course Days/Start Time

PR3 & PR4 CBR Activities Using EasyData for CBL/CBR Apps

MTH245 Unit 2 Module1 Piecewise Linear Functions

Section Polar Coordinates. or 4 π (restricting θ to the domain of the lemniscate). So, there are horizontal tangents at ( 4 3

Parameterization of triangular meshes

Polynomials tend to oscillate (wiggle) a lot, even when our true function does not.

Right Triangle Trigonometry Definitions (Instructor Notes)

Parameterization. Michael S. Floater. November 10, 2011

Cubic Splines and Matlab

Background for Surface Integration

CS-184: Computer Graphics. Today

San Francisco State University

2.4. A LIBRARY OF PARENT FUNCTIONS

MATH115. Polar Coordinate System and Polar Graphs. Paolo Lorenzo Bautista. June 14, De La Salle University

Lecture IV Bézier Curves

Spline Curves. Spline Curves. Prof. Dr. Hans Hagen Algorithmic Geometry WS 2013/2014 1

7.2 Trigonometric Integrals

In this course we will need a set of techniques to represent curves and surfaces in 2-d and 3-d. Some reasons for this include

specified or may be difficult to handle, we often have a tabulated data

An Introduction to B-Spline Curves

Week 10. Topic 1 Polynomial Functions

Lecture 6: Interpolation

Shape Modeling. Differential Geometry Primer Smooth Definitions Discrete Theory in a Nutshell. CS 523: Computer Graphics, Spring 2011

Math 182. Assignment #4: Least Squares

Edge and local feature detection - 2. Importance of edge detection in computer vision

Nonparametric Approaches to Regression

Parametric curves. Brian Curless CSE 457 Spring 2016

`Three sides of a 500 square foot rectangle are fenced. Express the fence s length f as a function of height x.

4.7 Approximate Integration

Positivity Preserving Interpolation of Positive Data by Rational Quadratic Trigonometric Spline

Mini-Project 1: The Library of Functions and Piecewise-Defined Functions

This is called the horizontal displacement of also known as the phase shift.

Math Lab 6: Powerful Fun with Power Series Representations of Functions Due noon Thu. Jan. 11 in class *note new due time, location for winter quarter

Trigonometric Fourier series

Nonparametric Risk Attribution for Factor Models of Portfolios. October 3, 2017 Kellie Ottoboni

Math 213 Calculus III Practice Exam 2 Solutions Fall 2002

Tangent & normal vectors The arc-length parameterization of a 2D curve The curvature of a 2D curve

An introduction to interpolation and splines

Lecture 24: Generalized Additive Models Stat 704: Data Analysis I, Fall 2010

Curve fitting using linear models

Parametric and Polar Curves

CURVES OF CONSTANT WIDTH AND THEIR SHADOWS. Have you ever wondered why a manhole cover is in the shape of a circle? This

B-Spline Polynomials. B-Spline Polynomials. Uniform Cubic B-Spline Curves CS 460. Computer Graphics

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

0.7 Graphing Features: Value (Eval), Zoom, Trace, Maximum/Minimum, Intersect

BASIC LOESS, PBSPLINE & SPLINE

For each question, indicate whether the statement is true or false by circling T or F, respectively.

f( x ), or a solution to the equation f( x) 0. You are already familiar with ways of solving

Limits. f(x) and lim. g(x) g(x)

Interpolation by Spline Functions

ME 261: Numerical Analysis Lecture-12: Numerical Interpolation

AXIOMS FOR THE INTEGERS

Outer Billiard on Piecewise Circular Curves & Piecewise Hyperbola Curves

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10

Interactive Graphics. Lecture 9: Introduction to Spline Curves. Interactive Graphics Lecture 9: Slide 1

Lecture 8. Divided Differences,Least-Squares Approximations. Ceng375 Numerical Computations at December 9, 2010

Subdivision Surfaces

Transcription:

Mar. 20 Math 2335 sec 001 Spring 2014 Chebyshev Polynomials Definition: For an integer n 0 define the function ( ) T n (x) = cos n cos 1 (x), 1 x 1. It can be shown that T n is a polynomial of degree n. It s called the Chebyshev Polynomial of degree n. () March 19, 2014 1 / 54

A Few Chebyshev Polynomials We determined a few in class: T 0 (x) = 1, T 1 (x) = x, T 2 (x) = 2x 2 1 T 3 (x) = 4x 3 3x A couple more are T 4 (x) = 8x 4 8x 2 1, T 5 (x) = 16x 5 20x 3 + 5x It can be shown that for n 1, they have the recurrence relation T n+1 (x) = 2xT n (x) T n 1 (x). () March 19, 2014 2 / 54

Figure: Plot of the first five Chebyshev Polynomials (of the first kind). () March 19, 2014 3 / 54

Some Properties of Chebyshev Polynomials T n is an even function if n is even and an odd function if n is odd. T n (1) = 1 and T n ( 1) = ( 1) n for every n They have an orthogonality relation 1 1 T n (x)t m (x) dx = 0 n m. 1 x 2 And the main property we re interested in T n (x) 1 for all 1 x 1 () March 19, 2014 4 / 54

Minimum Size Property We can note that T n (x) = 2 n 1 x n + terms with lower powers. We define the modified Chebyshev polynomials by T n (x) = 1 2 n 1 T n(x). Remark: The modified Chebyshev polynomials are monic polynomials. That is T n (x) = x n + terms with lower powers. () March 19, 2014 5 / 54

Minimum Size Property Theorem: Let n 1 be an integer. Of all monic polynomials on the interval [ 1, 1], the one with the smallest maximum value is the modified Chebyshev polynomial T n (x). Moreover T n (x) 1 2 n 1 for all 1 x 1. This result suggests that whenever possible, we choose the polynomial Ψ n (x) in our error theorem to be the modified Chebyshev polynomial T n+1 (x). () March 19, 2014 6 / 54

Chebyshev Nodes Since T n+1 (x) is monic, it can be written as T n+1 (x) = (x r 0 )(x r 1 ) (x r n ) where r 0,..., r n are the roots of T n+1 (x). We had the polynomial in our error formula Ψ n (x) = (x x 0 )(x x 1 ) (x x n ). So to minimize the error i.e. make Ψ n (x) = T n+1 (x) we would have to choose the nodes x j to be the roots r j of the Chebyshev polynomial T n+1. () March 19, 2014 7 / 54

Example: Chebyshev Nodes Use the change of variables x = cos θ to find the roots of T 4 (x). ( ) T 4 (x) = cos 4 cos 1 (x) We determined the four roots to be ( π ) x 0 = cos, x 1 = cos 8 x 2 = cos ( 3π 8 ( ) 5π, 8 and x 3 = cos ), ( ) 7π. 8 () March 19, 2014 8 / 54

Chebyshev Nodes Find a formula for the roots of T k (x) = cos ( k cos 1 (x) ). () March 19, 2014 9 / 54

() March 19, 2014 10 / 54

Chebyshev Nodes To interpolate f (x) on the interval [ 1, 1] by P n (x), the error is minimized by choosing the Chebyshev nodes (roots of T n+1 (x)) ( ) (2j + 1)π x j = cos, j = 0, 1,... n. 2(n + 1) The resulting error bound is f (x) P n (x) L f (n+1) (x), where L = max 2n 1 x 1 (n + 1)! () March 19, 2014 11 / 54

Example Let f (x) = e 2x on [ 1, 1]. Determine the Chebyshev nodes if P 3 (x) is being used to approximate f (x), and determine the resulting error bound. () March 19, 2014 12 / 54

() March 19, 2014 13 / 54

() March 19, 2014 14 / 54

Intervals Other than [ 1, 1] The Chebyshev nodes are in the interval [ 1, 1]. What if a function f (x) is to be approximated on an interval [a, b] different from [ 1, 1]? Let a x b. Find a formula in the form of a line for a new variable t such that 1 t 1. (That is, write something like t = mx + b.) () March 19, 2014 15 / 54

() March 19, 2014 16 / 54

Figure: Line through points (a, 1) and (b, 1). () March 19, 2014 17 / 54

Intervals Other than [ 1, 1] For f (x) defined on [a, b], set t = 2 (x a) 1 b a Then 1 t 1, and we can use the Chebyshev nodes for t. We perform the interpolation for ( ) b a g(t) = f (t + 1) + a 2 () March 19, 2014 18 / 54

Intervals Other than [ 1, 1] Solve for x in terms of t from t = 2 b a (x a) 1. () March 19, 2014 19 / 54

Intervals Other than [ 1, 1] ( ) b a Show that g (t) = f (x). 2 () March 19, 2014 20 / 54

Error Formula for Intervals Other than [ 1, 1] If (translated) Chebyshev nodes are used to approximate f (x) on [a, b] by the interpolating polynomial P n (x), then the error ( ) b a n+1 L f (x) P n (x) 2 2 n, where f (n+1) (x) L = max a x b (n + 1)! () March 19, 2014 21 / 54

Example Let f (x) = tan 1 (x) on the interval [0, 1]. Suppose we wish to interpolate f (x) using P 2 (x). Determine the translated Chebyshev nodes. And find a bound on the error when these nodes are used. () March 19, 2014 22 / 54

Example Continued... 1 1 It s helpful to note that d 3 dx 3 tan 1 x = 6x 2 2 (x 2 + 1) 3 (see slide after next for figure) () March 19, 2014 23 / 54

() March 19, 2014 24 / 54

Figure () March 19, 2014 25 / 54

Section 4.3: Interpolating Using Spline Functions We ve seen that when we can choose our nodes, we may be able to use a high degree polynomial interpolation and reduce the wiggly effect near the ends. But we don t always have an option to pick our nodes. 2 An alternative is to fit data with a piece-wise defined function that interpolates. We ll consider building a function whose pieces are polynomial. 2 That s nodes with a d. () March 19, 2014 26 / 54

Motivating Example Consider the data set x 0 1 2 1 2 5 2 4 y 1 1 1 1 3 2 2 A simple way to interpolate is to plot the points and connect each adjacent pair with a straight line segment. An alternative is to fit the six points with a polynomial interpolation of degree 5, P 5 (x). () March 19, 2014 27 / 54

Piece-wise Linear Interpolation Figure: It does interpolate, but the graph is not very smooth looking. () March 19, 2014 28 / 54

Interpolation of the Same Data with P 5 (x) Figure: The graph of P 5 (x) is significantly smoother, but how does the overall shape compare? () March 19, 2014 29 / 54

Comparison: Piece-wise Linear -vs- P 5 (x) Figure: Both pass through the data, but the curves are very different between the data points. () March 19, 2014 30 / 54

Piece-wise Cubic Interpolation An alternative is to take each successive pair of points and fit them with a piece of (polynomial) curve s(x) that passes through each data point, is continuous on the entire interval (the pieces are connected), and such that s (x) and s (x) are continuous on the entire interval (they connect without kinks or corners). The last condition suggests we will need the pieces to be cubic, or up to degree three. () March 19, 2014 31 / 54

Piece-wise Cubic Interpolation Figure: The data is interpolated by five pieces of cubic function. () March 19, 2014 32 / 54

Comparison: Piece-wise Linear -vs- Piece-wise Cubic Figure: The overall shape is preserved with piecewise cubic and the kinks are smoothed out. () March 19, 2014 33 / 54

Natural Cubic Spline Suppose that the n data points (x i, y i ), j = 1, 2,..., n are given. Assume x 1 = a, x j 1 < x j and x n = b. There exists a function s(x) that interpolates these points i.e. satisfying the following properties: s(x j ) = y j, for j = 1,..., n S1. s(x) is a polynomial of degree 3 on each interval [x j, x j+1 ], j = 1,... n 1. S2. s(x), s (x), and s (x) are continuous on [a, b]. S3. s (x 1 ) = 0 and s (x n ) = 0 3 The curve s(x) is called the natural cubic spline that interpolates the data. 3 This condition may be changed leading to other cubic splines. () March 19, 2014 34 / 54