함수의 근사
데이터가 주어져 있을 때, 데이터가 어떤 함수로부터 나왔을까?
Weierstrass Approximation Theorem
Algebraic Polynomials
One of the most useful and well-known classes of functions mapping the set of real numbers into itself is the algebraic polynomials, the set of functions of the form
Pn(x)=anxn+an−1xn−1+⋯+a1x+a0
where n is a nonnegative integer and a0,…,an are real constants.
Algebraic Polynomials (Cont'd)
Pn(x)=anxn+an−1xn−1+⋯+a1x+a0
- One reason for their importance is that they uniformly approximate continuous functions.
- By this we mean that given any function, defined and continuous on a closed and bounded interval, there exists a polynomial that is as "close" to the given function as desired.
- This result is expressed precisely in the Weierstrass Approximation Theorem.
Weierstrass Approximation Theorem
Suppose that f is defined and continuous on [a,b]. For each ϵ>0, there exists a polynomial P(x), with the property that
∣f(x)−P(x)∣<ϵ, for all x in [a,b].
Benefits of Algebraic Polynomials
- Another important reason for considering the class of polynomials in the approximation of functions is that the derivative and indefinite integral of a polynomial are easy to determine and are also polynomials.
- For these reasons, polynomials are often used for approximating continuous functions.
Inaccuracy of Taylor Polynomials
The Lagrange Polynomial: Taylor Polynomials
Interpolating with Taylor Polynomials
- The Taylor polynomials are described as one of the fundamental building blocks of numerical analysis.
- Given this prominence, you might expect that polynomial interpolation would make heavy use of these functions.
- However this is not the case.
- The Taylor polynomials agree as closely as possible with a given function at a specific point, but they concentrate their accuracy near that point.
- A good interpolation polynomial needs to provide a relatively accurate approximation over an entire interval, and Taylor polynomials do not generally do this.
- For the Taylor polynomials, all the information used in the approximation is concentrated at the single number x0, so these polynomials will generally give inaccurate approximations as we move away from x0.
- This limits Taylor polynomial approximation to the situation in which approximations are needed only at numbers close to x0.
- For ordinary computational purposes, it is more efficient to use methods that include information at various points.
- The primary use of Taylor polynomials in numerical analysis is not for approximation purposes, but for the derivation of numerical techniques and error estimation.
Example
Constructing the Lagrange Polynomial
The Lagrange Polynomial: The Linear Case
Polynomial Interpolation
- The problem of determining a polynomial of degree one that passes through the distinct points
(x0,y0) and (x1,y1) is the same as approximating a function f for whichf(x0)=y0 and f(x1)=y1 by means of a first-degree polynomial interpolating, or agreeing with, the values of f at the given points.
- Using this polynomial for approximation within the interval given by the endpoints is called polynomial interpolation.
Define the functions
L0(x)=x0−x1x−x1 and L1(x)=x1−x0x−x0.
Definition
The linear Lagrange interpolating polynomial though (x0,y0) and (x1,y1) is
P(x)=L0(x)f(x0)+L1(x)f(x1)=x0−x1x−x1f(x0)+x1−x0x−x0f(x1).
P(x)=L0(x)f(x0)+L1(x)f(x1)=x0−x1x−x1f(x0)+x1−x0x−x0f(x1)
Note that
L0(x0)=1,L0(x1)=0,L1(x0)=0, and L1(x1)=1,
which implies that
P(x0)=1⋅f(x0)+0⋅f(x1)=f(x0)=y0
and
P(x1)=0⋅f(x0)+1⋅f(x1)=f(x1)=y1.
So P is the unique polynomial of degree at most 1 that passes through (x0,y0) and (x1,y1)
Example
The Lagrange Polynomial: Degree n Construction
To generalize the concept of linear interpolation, consider the construction of a polynomial of degree at most n that passes through the n+1 points
(x0,f(x0)),(x1,f(x1)),…,(xn,f(xn))
The Lagrange Polynomial: The General Case
Constructing the Degree n Polynomial
- We first construct, for each k=0,1,…,n, a function Ln,k(x) with the property that Ln,k(xi)=0 when i=k and Ln,k(xk)=1.
- To satisfy Ln,k(xi)=0 for each i=k requires that the numerator of Ln,k(x) contain the term
(x−x0)(x−x1)⋯(x−xk−1)(x−xk+1)⋯(x−xn).
- To satisfy Ln,k(xk)=1, the denominator of Ln,k(x) must be this same term but evaluated at x=xk.
- Thus
Ln,k(x)=(xk−x0)⋯(xk−xk−1)(xk−xk+1)⋯(xk−xn)(x−x0)⋯(x−xk−1)(x−xk+1)⋯(x−xn).
Theorem: n-th Lagrange interpolating polynomial
If x0,x1,…,xn are n+1 distinct numbers and f is a function whose values are given at these numbers, then a unique polynomial P(x) of degree at most n exists with
f(xk)=P(xk), for each k=0,1,…,n.
This polynomial is given by
P(x)=f(x0)Ln,0(x)+⋯+f(xn)Ln,n(x)=k=0∑nf(xk)Ln,k(x)
where, for each k=0,1,…,n,Ln,k(x) is defined as follows:
P(x)=f(x0)Ln,0(x)+⋯+f(xn)Ln,n(x)=k=0∑nf(xk)Ln,k(x)
Definition of Ln,k(x)
Ln,k(x)=(xk−x0)(xk−x1)⋯(xk−xk−1)(xk−xk+1)⋯(xk−xn)(x−x0)(x−x1)⋯(x−xk−1)(x−xk+1)⋯(x−xn)=i=0i=k∏n(xk−xi)(x−xi)
We will write Ln,k(x) simply as Lk(x) when there is no confusion as to its degree.
Example: Second-Degree Lagrange Interpolating Polynomial
Interpolating Polynomial Error Bound
The Lagrange Polynomial: Theoretical Error Bound
Theorem
Suppose x0,x1,…,xn are distinct numbers in the interval [a,b] and f∈Cn+1[a,b]. Then, for each x in [a,b], a number ξ(x) (generally unknown) between x0,x1,…,xn, and hence in (a,b), exists with
f(x)=P(x)+(n+1)!f(n+1)(ξ(x))(x−x0)(x−x1)⋯(x−xn)
where P(x) is the interpolating polynomial given by
P(x)=f(x0)Ln,0(x)+⋯+f(xn)Ln,n(x)=k=0∑nf(xk)Ln,k(x)
Error Bound: Proof (skip)
Generalized Rolle's Theorem
Suppose f∈C[a,b] is n times differentiable on (a,b). If
at the n+1 distinct numbers a≤x0<x1<…<xn≤b, then a number c in (x0,xn), and hence in (a,b), exists with
f(n)(c)=0
Example: 2nd Lagrange Interpolating Polynomial Error Bound
Example: Interpolaing Polynomial Error for Tabulated Data